A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: passing variables?

  1. #1
    Member
    Join Date
    Dec 2002
    Location
    Houston, TX
    Posts
    40

    passing variables?

    Hey,
    I have an animation I want to play then send you to another page...how can I pass what page I want the flash animation to go to after the tween?
    EX:

    Home button, Members button, link button

    When you click members...a little banner comes out via a tween. When I click one of the other 2 buttons(home, link) I want the tween to go in reverse, and put the user at the page they selected. Know what I mean?
    Thanks,
    Josh
    new to this flash thing

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Just put a getURL action in the last frame of the tween..

    getURL("myPage.html");

    For the backwards tween make a new movieclip and reverse the frames.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  3. #3
    Member
    Join Date
    Dec 2002
    Location
    Houston, TX
    Posts
    40
    Hey,
    but the buttons link to a differant frame in my swf.so how do I let the lat part of the tween know where to send you to be on the home page when u click home instead of the links page?
    Thanks,
    Josh
    new to this flash thing

  4. #4
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    If you are using the same tween for everything you can just set a variable with the buttons that the action in the last frame of the tween will perform. Like.....

    on(release){
    whereToGo="membersPage";
    myTweenMC.play();
    }

    ... at last frame of tween MC....

    _root.gotoAndPlay(_root.whereToGo);

    This will work if you have a framelabel in the main timeline called memberspage, for instance.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  5. #5
    Member
    Join Date
    Dec 2002
    Location
    Houston, TX
    Posts
    40
    THANKS!
    Josh
    new to this flash thing

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