Welcome to Dream.In.Code
Become an Expert!

Join 149,478 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,651 people online right now. Registration is fast and FREE... Join Now!




Maze collision detection in Flash

 
Reply to this topicStart new topic

Maze collision detection in Flash, using a transparent symbol

alk3ovation
7 May, 2007 - 10:26 PM
Post #1

New D.I.C Head
*

Joined: 20 Apr, 2007
Posts: 8


My Contributions
Hi everyone,

I am trying to write code to for a maze like game and my partner and I figured it would be easiest to make the background the top down view of the maze and then make a symbol for the collision that is a replica of the top down version, only where the walls are is black and where the player can walk is transparent. Now the symbol is definitely transparent where it should be but I can't get this to work. I found a file from Adobe that is a maze program and it looks like it uses the method I want to use but the problem is the code for it is embedded somewhere in the .fla file and I can't find it. I found the part that controls the collision detection but there is also another part called maze.walls and I can't find it for the life of me. Does anyone know how to implement this? And if not, can anyone find the maze.walls actionscript in the file I have attached?

Attached File  Maze.zip ( 19.31k ) Number of downloads: 163


Thanks
User is offlineProfile CardPM
+Quote Post

Trogdor
RE: Maze Collision Detection In Flash
8 May, 2007 - 04:48 AM
Post #2

D.I.C Addict
Group Icon

Joined: 6 Oct, 2006
Posts: 549



Thanked: 4 times
Dream Kudos: 125
My Contributions
Tbh this is why i realy dislike flash.
It is so hard to find code...

You might try the movie explorer (Window-> Movie explorer, or alt-F3 on a mac)
In it i see some code hidden in the Maze object.
User is offlineProfile CardPM
+Quote Post

alk3ovation
RE: Maze Collision Detection In Flash
8 May, 2007 - 07:31 AM
Post #3

New D.I.C Head
*

Joined: 20 Apr, 2007
Posts: 8


My Contributions
QUOTE(Trogdor @ 8 May, 2007 - 05:48 AM) *

Tbh this is why i realy dislike flash.
It is so hard to find code...

You might try the movie explorer (Window-> Movie explorer, or alt-F3 on a mac)
In it i see some code hidden in the Maze object.


Yeah I definitely would not be using flash if it was up to me, but it's for a class. I tried that but I only found code for the maze object. It references an object calls walls, but I don't know what that is. I can't find any code for it, and as far as can tell, no instances are named walls.
User is offlineProfile CardPM
+Quote Post

Trogdor
RE: Maze Collision Detection In Flash
9 May, 2007 - 01:49 AM
Post #4

D.I.C Addict
Group Icon

Joined: 6 Oct, 2006
Posts: 549



Thanked: 4 times
Dream Kudos: 125
My Contributions
perhaps making a new copy of the original from adobe helps. it looks like some things got lost along the line.
User is offlineProfile CardPM
+Quote Post

kbangel
RE: Maze Collision Detection In Flash
15 Oct, 2007 - 08:11 PM
Post #5

New D.I.C Head
*

Joined: 15 Oct, 2007
Posts: 1


My Contributions
Hi
I am Kbangel and I am new and totally lost trying to make this maze work. Help!
I have a maze with a Frankenstein to go through it and I put some code on the button but I can't figure out where the other code goes to make work. It should say you won or loser. I am so lost but my friend made hers work. Can anyone help me?

var timelimit:Number=500;
thetime=timelimit;
_root.onEnterFrame = function(){
If(thetime<1){
time ran out
goAndPlay(2);
}
}

this is the code on my button:
on (release) {
gotoAndPlay(1);
}

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 03:32PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month