|
|
|
Flash Sprite Cusor Changing Movie Script
Added on 3/1/2002
|
|
Compatibilities:
|
This item has not yet been rated
|
Use this script if you have multiple flash sprites that contain buttons. This script removes the need for you to place scripts on each of these flash sprites to effect a cursor change in director. The script runs as a movie script and is available at all times
--I WAS HAVING TO USE MULTIPLE FLASH MEMBERS AND GOT ANNOYED WITH DIRECTORS LACK OF CURSOR CHANGING
--WHEN OVER A FLASH BUTTON. SO I WROTE THIS SCRIPT TO REMOVE THE NEED TO PLACE INDIVIDUAL CURSOR SCRIPTS ON
--FLASH BUTTONS, THEY ALWAYS CONFLICT WITH EACH OTHER :-7
--**TO INSTALL** -- PLACE THIS SCRIPT YOUR CAST, MAKE SURE IT IS A MOVIE SCRIPT!!
--FLASH BUTTON HANDLER MOVIE SCRIPT (VERSION 2.0) - FINAL
--COPYRIGHT DALE SATTLER, 2002
--REVISED SCRIPT (02/03/02) FROM USING MEMBER.NAME TO ROLLOVER()
--ETHICWARE -- IF YOU THINK YOU WILL GO TO HELL FOR THE PROJECT YOU CREATE USING THIS SCRIPT, THEN DONT USE IT
--LET ME KNOW IF IT IS OF ANY USE OR YOU MAKE ANY IMPROVEMENTS
-- my email = = dale@annode.net
--**ENJOY**
global spriteVar, FlashSpriteNumber
--declare our global Vars
on prepareMovie
SpriteVar = the mouseMember
end
on enterFrame
--here we access the mouseMember and set it to a variable
--first error check is that if this is void, then we exit this handler
spriteVar = the mouseMember
-- this has been added to fix bug when over an empty stage area, this will not affect other cursor changes you do
-- on different sprite types
if VOIDP(spriteVar) then cursor -1
if VOIDP(spriteVar) then exit
--more error checking
--if we are not over a flash sprite then the script will not run
--you can check for any member type here and then respond accordingly
--I leave that up to you :-)
if not VOIDP(spriteVar) and spriteVar.type = #flash then getSprite
end
--**BUTTON SEARCHING SCRIPT
on getSprite
--here is where we access the spriteNumber by using the rollover() call
FlashSpriteNumber = rollOver()
case sprite(FlashSpriteNumber).mouseOverButton of
FALSE:
cursor -1 -- arrow
TRUE:
cursor 280 --finger
end case
end
|
|