Flash Advisor logo
:: Desktop Shortcut
:: Flash Help
Advice from Experts

+ Reply to Thread
Results 1 to 2 of 2
  1. #1

    Default Swapping movie clips in AS2

    Not sure if this is possible, but for my game I am trying to swap movie clips from my library with movie clips on the stage. Example: I have a monster pop-up, when I click it I want it to be swapped with a new movie clip of that monster burning. I need it to keep the same animation (appears in place of the monster clicked, then moves down into hiding) Right now I have attachMovie setup so that when I click the monster the burned monster does appear on the stage, but at the resting point of the monster clicked (where it sits at frame 0) and it's not masked.

    Right now this is what I have
    Code:
    			    _root[numMonsters].onPress = function()
    			    {//start of onPress function for numMonsters
    				   if(this._currentframe >= 12 and this._currentframe <= 17)
    				   {
    					 monsterTakeDmg()  
    					 this.play(); //makes the Monster go down if hit
    				     hitCount++; //raises the hits by 1
    				     scoreDisplay.monstersHit_text.text = hitCount + " Slain";
    					 this.attachMovie("mc_MonsterFire", "Monster",  0);
    					 
    					 
    				   }
    				   
    			    }//end of onPress function for numMonsters

  2. # ADS
    Join Date
    Always
    Posts
    Many
     
  3. #2
    Join Date
    Jun 2009
    Location
    Houston, Tx
    Posts
    485

    Default

    You could always just place the burning frames into the nonburrning monster movieclip.
    Or, make a full monster movieclip and put the other two in it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Sponsors
Create Speaking Characters for your website and Flash movies. 15 Day Free Trial