A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: controlling all movie clips

  1. #1
    Junior Member
    Join Date
    May 2009
    Posts
    6

    Smile controlling all movie clips

    Hi Im working on a quiz kind of game in which if you click an object, you get a question (the object is a movie clip and the question is within it). If you answer it, the movie clip stops at a particular frame. And so go all the objects in the game. Now, because you cant predict which object the user will click on last, I dont know how to bring in an ending screen saying that they've completed it successfully. If there is any actionscript coding, that allows me to go to a particular frame on the main timeline, only after all MCs have reached the same frame in their respective timelines, it would solve my problem..

    Any help would be greatly appreciated. Thanks a lot

  2. #2
    Senior Member
    Join Date
    Nov 2005
    Location
    dante's inferno
    Posts
    904
    in a simple form:
    PHP Code:
    var iTotalObjects 10;//root timeline
    var iObjectsClicked 0;

    myButton_1.onRelease = function() {
        
    //your button code
        
    _root.iObjectsClicked++;
        
    fnCheckObjects();
    }

    function 
    fnCheckObjects() {
        if (
    iObjectsClicked == iTotalObjects) {
            
    // game over do this
        
    } else {
            
    // continue to play
        
    }

    hope that gets you started in the right direction

    IMS

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