PDA

Click to See Complete Forum and Search --> : Flag wave effect help

Robybob
06-30-2002, 10:32 PM
I would like to make a bitmap picture of a flag wave like in the movie below:
http://www.flashkit.com/movies/Effects/Special_Effects/Image_Sp-Mike_Car-5398/index.php

The one selection(wave)is the one I am talking about.

It is difficult for me to learn from that how the wave selection could be programmed. It has alot to do with math so I thought I would include this in this forum.

In this post they referred to a website that uses this effect in its opening.

http://www.che-lives.com/

Thanks!

07-02-2002, 04:41 AM
mabey try this;

Robybob
07-02-2002, 01:02 PM
Hey thanks! I think that it is going to work.

_aable-not2day-
10-13-2004, 12:17 PM
Hi, i followed the tutorial link here and it didnt work.

I need to make a black and white chequered flag in flash.

im guessing i need sine?

any ideas to get me going would be great! :)

Lexicon
10-13-2004, 03:53 PM
Assuming you have split your image up into slices and laid them out o stage you can use this kind of function to apply the sine wave, giving the flag effect. You will need to name your flag slices as "flag1", "flag2" ..... "flagN" etc.

// settings //
var numSects = 20; // Number of segments in your flag
var startY = 20; // mid y point
var size = 20; // size of flag movement
var speed = 10; // smaller = faster speed
// -------- //
var inc = (2*Math.PI)/numSects;
var w=0;
// onEnterFrame action
this.onEnterFrame = function(){
for(i=1;i<=numSects;i++){
this["flag"+i]._y = startY + Math.sin((w/speed)+(inc*i))*size;
}
w++;
}

_aable-not2day-
10-13-2004, 08:30 PM
Hi, Cheers man, thats excelent. im gonna have a go, and if you dont hear any more, thanks again. :smoov:

_aable-not2day-
10-14-2004, 07:29 AM
I feel a bit lazy now because ive had to do barely anything to get what I needed to work!

ive been having a play today, its a brilliant method. although i tweeked it a bit to get what I need.

good work fella!

:D :D :D

Lexicon
10-14-2004, 08:37 AM
Enjoy :D

Once you know the methods, it only takes a couple of seconds to code so no need to feel lazy :domo:

ref83
03-02-2006, 04:29 PM
hi everyone

an old thread, but i cant work out how to do this! need to get a nice cheqeured flag effect...any ideas?!

thanks!