A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: query string varibales lagging into flash

  1. #1
    Junior Member
    Join Date
    Aug 2000
    Denver, CO
    ok heres the deal. i have a menu on an asp page. i wrote a java script function w/asp to retrieve variables from the page.

    <script language="JavaScript">
    function setName() {
    //check if Flash object exists
    if (window.document.dataBackendMenu) {
    //set page variable in _root timeline of Flash movie
    window.document.dataBackendMenu.SetVariable("lgnID ", szlgnID);



    the flashpiece calls the function and the page pushes the variables into them mov. problem is it seems to be lagging - taking too much time. if i want to actually be able to use the values loaded i have to wait 3-5 frames in my mov. is this just a flash issue or what? is there a quicker more efficient manner to retrieve variables from the url string and put them into flash? the menu is residing as an include for the whole site. any help would greatly be appreciated. thanks.

  2. #2
    proud new daddy! LuxFX's Avatar
    Join Date
    May 2000
    loadVariables doesn't pause the script or the movie -- flash will keep on running! there are two popular ways of defeating this:

    1) do a stop() command on the timeline, then you can load the variables into a movieclip (not _root) and attach an onClipEvent(data) event to the movieclip. This event gets fired when the variables have finished loading.

    2) include an extra variable on the end of your data like this: [other variables]&loadComplete=1. Before you call loadVariables, set a variable (in the same location you're loading the variables into of course) named loadComplete to be 0. Then run a loop that keeps checking to see if loadComplete is equal to 1, when it is you know that all the variables have loaded (since this was the last on the list) and you can continue the movie.

    hope this helps!

  3. #3
    Senior Member SJT's Avatar
    Join Date
    Mar 2000
    London, UK
    Unfortunately passing variables like that wont work in some browsers...you can pass the variable into flash using the name attribute in the object and embed tags, so maybe you could use the ASP to rewrite that instead?

    It goes along the lines of
     <PARAM NAME=movie VALUE="myswf.swf?lgnID= szlgnID">
    <EMBED src="myswf.swf?lgnID=szlgnID"

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