A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: how to pass variable from MC to MC

  1. #1
    Member
    Join Date
    Jul 2000
    Posts
    87
    Hi!
    I have a problem with pasing variable..
    Here is my code

    On (Release)
    Begin Tell Target ("cover")
    Go to and Play (2)
    End Tell Target
    Begin Tell Target ("monitor")
    Set Variable: "myframe" = "transition1"
    Go to and Play (2)
    End Tell Target
    End On

    On the monitor MC
    (the blank MC that has 2 frames)
    on the second frame

    If (GetProperty ("/mcfirst/cover", _currentframe )>10)
    Begin Tell Target ("/mcfirst")
    Go to and Play (myframe)
    End Tell Target
    Go to and Stop (1)
    End If

    So I want to be able to pass variable when I click the button and to go to the speciphic frame in my "mcfirst"
    movie. I know I am almost there and the problem is with seting variable with frame label
    Thanks for any help

  2. #2
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756
    Hi ok here is what I think;
    u used:
    Set Variable: "myframe" = "transition1"

    I think it should be:

    Set Variable: "/monitor:myframe" = "transition1"

    Ok is transition1 variable or simply a string cos if its a variable you have to use Eval statement.

    did it work ?

    Mad_sci

  3. #3
    Member
    Join Date
    Jul 2000
    Posts
    87
    Hi Mad_sci, thanks for the respond., it is not working yet, but i know i am close, very close.
    Now I changed the code, myframe="transition1" is the label of the frame where playback should go after command comming from Monitor MC, but still something wrong.

    on the button
    On (Release)
    Set Variable: "myframe" = "transition1"
    Begin Tell Target ("cover")
    Go to and Play (2)
    End Tell Target
    Begin Tell Target ("monitor")
    Go to and Play (2)
    End Tell Target
    End On





    on the monitor MC

    If (GetProperty ("/mcfirst/cover", _currentframe )>10)
    Begin Tell Target ("/mcfirst")
    Go to and Play (Eval ( /mcfirst:myframe))
    End Tell Target
    Go to and Stop (1)
    End If
    Thanks again
    Ilia

    Originally posted by Mad-Sci
    Hi ok here is what I think;
    u used:
    Set Variable: "myframe" = "transition1"

    I think it should be:

    Set Variable: "/monitor:myframe" = "transition1"

    Ok is transition1 variable or simply a string cos if its a variable you have to use Eval statement.

    did it work ?

    Mad_sci

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