Rollover

Your help is needed!! I want to create a menu which comes in from the side of the page when the mouse is placed over it. (When it is off the page it looks like a tab). To do this I used this code:

on (rollOver) {
gotoAndPlay(2);
}

on (rollOut) {
gotoAndPlay(30);
}

That works fine, the problem I’m having is putting buttons on the menu when it slides out. I have got the button as a symbol and put on this code:

on (release) {
_root.gotoAndPlay(“Products”);
}

This normally would work but as it is on a rollover image then you click on it, it doesn’t work (you can see the button ok).

Any ideas on how i can do this or will I need to do something else other than a rollover. Cheers for any help (-: .

mart

maybe include the fla or a swf to preview?

use,

onClipEvent(mouseDown){
if(this.hitTest(_root._xmouse, _root._ymouse, true)){
//action
}
}

because clipEvents are registered before on
Though, you should use frame-based codes, see:
www.n99creations.com

http://www.n99creations.com/?pID=tutorials&col=Blue&tut=basics_of_actionscript_for_flash&p=1&l=Flash_MX_04

Exact link

Thanks for the quick replys guys!! Here is a link to the site

http://www.pensworth.co.uk/test/webtest.htm

I don’t know how to upload the actual .fla file to this forum:sure:

I have tried the code, but to no avail (to be honest i’m not too sure how to use it!).

Cheers!


onClipEvent(mouseDown){
if(this.hitTest(_root._xmouse, _root._ymouse, true)){
//action
}
}

Put that on the items, then replace the “//actions” text to the action you want it to do

It works!! Thanks mate! I put the code in before but as the products mc is text you had to click exactly on the text for it work work (solved with a transparant rectangle).:thumb:

:player: Be sure to read my tut :smiley:

martc, how do u made ur site http://www.pensworth.co.uk/test/webtest.htm
to keep on repeating the image from left to right??? actionscript or just normal movie tweening. thxs

www.n99creations.com
in the archives, go to the chopper rescue game, the water does that :wink: