Jump to content

Help With Flash


froggy

Recommended Posts

I'm creating a flash based website.

I have the base page created, I just need some assistance with a bit of coding.

What I want to do, is when the mouse is clicked a movie (gonna be a bullet hole in the screen, then fade away. Don't need help with this ). I have no idea on how to code it so the movie is played where the mouse clicks. I need this so if they wanted, they could click 100 times all over the screen and have each one of those points play the movie.

If you have any advice or answers I welcome them

And if you need more information feel free to post and I'll answer when I can.

Link to comment
Share on other sites

i will explain in more detail later on but basically...

when your animation gets to the point where you want the site to be idle (and not move) - to the state where the user can click. you need to add a " ()stop; " script. create a new layer above all your other layers and call it "code" or something. then put a keyframe where you want the play head to stop and add that code to the actionscript pallet.

now the playhead is stopped until the user does anything.

to define your mouse over areas you need to make shapes / use your existing shapes and convert them into buttons (F8/convert to symbol > button) whatever you want the user to roll over and press has to be a button. dunno if you want just areas or actual buttons. if you just want areas on your site then you can click on a shape and set the alpha to 0%.

double click on each button and you'll get 4 states for the button. you need to set each of these. it's farily self explanitory but its here you set what happens when the button is rolled over, pressed. this is WHAT HAPPENS TO THE BUTTON..not where you add your bullet hole. if you just want it the same then just create keyframes in each box. set the hit area for the user by drawing a shape (where the user an interact) any shape made here doesnt show on the stage.

you said you'd made your bullet hole (i assume its a move clip) - give it a name in the properties pallet so its an instance with a name. i'd create your instance all together in a new timeline by double clicking, then doing the animation for the bullet hole. add a " ()stop " code to that timeline on frame one as above - so the bullet hole is passive until activated by action script.

then basically you can add code to each of the buttons which says "on press/rollover - play instance x(your bullet hole)" so you can just use 1 movie clip bullet hole and have hundreds of buttons. the code will go to and play frame 2 of your bullet animation..when the user interacts.

i'll find the code later...dont have flash on this pc

sorry if that makes no sense :(

hope it helps a lil

Edited by the boon
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...