A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Switching two MovieClip current frames with each other

  1. #1
    Junior Member
    Join Date
    Jul 2013
    Posts
    19

    Switching two MovieClip current frames with each other

    What I want to archive is switching two MovieClip current frame stops with each other of what they are currently on (not moving them) by for example "slot1" and "slot2" as instance names, they are the same inside just the difference is what frame stop they could be on at that time.

    my failed attempt

    PHP Code:

    on
    (press){
        
    _root.slot1.gotoAndStop(currentFrame._root.slot2));
        
    _root.slot2.gotoAndStop(currentFrame._root.slot1));


  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    This may point you in the direction you desire,
    PHP Code:
    on (press) {
        var 
    _root.slot1._currentframe;
        var 
    _root.slot2._currentframe;
        
    trace("a - " A);
        
    trace("b - " B);
        
    _root.slot1.gotoAndStop(B);
        
    _root.slot2.gotoAndStop(A);


  3. #3
    Junior Member
    Join Date
    Jul 2013
    Posts
    19
    Thanks so much for the help! It worked perfectly.

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