Is there a way to bend, twist, slice images (jpg) imports?
I saw a picture of a horse turned into a flag waving in the breeze, using something called anfyFlash (or amfyFlash).
Is there a way this can be done without, for eg, splitting an image into many vertical slices and then apply a sine wav. That is, is it possible to just load any image, complete, and apply some magic? Without blowing out the file size or overloading memory?
Right now KoolMoves supports only limited Raster graphic transformations such as applying transparancy, Rotating, Flipping, ECT. Appending a frame and flipping it will make youir image spin but I think you want a diffrent effect here?
Complex raster transformations, edits, are handled right now through an external editor. You can set up several editors and choose the one you want to make the edits in. The place that you set up editors is under file> preferences.
I had a look at the anfyflash site, they seem to specialise in image (raster) manipulations.
It would be neat if flash allowed some way to manipulate the rendered image, eg, grab a block of memory and move it somewhere. But then it wouldn't be flash, I suppose.
About Anfy:
Before seeing "AnfyFlash" I used AnfyTeam's "AnfyJava".
This "AnfyJava" software used extensive maths that would manipulate
each line of pixles in the image to create the effects. They most
likely took their ideas in the software for java and ported them
into their flash software.The effects are nearly the same.
___________________________________________
A Wish for KoolMoves:
I would like to see perspective applied to image fills when an
object is slanted for perspective. That may be a far off feature in KoolMoves.
DocRee
I visited the anfyflash site and took a closer look at their moving flag example. Thw width of that movie is 200px. What they do is slice it up in 50 slices with a width of 4px and move the slices seperately (calculate the vertical position) to create the moving effect.
The size of the swf file is nof very big because they do slice it dynamicly. I assume they create virtual slices by duplicating the image as a movieclip and masking out different parts. This would also be the most logical approach if you want to recreate the effect I think.
I need some software that will slice bitmaps into thin strips, in real time, and dish up the bits to flash. Diced images on toast! Might try to use some of the .net stuff available via c# etc.
Actually, first I think I'll try duplicating an MC with a bitmap and see what it does to the swf file size. And to user memory. And if I can get masking working across all those levels.
Have a prosperous 2003.
Addendum: The result - everything is perfect, except ...
The masking should, in theory, work really well with AS to create a tiny swf, smallish image, very good load speed!
Image is loaded into a movie clip.
This is duplicated.
Clips are shifted along a sine wave.
Masking clips are assigned to image clips.
Works great, except ...
... the masking won't work.
lol.
I guess setMask is not yet supported in KM. Putting masked shapes in the clips only seems to mask anything in the clip itself. I don't have a clue what to do to get around this.
setMask is supported. I tried for a while and got a working flag example.
I do know some math but didn't know how to get the flag to move on the right side and to be static on te left like a real flag. If someone wants to figure that out and maybe add a moving shadow go ahead.
Regarding the masked loaded jpg, I tried it and had some problems when I did the Image browser demo on my site. I will have to play with it again to see if it will work in KM....
Owen, It wasn't a real twist only a narrow down. In the example I posted I only used values 0 - 100 foor the yscale. If you want a real twist (image flip upside down and back again) you should also use negative values. Replace some of the wave calculating code with the following or just add it.
for (w=0;w<(4* Math.PI);w+=(2* Math.PI / slices /2)){
s=Math.round(Math.cos(w)*100);
y=Math.round((image._height/2)-(s/100*image._height/2)+12);
ay[wavelength]=y
as[wavelength]=s;
wavelength++;
}
I prefer to be called by my first name (Wilbert) but when I registered to the forum that wasn't available anymore
Hilary, while you are playing maybe you could also try to duplicate a loaded jpg with duplicateMovieClip. That also didn't work when I tried it.
Hi Bob, the image load works and the image mask works, they just don't seem to hang together.
-> My only way to debug these problems is to see a working example made in Flash and to compare it to what Koolmoves is creating. So I would appreciate a working Flash created example.