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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

different rollover behaviours on various areas of one sprite

Status
Not open for further replies.

luckyy

Technical User
Sep 29, 2001
40
AU
Is it possible to assign different areas of one sprite to various rollover behaviours ie: on mouseEnter, mouseLeave etc?

Thanks guys

 
If the sprites are swf's then it would not be too difficult, but any other kind of media I am not sure of.
 
I suppose its very possible theres a better solution then this, but you could always devide the sprite into different pictures with Photoshop or something and then puzzle them together in director, thus getting what looks like one picture in a finished project alltho its actually several objects with different behaviors.
 
Could you tell me how to divide the swf into sepearate areas archerofloaf?
The problem is i cant make it seperate sprites as it is a timeline which scrolls when a charcter walks along it,

thanks
 
Well, what you can do create different "hotspots" with Flash swf. For instance, say you have one large background in Flash and you want a certain rock in the Flash swf to be active. You could then select the rock and make it a button.
Then in Director you can create a sprite behavoir using.

So I want the movie to go to a different frame when a mouseOver the rock, the script would look something like this:

on mouseWithin
if sprite(2).hitTest=#button then go to frame 5
end

You can also distinguish the hitTest by #normal (any filled area), #background (obviously the background that is not a fill color) and #editText (any editable textfield)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top