A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: loading dynamic text into a movie clip which is loaded in a scrollpane

  1. #1

    loading dynamic text into a movie clip which is loaded in a scrollpane

    Hi,

    I am devloping a movie for displaying text which will be updated from a database.

    What I have is a scrollpane (in MX 2004) which has as its contentPath paramter a movie clip called "textloader" where textloader is the linkage name of the movie clip being loaded into the scrollpane.

    The scollpane has an instance name of "myScroll" and loads the mc "textloader" ok and this is where I come to a problem. The textloader mc loads dynamic text froma a PHP page. I have this working in a seperate file to ensure the data actually loads. However, when textloader is loaded in the scrollpane the dynamic text does not load. I think the problem is with the loadvariables code I use:

    PHP Code:
    loadVariables("index.php?r="+Math.round(Math.random())+"&"+random(9999), _root.myScroll.textloader
    "GET"); 
    This code appears in the main movie in the same frame as where the scrollpane loads.

    Any help with this is appreciated. (or even a suggestion for a better way to do this)

    Thanks in advance,
    martin

  2. #2

  3. #3
    Member
    Join Date
    Jan 2004
    Posts
    56
    I think the problem is beacue you are using the "_root" comand. when you load you text to a scrollpane the root is different. try using "_parent".
    Ido

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    If you're going to use loadVariables rather than LoadVars(), then load your variables on the root level and simply reference your variable in the textfield to it, by adding _level0 to your variable's name, in the Var box of your textfield...

    loadVariablesNum("index.php?r="+Math.round(Math.ra ndom())+"&"+random(9999), 0);

    Then supposing your variable's name was my_var, then make it _level0.my_var in the Var box instead.

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