DPChallenge: A Digital Photography Contest You are not logged in. (log in or register
 

DPChallenge Forums >> General Discussion >> flash5 action script
Pages:  
Showing posts 1 - 1 of 1, (reverse)
AuthorThread
01/27/2004 03:53:04 PM · #1
i know i am in the wrong place - but..

if anyone knows flash5 action script - please read on.

i am trying to have a button control a masked movie that is loaded into the main movie - at that point there i would like a button to control the movie behind the mask - fine so far - how i would like the motion is smooth easing - so i set up a simple prototype


movieclip.prototype.slideup = function(dist) {
if(dist > 0) {
_y -= dist/5; // move the item up 1/5 the total distance
dist -= Math.ceil(dist/5); // recalculate distance based on above
}

}


on the button


on(press) {
_root.loader_main.list.slide(320);
}


so i would think that the code in the prototype once the button has been pressed would continue to run ( 5 times total ) as a result the movie will slide upward at a slower and slower rate until it is in the correct position, however - the button only allows one loop through the prototype code, and hence only partially moved the masked movie.
i have tried a number of different methods, like hitTest on an MC - but it keeps going until you move off the MC, among other things - i thought is what a prototype was for... ugh

of course in MX its easy as pie - but debugging MX code in a flash5 debugger is quite a nightmare,.\

any thoughts appreciated
Pages:  
Current Server Time: 09/22/2025 01:35:14 PM

Please log in or register to post to the forums.


Home - Challenges - Community - League - Photos - Cameras - Lenses - Learn - Help - Terms of Use - Privacy - Top ^
DPChallenge, and website content and design, Copyright © 2001-2025 Challenging Technologies, LLC.
All digital photo copyrights belong to the photographers and may not be used without permission.
Current Server Time: 09/22/2025 01:35:14 PM EDT.