1 Reply Latest reply on Dec 15, 2009 9:18 PM by Flex harUI

    Update Txt Field in a SWF

    ehusar Level 1

      I am working on an app to convert it from Flash AS3 over to Flex. One question I have is about importing SWFs and updating a text box in side the SWF. I can go two routs here. One, recreate the movies with Flex components. Two, import the existing SWFs. Importing them will save time for sure. They are just a movie clip with 4 text boxes in them.  Ideally I would like to import the SWF and still be ablel to update the text boxes inside them.  That doesn't seem to be the case.


      Here is how I am importing the SWF right now and they load without error....








      public var redStatsBackSwf:Class;






      <mx:Image source="{redStatsBackSwf}" id="redBox" autoLoad="true" scaleContent="true" width="166" height="132" x="10" y="26"/>


      Back up in my as3 within a function I was thinking I could just do the normal...


      redBox.fieldRedtxt.text = "Show some text here";


      .. and it would update the text field.  No such luck unless I am not access the movie correctly as 'redBox'. Also, when I export the SWF I am doing the Export to ActionScript settings.


      Picture 5.png