Predetermined scrubbing of a second flash animations
For my thesis I'm busy to setup an experiment to test a new kind of Primary Flight Display interface (aircraft cockpit instrument). I want to do some performance tests on participants on the new one and the current one as control group. The participants are not giving any input, but are watching the instrument displaying different flight scenario's. So the airspeed and altitude are going up and down the whole time. I need to animate all these speed and alitude in- / decreasements myself.
I already animated the airspeed indicator going slowly from 0 to 400 knots. Since the indicator is a bit more complicated than a normal one it would take ages to animate frame by frame if the speed goes i.e. slowly up/ fast up/ slow down/ fast down/ etc, as well as with the altitude tape. Is there a way to use my original animation object (going steady from 0 to 400 knots) and control via a second set of motion tweens or maybe coding. So i can for example let it first speed up from 100 to 200 knots in 20 seconds and afterwards, speed it up from 200 to 250 seconds in 30 seconds.
It's like scrubbing my simple animation back and forwards on different speeds with a shuttle knob, only predetemined.
Anyone a idea how i can do this within Flash?
Otherwise I need scrub the forward and backward while screen capturing it. This only results in a non-flash file....
That should be doable. Instead of letting Flash run your animation, you manually go from frame to frame on a Timer event. You'll have something like gotoAndStop(Math.round(timeElapsed * currentFPS)) in the event handler. When the FPS is higher than normal, some frames will get skipped. As long as the motions are not large, the aliasing problem shouldn't be noticeable.
Now to be more specific: I've seen other people who manage to let the animation go to a frame number based on a variable.
The airspeed are in accordance with the airspeed gauge frame number. Is there a way to let the animation go to the frame based on that airspeed values list? So i need a Gotoandplay(variable). And the variable must refresh itself i.e. every 30x per second according to the list of airspeed values.
This makes it possible for me to let the flash airspeed instrument follow data from real flight (sim) sessions instead of animating all the flight scenarios manually.
Well, it's just a matter of working out at what FPS the MovieClip should be playing at a given point. The math might be somewhat tricky but it's technically doable. Attached is a simple example.
This script works good and is exactly what i wanted in my first post. However I found out this way it would still take my ages if I want to animate a part of a flight.
So I hope someone can point my in a good direction with this not working script. The airspeed indicator (speed) is a MC animated from 0 - 100%. It should feed the next value from the array in every i.e. 30/sec . So this way I can extract real airspeed values from a simulator and feed it automatically into flash without animating anything additional. This would definitely speed up my thesis progress.
I've found some tutorials about arrays, but there they're loading multilpe array values into flash at the same time. I want to only load one variable from the txt at the time and load the next value every time the frame reloads itself (i.e. 30 fps)
var i:URLLoader = new URLLoader(new URLRequest("params.txt"));