A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Help...!!

  1. #1
    Junior Member
    Join Date
    Apr 2001
    Posts
    23

    Thumbs down

    Do anybody have an idea how to detect other mc's timeline position at any time.
    I'm making a movie where 8 different mc's are supposed to show up, one at a time. One fading out, while another fading in, depending on witch button I click.
    Could I write any if action. Hope I made some sense.
    Please, anyone!

    desperate Rolf

  2. #2
    Senior Member
    Join Date
    Apr 2000
    Location
    Minneapolis
    Posts
    2,127
    you need to use the target path. and getproperty.
    look up some tutorials on tellTarget if you dont know it. You will find some here at flashkit.
    Basically you give a mc an instance name in the instance panel. each instance on stage of a mc must have a unique name. (this is not the same as the name in the library).

    say I have a 2 mc's on stage, instance names fred and wilma.

    this code would when the button was pressed get the current frame of fred and store it in a variable FrameFred. Then check if freds timeline was at frame 10 or higher and if so tell wilma to play.
    You could leave out the storing in a variable part and just put the currentframe part right in the if statement, but if you are checking a few frame positions its easier to read and change if you store thenm first in variables with meaningful names.

    on (release) {
    FrameFred = getProperty(_root.fred, _currentframe);
    if (FrameFred>=10) {
    tellTarget (_root.wilma) {
    play ();
    }
    }
    }

    hope that makes sense.
    From what you mention maybe you could just have an action in each mc at the appropriate frame that tells the next one to play.

    say in fred at the frame where it starts to fade out you make it a keyframe and put an action that says

    tellTarget (_root.wilma) {
    play ();
    }

    each mc could tell the next to play.
    get back to me for more help.
    having trouble with the board you can email me at gase@visi.com

    mark

  3. #3
    Junior Member
    Join Date
    Apr 2001
    Posts
    23

    Thanx

    Thank you, mark. You're saving my life.

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