Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

movie script needed

Status
Not open for further replies.

quest00

Technical User
Jul 27, 2000
22
0
0
NL
I am working on a new project
I am trying to get a certain tune activated (castmember) when the curser moves
over a certain area on the stage ,without using sprites .

I would be verry happy if someone could help with some basic scripting.
Paul
 
Try using the inside function. For example:
if the mouseLoc.inside(rect(20,20,60,60)) then
alert "inside"
end if

But this will result in a problem. If you go to another frame, this effect will still linger on.
So currently I specify another condition to make sure that the effect is removed when it goes to another frame.

But is there any other way?
Any comments are welcome. Thanks.
 
Gaz
thanks for you re respond
Could you give an example how the script would look like
how do i start? end what would be an end
 
Ok.
First, you need to determine the area for detecting the mouse. Drag a dummy sprite onto the stage and adjust the position and size to fit the area. Take note of the sprite's rect(the 4 numbers). That will be the area.
After that, you can delete away the sprite.

Now, go to a frame script and write this:
-----------------------------------------
property pArea

on beginSprite me
pArea = rect(the 4 numbers)
end

on exitframe me
go to the frame
if the mouseLoc.inside(pArea) then
alert "inside")
end if
end
-----------------------------------------

That's all. Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top