A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Passing Variable Value

  1. #1
    Junior Member
    Join Date
    Mar 2004
    Posts
    29

    Passing Variable Value

    Is it possible to pass a variable's value to the gotoAndPlay(); function. I'm having trouble with a condition statement and I just want to skip that step and set a variable to pass the lable name to the gotoAndPlay. i.e. gotoAndPlay(Variable);

  2. #2
    Senior Member LeoBeer's Avatar
    Join Date
    May 2002
    Posts
    315
    no it is'nt:
    my_mc.gotoAndPlay(frame)

    Parameters
    frame A number representing the frame number, or a string representing the label of the frame, to which the playhead is sent.
    try something else.

  3. #3
    Junior Member
    Join Date
    Mar 2004
    Posts
    29
    Drats!! Thanks.

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    Actually, my_mc.gotoAndPlay(variable) does work:

    myVar="myLabel";
    this.gotoAndStop(myVar);

    gparis

  5. #5
    Senior Member LeoBeer's Avatar
    Join Date
    May 2002
    Posts
    315
    your right, just took another look at his post.

    thought he meant sometihng else (what was I thinking).

    I have to stop reading the board after 1 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