A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Help with passing variables!!

  1. #1
    Member
    Join Date
    Feb 2003
    Location
    New York
    Posts
    87

    Help with passing variables!!

    I can't seem to get these variable names to pass properly. Attached is the .fla of a simplified version of what I'm trying to do. Basically, I have set up global variables that I want to change depending on which button is pressed. Those variables are then used as the names of the movieclip I want to start playing. Here is a quick and easy breakdown of what should happen...

    1) user clicks on button 2
    2) variable called "nextSection" gets assigned the value section2 (which is also the name of the movieclip containing the content for section 2)
    3) the clip that is currently playing ("nowPlaying") gets told to animate out (nowPlaying.gotoAndPlay("close")
    4) nowPlaying animates out and when it's done, it calls an action that tells "nextSection" to start playing.

    somebody please help me...i have no clue why this doesn't work!!
    Attached Files Attached Files
    Clint Balcom
    www.clintbalcom.com

  2. #2
    Member
    Join Date
    Aug 2003
    Posts
    37
    Hi Clint,

    1) user clicks on button 2
    2) variable called "nextSection" gets assigned the value section2 (which is also the name of the movieclip containing the content for section 2)
    3) the clip that is currently playing ("nowPlaying") gets told to animate out (nowPlaying.gotoAndPlay("close")
    4) nowPlaying animates out and when it's done, it calls an action that tells "nextSection" to start playing.

    somebody please help me...i have no clue why this doesn't work!!
    Hmm. When I click on button 2 it plays section 1 and then section 2. What's not working?

    Have you tried adding in some trace actions like

    trace( "_root.nowPlaying is " + _root.nowPlaying ) ; or
    trace( "_root.nextSection is " + _root.nextSection ) ;

    to see what the values your variables have (or don't have ) at different points of your program?

    hth
    Pauline

    p.s. remember to check the paths you use when you refer to movie clips or variables from a timeline other than the one they are located on.
    Last edited by pauline m; 08-08-2003 at 06:32 AM.

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