A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [F8] Movieclip Actionscript

  1. #1
    Junior Member
    Join Date
    Feb 2007

    [F8] Movieclip Actionscript

    I've been at this with no luck at all, but a few close calls, so I decided to see if anyone could assist me with this, (I'm guessing) simple actionscript.

    I have two movieclips.

    mc1 and mc2.

    mc2 at the start of the scene, is stopped on frame 1, which has no graphic.

    Via button, mc1 can be played.

    During the animation of mc1, a single frame contains the actionscript telling mc2 to gotoandplay frame 2 in which there is a graphic.

    mc1 then finishes its animation, and mc2 should stay on its second frame containing the graphic, because it is stopped.

    However, almost all of my attempts lead to:

    Target not found: Target="mc2" Base="_level0.mc1"

    or similar, but I really don't understand where in the actionscript I went wrong.

    I thought,

    tellTarget ("mc2") {
    gotoAndPlay (2);

    would have worked.

    Obviously there are errors in my logic, but I just don't know what to replace them with.

  2. #2
    trace("AKA: Biro Barna");
    Join Date
    Oct 2007
    don't use tellTarget...

    On the first frame of your movie place this:

    mc1.onPress = function():Void

    Once you press mc1, mc2 will start playing...

    | Windows MSN: birobarna [at] hotmail [dot] com | Skype: barna.biro |
    WebLog: http://blog.wisebisoft.com/ |
    | Software Developer / Flash & Flex Developer | Student ( Computer Science ) | Interested in: Sharing Knowledge |
    Romanian Adobe Flash, Flex, AIR Forum: http://www.flashforum.ro/
    | By perseverance the snail reached the ark. |

  3. #3
    Junior Member
    Join Date
    Feb 2007
    I solved it.

    This is what I was going for:

    if (_currentframe != 180) {

    So that on the 180th frame of mc1 it would tell mc2 to play.

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