A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Advanced getURL external variable issue

  1. #1
    Junior Member
    Join Date
    Dec 2001
    Posts
    4
    Hello everybody!
    I have made a flash menu (buttons) with getURL actions. I have placed the variables (urls) in a text file (menu.txt). My problem is:
    Here first is the actionscript code:
    -in the swf file:
    on (release) {
    loadVariablesNum ("menu.txt", 0);
    startpage = "http://www.crazydepot.com/index.php?sid=" add spsid add "&t=" add sptarget;
    getURL (startpage, "_blank");
    }

    -in the menu.txt file:
    &spsid=923759707
    &sptarget=index


    PROBLEM : When I then click the button THE FIRST TIME, I get:
    http://www.crazydepot.com/index.php?sid=&t=
    and when I click it a second time, I get :
    http://www.crazydepot.com/index.php?sid=923759707&t=index (this is what I want).(when I click a third time I still get the good url... it's just the first time flash ignores the variables actually).

    Can anyone explain for me why when I click the first time flash ignore the variables in the menu.txt file and when I click the second time they are included?

    My goal is to have flash displaying the url with the variables the first time.

    thanks for answering!

  2. #2
    Senior Member
    Join Date
    Aug 2001
    Location
    Egypt
    Posts
    332
    hi,
    you just have to load the txt file in the first frame of your movie so that when the button is released the variables are already loaded.

    hamza.


  3. #3
    Senior Member
    Join Date
    Jul 2001
    Posts
    177
    HI
    You can also have
    on (press) {
    loadVariablesNum ("menu.txt", 0);

    }
    on (release) {
    startpage = "http://www.crazydepot.com/index.php?sid=" add spsid add "&t=" add sptarget;
    getURL (startpage, "_blank");
    }


    Regards

  4. #4
    Junior Member
    Join Date
    Dec 2001
    Posts
    4

    thanx 4 answering!

    It works! Thx all 2 4 answering!

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