Playing inside movie clips?


#1

Ok so I posted this in the Movie Clip Maneuvering thread too but I dont want to hijack that one with this problem as it is slightly complicated.

Basically I have a field of flat tiles in flash that flip over when you roll over them. There is one generic movie clip for now that will be duplicated as unique clips once I get it working so that each tile can have an unique image on the backside. This way you reveal an interesting image as you flip the tiles(the images swap out also based on number of tile flips). The movie clip has the flip over and flip back animations inside it, labeled with frame labels. In order to get it to roll back I have a time counter which is 2 frames: frame 1 has counter=counter+1 and frame 2 is gotoAndPlay frame1’s label. Then in order for the tiles to flip back over after a certain amount of time, there is a simple math function which subtracts the current counter value from the time value that the counter was at when the tile was rolled over(which is the variable tilecounter, which was declared inside the button). If the difference of those two variables is > 50 (50 is an arbitrary value for now just for testing) then this line: _root.tileflipover.gotoAndPlay(“tileflipback”) should play. However all that happens is that it goes to the first frame of the tileflip animation and stops. I can get the tile to flip over nicely when i roll over it but it will not roll back. There are no stop actions on any of the frames at that point. I looked in two separate actionscripting books and both say that I have set it up right. I am so frustrated with this that I dont know what to do. Its for a class project thats due thursday and everything is ready except for this goddam flip back. Any help is appreciated. I have posted a link to the .fla file so anyone can take a look at it. Thanks.

Yanky

Flash Tile Project


#2

I haven’t figured it out… its all kinda confusing. Maybe try putting the actual button outside of the movieclip. So that it is in the main timeline. gah… I dunno. Its weird. I would have done it all differently. :slight_smile:

I’ll keep trying.


#3

Your system doesnt work anyway… cos when you roll over the other tiles it resets the difference counter and that stuffs up the first tile you rolled over. Or was that the intention?


#4

heh i realize its a bit confusing cause some other stuff is going on too. yes right now the counter is reset every time by the other tiles becasue they are instances of the original but once I get the code nailed down, I can duplicate the original and break it and then remake it a movie clip. That way ill get 20 unique clips and each one will have a diff counter. Theres probably a better way but for now that will work. You couldnt see why the jump to and play wasnt workin inside the clip though? You see how when the counters difference gets to > 50 it just snaps back to a flat tile instead of animating the rotation? thats the prob. thanks for the reply.

Yanky


#5

omg, your right… this is screwed! It is doing some really weird stuff. I’m really not sure what to suggest. I’m not really an expert. :hmm:


#6

yeah, I got my head around how it all works. But I’ll be damned if I can figure out why it won’t play. :frowning:


#7

lol. I also posted this at flashkit and got an awesome response AND a modified version of my project that works. Its way simpler than what I did and it works, now if I can only figure out why…

Dam actionscripting

Yanky


#8

lol, could you post the link to the improved file? that would be nice. Thx.


#9

http://userpages.umbc.edu/~tmccau1/flash/flashkit/tiles5_2.fla

Im not sure how long that will be up since it is hosted by the guy that helped me out but for now its there. Its a much simpler way of executing my idea, although a bit foreign to me since Im new to actionscripting.

Yanky


#10

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.