...

View Full Version : linking .fla's and collision problems



Estellio
03-27-2008, 07:02 PM
I am painfully new to actionscript and have been given an assignment to make my own flash game for college. The game is simple, move a duck through a maze without touching the lava. I got the duck to move and everything else to work but I've hit two snags I was wondering people can help with.


1) When it comes to collision, I can only find tuts that tell me when the collision happens. What I cant get to happen is when my first movieclip (the duck) comes into contact with another movieclip (the lava) the graphic changes from that of a duck to that of fire. I just don't know what to write!


2) Can you link from one flash movie to another? I want to make a splash screen with a play button to pop up when you start the application and when you hit play it will start the game. The only information on linking I've found online is linking from flash to a webpage. Would it be better to use another program?


3) A decent tutorial site for actionscript since I wasn't able to find the answer to any of my questions on my own :P

Thank you for your attention.

gnomeontherun
03-28-2008, 07:37 AM
College means this is homework which means it violates the rules to ask for help.

1) Most of the time when you find a tutorial it doesn't give you EXACTLY what you need. Hence the purpose of tutorials, to give you a headstart but not to do all of the work for you. So logically when you find a tutorial that allows you to detect a collision, then make a function that runs then.

2) Why link Flash to Flash when you could make just one file for this?

3) http://www.codingforums.com/showthread.php?t=126424

Good luck, but please read the rules before posting about homework.

_Aerospace_Eng_
03-28-2008, 07:38 AM
You can ask for help but don't expect us to do the work for you.

1.5) No homework assignments - Do not post your entire homework assignment and request that other members do it for you. This is considered cheating, and your thread may even be used by your school to prove your guilt. Now, you may ask for advice or help on a specific aspect of your assignment that you're having trouble with. Use common sense as far as what's acceptable in terms of soliciting help with homework assignments.

Estellio
03-28-2008, 12:42 PM
Now, you may ask for advice or help on a specific aspect of your assignment that you're having trouble with.


I didn't post up the specifics of my brief or ask anyone to do it for me. I asked

1) How do you change a graphic on collision
2) Can you use Flash to link a splash page to the game itself or would it be better to use a different program.

I even asked for tutorials to help me find this out, not straight answers and
I have searched the internet for a decent tutorial, even the ones you linked me but it's mostly teaching you to use Flash, which I can do, it's Actionscript I have trouble with. I'm here to learn Actionscript afterall.

In any case, back to the code. If you want more detail with the trouble I'm having, what I was trying to achieve was that when the duck hit the lava the graphic changed from a duck to fire. I've tried a few ways to do this but none work.


onClipEvent(enterFrame){
if (ball.hitTest (puddle)) {
(what do I put here?)<- I can't figure out how to change the graphic
}
}
If there is a 'get graphic' command please, just let me know and I'll figure it out on my own from there.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum