Hi,
thanks for your help. It works like a charm

I added "set(scale_bak, null);" after the "onout" action to keep various scales for different scaled hotspots.
Sorry for the bad syntax earlier, it probably was a caching mistake. Before that, I used an old code example of Klaus (which also has the problem of tween-time not ending before new tween possible):
|
Quellcode
|
1
2
|
onover.addevent="add(newscale,scale,0.1); tween(scale,get(newscale));"
onout.addevent="add(newscale,scale,-0.1); tween(scale,get(newscale));"
|
Why 0.1%? It was a coding-noob-mistake:
Instead of "0.1", in the beginning I tried with "10%", but it made the hotspot huge.
I didn't understand, that "10%" got interpreted as "10", so I just tried a way lower value "0.1%", which worked fine for me (because 0.1 looked good). Understanding now that it's not percent even though it was written there, it makes much more sense.
This was a satisfying lecture.
Working code:
|
Quellcode
|
1
2
|
onover.addevent="if(scale_back===null,copy(scale_back,scale));tween(scale,calc(scale_back * 1.1));"
onout.addevent="tween(scale,calc(scale_back)); set(scale_back, null);"
|