well i am still kinda tweaking my minimizable box… and the next step is to have a button to make it move to the bottom of the stage with inertia… zylum gave me the code for inertia.
and i can do the onClipEvent (enterFrame) with the inertia movement, but what i want is to put this on a button so when i press the button, the MC called window with slide to the bottom with inertia…
this is what i have now:
i have 2 MCs on the main timeline, one called window and one called minimize, the minimize has these actions on it:
[AS]
on (release) {
window.onEnterFrame = function() {
window._y = window._y-(window._y-385)/4;
}
}
[/AS]
and thats it…
i got it semi-working… when i press the button it kinda works, you gotta see it, i would post the .fla but its too large… if you think you can help… ill email you the .fla
now i have 2 MCs on the main timeline, still ‘minimize’ and ‘window’, on the window MC i have the following code:
[AS]
onClipEvent (enterFrame) {
_root.minimize.onRelease = function() {
_root.window._y = _root.window._y-(_root.window._y-385)/4;
};
}
[/AS]
the current effect is when i press the button ‘minimize’ the ‘window’ moves down with inertia, but moves once each time… ill upload the .swf in a sec
plz help!
reverse your code so the onrelease code is first, then the enter frame… that makes more sense. If you think about it, the way you have it now, it is looking for the onrelease code every single time it goes into another frame.