Wondering about the leica-camera.com arrow particle effect?

Hey guys, http://www.leica-camera.com/

when you goto the site and roll over 1 1/2 love stories, theres this arrow that’s created with particles. I’m wondering how the arrow is created. any ideas?

Yeah the delay parameter in the tween engines like fusekit, tweenmax, tweener etc is a bliss. I use it constantly when tweening multiple objects! :slight_smile:

Anogar: could you explain in plain words how your createTriangle function works?

My approach for this would be to have a movieclip an then start putting objects over it with some margin. When the object gets “outside” the movieclip start a new line of objects, until it gets outside again, like pressing “enter” on the keyboard. But I’m no hard core programmer and I really don’t understand your approach… which I’m sure is better.

Thx!

Hey there Pier25.

In plain words, you pass the width of the base to my function - so if you want a triangle that starts out at 15 particles at the base, you’d say [FONT=courier]createTriangle(15)[/FONT]. The function then creates 15 new particles with that [FONT=courier]for loop[/FONT], and it incrementally positions them. I randomized the position so that it doesn’t look quite as static.

After the for loop creates the first 15, it moves the positioning forward by the spacing amount on both the X and Y axis and the function calls itself (this is called a recursive function) - but it reduces the amount by 2 particles, so the second time around it’ll only create 13 particles. This creates the triangle. It keeps creating new columns of particles as long as the number of particles is greater than 0. (Otherwise it’d crash the player, since it’d keep going infinitely).

It’s worth noting that this simple function needs to be passed a good starting variable or it’ll end up without a ‘point’.

Hopefully that helps. Let me know if I missed anything. :slight_smile:

*edit:

*By the way, I’ve been using TweenLite/Max lately - it’s a much better engine. :thumb:

Here’s something similar.
[U][COLOR=“Blue”]http://www.byrographics.com/AS3/thingamabob/thingamabob.swf[/COLOR][/U]

stop();
import gs.TweenMax;
import fl.motion.easing.*;
import flash.display.StageScaleMode;
stage.scaleMode = StageScaleMode.NO_SCALE;

stage.addEventListener(MouseEvent.CLICK, thingamabob, false, 0, true);

function thingamabob(event:MouseEvent):void {
	TweenMax.allFrom([a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v], 1.5, {alpha:0, delayIncrement:.1, x:0, y:0, bezierThrough:[{x:100, y:200}, {x:400, y:400}], orientToBezier:true, ease:Cubic.easeOut});
}

Ok I get it! Thx for the explainning :slight_smile:

BTW I just started using tweenMax/Lite just today on my first AS3 project and it’s really good.

I don’t know if it’s simply because as3 is faster, or tweenMax is great, but the animations now are really awesome!

I don’t know why I was so lazy about learning AS3!! :smiley:

[QUOTE=snickelfritz;2334129]Here’s something similar.
[U][COLOR=“Blue”]http://www.byrographics.com/AS3/thingamabob/thingamabob.swf[/COLOR][/U]
[/QUOTE]

Wow… I think I’m gonna try some particle stuff very soon. It’s so simple and so eye candy :slight_smile: