A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Flash Dynamic text in embedded movie

  1. #1
    Junior Member
    Join Date
    Dec 2008
    Posts
    3

    Flash Dynamic text in embedded movie

    Hi I have main timeline and then have a small movie clip in which there is a dynamic text box and my actionscript.

    Code:
    myVars = new LoadVars();
    myVars.load("http://preview.domain.co.uk/inc/loadVars.php");
    
    myVars.percentage
    
    myVars.onLoad = function() {
        text_box.text = this.percentage;
    };
    but when I play the movie it doesn't work. However if I move the dynamic textbox onto the main timeline along with my actionscript it works.

    Please can someone help.

  2. #2
    Senior Designer
    Join Date
    Jul 2001
    Location
    Australia
    Posts
    367
    You said you have a small movieclip holding the dynamic text box, but in your code you're only referring to the MC, not the actual text box.

    Change this:

    PHP Code:
    text_box.text this.percentage
    To this:

    PHP Code:
    text_box.myTextBox.text this.percentage
    Where 'myTextBox' is the name of your dynamic field.

Tags for this Thread

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