PDA

View Full Version : On Mouse Event q


Rebel6
11-05-2002, 08:17 AM
I have a button and a bitmap, I want to be able to click on the button and make the bitmap rotate 180deg. Can someone walk this n00b thru this please...

sfa
11-05-2002, 08:54 AM
Change the bitmap to a MC and give it an instance name of "pic" for example. Then put the following code on the button -

on(press){
pic._rotation = 180;
}


SFA

Rebel6
11-05-2002, 05:44 PM
MC??? Sorry I don't know that a MC is...

Xansi
11-05-2002, 09:37 PM
Rebel6: MC = Movie Clip. :)

:D

sfa
11-06-2002, 06:21 AM
Selecet the bitmap, click F8, select movieclip and press ok.

SFA

Ricod
11-08-2002, 03:05 PM
You may want to try out some of the supplied tutorials already available in Flash. They're not always that clear, but the most basic are a great help to get you started.

Rebel6
11-11-2002, 01:59 AM
I'm such putz... Here is a link to the source, what did I do wrong?

mt1performance.com/test.fla

TIA

sfa
11-11-2002, 06:44 AM
Firstly, the motorbike MC has no iunstance name (pic) so the path would be wrong. also, the button you are using is in fact a movie clip and all code placed on an MC refers to variables or MCs inside the MC. There for the code needs to be changed to -

on(press){
_root.pic._rotation = 180;
}

or

on(press){
_parent.pic._rotation = 180;
}


SFA