To make the animation rewindable, it needs to be all on one timeline for starters. With no movieclips doing anything complicated that will look weird if everything is going backwards while they are going forwards. Flashing or jiggling, or something like that is fine, but it has to work backwards and forwards.
Graphic symbols are fine, because they will play backwards as the movie clip goes backwards.
Anyway...
In order to make the clip go backwards:
clip.addEventListener(Event.EnterFrame, goBack);
function goBack(evnt:Event):void {
clip.prevFrame();
}
In order to get the clip to stop going backwards, either once it gets to the beginning, or at certain points along the way, put code on the relevant frames inside the movie clip that checks if the eventListener exists, and if it does, removes it.
I hope that was clear enough.
A diary about programming problems - to help me more easily learn from (and Google) past mistakes.
Tuesday, 22 July 2014
Friday, 4 July 2014
Flash: How to make the white transparent in a grey scale image
What if you want to get a picture and colour it in, but you don't want it to take forever, or lose any of the detail?
(Apologies if this can be done more easily in another program, but when it comes to pictures, I'm most comfortable with Flash.)
1) Find your image, the more contrast the better - ie, some really light areas and some really dark, the less grey the better.
2) Copy and paste it into flash.
3) Turn it into a movie clip, select it, and in the Properties box, select Adjust Colour, and increase the contrast. Try to choose an optimum value where you can see the details you need, but the grey areas have turned white.
4) Then choose the blending option Darken. The white areas should now be transparent.
5) Lock the layer of the photo, and create a new layer underneath. With this layer selected, draw lines to delineate the blocks of colour you want to show through the image. You can apply fills with gradients, or make areas of colour into movie clips and give them glows as ways of mixing colours etc.
6) If you want to make the lines darker, you can copy and paste the movie clip on top of itself (this way it will have the same contrast settings) and set the blending option of the one on top to Multiply.
Example:
I'm no artist, and I'm not claiming that mine is an improvement on the original, but I am claiming that this didn't take me very long at all.
(Apologies if this can be done more easily in another program, but when it comes to pictures, I'm most comfortable with Flash.)
1) Find your image, the more contrast the better - ie, some really light areas and some really dark, the less grey the better.
2) Copy and paste it into flash.
3) Turn it into a movie clip, select it, and in the Properties box, select Adjust Colour, and increase the contrast. Try to choose an optimum value where you can see the details you need, but the grey areas have turned white.
4) Then choose the blending option Darken. The white areas should now be transparent.
5) Lock the layer of the photo, and create a new layer underneath. With this layer selected, draw lines to delineate the blocks of colour you want to show through the image. You can apply fills with gradients, or make areas of colour into movie clips and give them glows as ways of mixing colours etc.
6) If you want to make the lines darker, you can copy and paste the movie clip on top of itself (this way it will have the same contrast settings) and set the blending option of the one on top to Multiply.
Example:
![]() |
Before |
![]() |
After |
Subscribe to:
Posts (Atom)