View Full Version : Flash Game question
05-10-2002, 11:55 AM
I have made a game like Pacman,maze stuff, you know.I've got like 3 different mazes for each level to make it more difficult each level.Now,what i want is,if i'm in level 2,i want the first background replaced by the second one.But i'm not sure how.I tried it with a removeMovieClip and attach the second.But that didn't work.May because the code wasn't good or something.
Anyone got any ideas ? Thanx !
I dont see why the removeMovieClip shouldnt work but you could try just removing it from the stage or suing the _visible property. What i cant undersand is how you managed to do a packmanlike game and not this???? It should be much easier.
By the way, is the movieclip duplicated onto the stage or is it just placed there?
05-10-2002, 01:03 PM
yeah, i know,but we made the game with the whole class you know,like an exercise ? There's no way i could have done that by myself.
The background is placed on the stage,not attached.
removeMovieClip will only work for attached or duplicated MCs.
05-10-2002, 02:06 PM
ok,i've got that.But how do you perform a hittest on an attached movie ?
Thanx by the way for your replies :-)
Sure, just attach it into a container mc and change its position.
05-10-2002, 02:29 PM
ok,you answered my previous question while i was editing it..hehe.
So....i've got the attachMovie stuff and all .But how do you perform a hittest on an attached movie ?
example - You have a movie called box and an empty movie called cont. Then you use cont.attachMovie("box","box2",2). Now the path to box2 is - _root.cont.box2.
05-14-2002, 04:45 PM
Ok,i get the attach & removie stuff.and it works...
But i just can't seem to get the background switch thing to work :(
It would be extremely cool if you would look at my file. It's not finished yet,but the basics are there.
Can you point me to the part of the script that needs fixing and what you exactly want done cause i cant be botherd to read through all that.:D
05-15-2002, 06:35 PM
And i'll just do that for you ! ;)
In the middle of the stage is a mc (achtergrond),that's where i put the code to attach the background and tried to put the code for changing the background.
In the second frame of the main timeline are frame actions where the most code of the game is,in the beginning there's a hitTest on the background (see comments)
I hope this will help you,and eventually help me :D
05-16-2002, 09:55 PM
C'mon you guys...:rolleyes: you know yer good enuff
As soon as I get the chance I'll look at, it unless someone else does.(hopefully....I hate looking at long pieces of code that isnt mine)
vBulletin® v3.8.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.