dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: AS2 dynamic text field within movieclip please help!

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    1

    AS2 dynamic text field within movieclip please help!

    The dynamic text field when placed on the main timeline, displays my input text perfectly, as soon as I put it into the movie clip it stops working... the first time I did this I tried using the code:

    dynamic.text=first_name I used this in the main timeline and it definitely works.

    So I tried changing it for the movieclip to this:

    _root.mc.dynamic.text=first_name and it STILL doesn't work... I don't know if I'm being stupid but I'm a graphic designer not a programmer!!

  2. #2
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    where is the variable? and where is the textField?


    if the variable is on the "_root" timeline..

    and you have a nested textField inside a movieClip..

    it would depend on where you have your code..

    I will assume it is on the MAIN/_root timeline..

    your code should be like:


    var someText:String = "Blah..blah....I heard this or that about this person..and...OMG...like LOL.....etc..etc"


    someMovieClip.someTextField.text = someText;


    if you have your code inside the movieCLip where the textField is:

    someTextField.text = _parent.someText;


    if both the var and the code are in the movieCLip where the textField is:

    var someText:String = "Blah..blah....I heard this or that about this person..and...OMG...like LOL.....etc..etc"

    someTextField.text = someText;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center