Welcome Guest [Log In] [Register]
Welcome to Brackenwood. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Rocket Exhaust as an AS; What am I doing?...
Topic Started: Feb 20 2006, 10:04 AM (197 Views)
hoffie_hoff
Member Avatar
°o° -_- ⁿôⁿ
Alright, so I'm going to try to explain what I want as best as I can,

So I have a rocket and a graphic/movie clip w/e of the smoke appearing then dissapating, what I want the action script to do is place the smoke directly behind the rockets current position, leave it there and repeat, this way, I can tween the rocket and not have to worry about creating each smoke effect individualy, thereby keeping a low file size and workload. Also realize I don't know anything about action scripting so anything you tell me will be helpful.
Offline Profile Quote Post Goto Top
 
smoscar_01
Member Avatar
Mid-Level ActionScripter
how did you created your smoke?

could you post an example?
Offline Profile Quote Post Goto Top
 
hoffie_hoff
Member Avatar
°o° -_- ⁿôⁿ
smoscar_01
Feb 20 2006, 10:29 AM
how did you created your smoke?

could you post an example?

Rough thing

Whipped this up in a minute or two, obvious problems include lag, awkward spacing, and repeating graphics, all of which would be a pain to fix by hand but with the help of clever action scripting *cough*Vector*cough* I believe they could be avoided.
Offline Profile Quote Post Goto Top
 
smoscar_01
Member Avatar
Mid-Level ActionScripter
ooh now I get what you wanted :lol: ok heres an easy way to do it:

Code:
 
var posx:Number;
var posy:Number;
var counter:Number;

onEnterFrame = function(){
 posx= rocket._x;
 posy= rocket._y;
 counter++;
 var smoke:MovieClip = _root.attachMovie("mysmoke", "mys"+counter, _root.getNextHighestDepth());
 smoke._x = posx + c1;
 smoke._y = posy + c2;
 if (counter>=val){
   this.removeMovieClip();
 }
}


that goes at the animation frames, ooh and c1 and c2 are two constant values for you to manage the exact position of the exhaust and val is another constant to manage the max number of smoke objects :lol:
Offline Profile Quote Post Goto Top
 
hoffie_hoff
Member Avatar
°o° -_- ⁿôⁿ
Woah, that's insanely helpful! Thanks man!
Offline Profile Quote Post Goto Top
 
smoscar_01
Member Avatar
Mid-Level ActionScripter
your welcome, its nice that it worked for you :lol:
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Actionscript · Next Topic »
Add Reply