Home Tutorials Forums Articles Blogs Movies Library Employment Press
Prev Previous Post   Next Post Next
Old 06-29-2012, 03:42 AM   #1
DKNMSIS
Registered User
 
Join Date: May 2012
Posts: 23
Default on mouseclick logic for timeline animation

So there is a movieclip that goes through certain stages in a Breaking,BrokenLooping,Fixing,brokenPermenant animation cycle

I'm just starting to make the actionscript for it but I'm not sure how to go about it, or if the logic is sound. I am a bit new to actionscript

i assume i can make a function like this
Quote:
function myButtonAction(eventObject:MouseEvent) {
trace("you clicked on the button ");
}
myButton.addEventListener(MouseEvent.CLICK, myButtonAction);
where myButton is the instance of a button movieclip ontop of the movieclip

__________________________________________________ __________

The general idea is that randomly things will break and stick in a broken loop, then you have to start taping the screen to repair it until fixed or else it permanently breaks

*note that the fixing animation cycle is backwards so that positive on the timeline is it slowly breaking - you tap to reverse frames and "repair"


the logic goes like this (at the start of the looping broken animation)
on user input (mouseclick)
-goto frame (xx) (end of fixing animation)
-stop() for 1 second (stopping so it doesnt just enter next animation cycle)
..... -if user input yes (tap/click)
......... -go back one frame [currentframe -1]
......... -stop() for 0.100 seconds then play()
......... - or if time between taps is less than 0.100, then play
..... -if user input is no (no tap/click)
......... -play()


I'm not sure if that handles all the possibilities but i guess ill find out as i go.

does anyone have any advice on how to start this or if i am missing anything?

Last edited by DKNMSIS; 06-29-2012 at 03:44 AM.
DKNMSIS is offline   Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:07 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.