Groups | Blog | Home
all groups > flash actionscript > october 2007 >

flash actionscript : Hypercard dinosaur question


DMennenoh **AdobeCommunityExpert**
10/13/2007 9:10:28 AM
The on functions are bad choices as they are too general. You should use
movieClipInstance.onRollOver = function(){} then, what you could do is start
a timer, and execute a function in say .5 seconds - in the onRollOut
function you clear the interval. Here's a sample:

var timer:Number;

function mouseStillIn(){
trace("still in");
}

myBtn.onRollOver = function(){
timer = setInterval(mouseStillIn, 500);
}

myBtn.onRollOut = tito.onReleaseOutside = function(){
clearInterval(timer);
}


HTH

--
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/

chopTheWood
10/13/2007 1:50:15 PM
Three thousand years ago I was a baby Hypercard programmer and Hypertalk was my
language. HC was arguably the killer app. of its time. Though I've essentially
buried HC a long time ago I still think of it now and then when I reach for a
Flash built-in function that isn't there -that I thought was there- and realize
I was just having a HC flashback.

This happened just now when I typed "on ( " into the Flash editor and saw my
choices listed for the next word: press, rollover, rollout etc. What I wanted
was to see something like "mouseStillWithin". Incredibly useful, I remember,
from the old daze. When the mouse rolls over a button (and stays there for a
second, instead of zooming over several other buttons in about that same time,
it executes. So the question is: What can be used as a Flash equivalent to on
(mouseStillWithin)? Anyone old enough out there to remember this? I would like
to recommend to Adobe that this be added to the current choices that the editor
offers.
thanks
kglad
10/13/2007 2:08:42 PM
AddThis Social Bookmark Button