-
as2 control frames inside a symbol
hey guys, im trying to make my own crappy pokemon game with the 151 first pokemons
so far if got a button that encounters a random number 1-151 and displays it
but now i want to add some pics to those numbers
so i made a symbol, not sure if i need a movieclip or a graphic, then i made 151 frames in that and started adding pics to each frame
now the question is, how do i control those frames inside the symbol, to change to the right pic
noobie example of what i need:
on(press)
{
randompokemon = random(152)
if (randompokemon == 4)
{
_root?.movieclip1? gotoAndStop(4)
}
}
so when the random number generator picks, lets say 4, the movieclip1 symbol with 151 frames/pics will change to frame/pic 4
anyone can translate my crappy understanding of coding, to something that works
thx in advance
-
.
Hi,
try something like this.
Code:
on (press) {
randompokemon = random(152);
_root.movieclip1.gotoAndStop(randompokemon);
trace(randompokemon);
}
my hobby
-
ha i was so close, just the . i forgot
didnt knew how to connect _root.movieclip1 to gotoAndStop
also i would just copy paste if (randompokemon == 0) if = 1..if2.3.4.5.6.150 lol good you mentioned (randompokemon) instead of (4)
Last edited by Kascas; 09-03-2012 at 01:22 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|