The below code is make hotspot bounced.
But the issue is to pass properties of hotspot set in the action to callWith() action.
What I want to be is that..
1. check if hotspot property 'bounceState' is set or not.
2. not set, then set 'down.
3. is set as 'down', then set 'up' and callWith() bounce action ifself with the property(bounceState) as set as Number 2.
The problem is...
1. I think the properties not passed to callWith() action. What's the solution on this problem?
2. if statement the following "if(currentBounceState === 'down'," is not working.
============ hotspot code ===========
<hotspot name="pointfinger"
url="%SWFPATH%/gui/pointfinger.png"
rotate="180"
ath="-26"
atv="0"
enabled="false"
onloaded="bounce()"
zorder="3"
>
</hotspot>
============== action code =====================
<action name="bounce">
copy(hs, hotspot[get(name)]);
set(bounceRange = 5);
trace('1 - ',get(hs.bounceState));
if(get(hs.bounceState) === null,
set(hs.bounceState, 'down');
trace('2 - ',get(hs.bounceState));
);
copy(currentBounceState, get(hs.bounceState));
if(currentBounceState === 'down',
set(hs.bounceState, 'up');
trace('3 - ',get(hs.bounceState));
tween(hs.atv, get(hs.atv)-1*get(bounceRange),1,default,callWith(hs, bounce));
,
set(hs.bounceState, 'down');
tween(hs.atv, get(hs.atv)-1*get(bounceRange),1,default,callWith(hs, bounce));
trace('4 - ',get(hs.bounceState));
);
trace('5 - ',get(hs.bounceState));
</action>