# Please help turn AS2 Smoke into AS3 smoke?

**URL:** <https://forum.kirupa.com/t/please-help-turn-as2-smoke-into-as3-smoke/267292>\
**Category:** Uncategorized\
**Created:** [July 30, 2008, 12:37pm UTC](https://forum.kirupa.com/t/please-help-turn-as2-smoke-into-as3-smoke/267292 "2008-07-30T12:37:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yokiki](https://avatars.discourse-cdn.com/v4/letter/y/258eb7/32.png) [@yokiki](https://forum.kirupa.com/u/yokiki)\
**Post date:** [July 30, 2008, 12:37pm UTC](https://forum.kirupa.com/t/please-help-turn-as2-smoke-into-as3-smoke/267292/1 "2008-07-30T12:37:12Z")

</div>

hi,

I found a great smoke tutorial here: [www.pixelhivedesign.com](http://www.pixelhivedesign.com)

I have been trying to turn this actionscript 2 into actionscript 3… is that possible?

[FONT=monospace]  
[LIST=1]// ------------------------------------------------  
// Realistic Smoke Effect - [www.pixelhivedesign.com](http://www.pixelhivedesign.com)  
// ------------------------------------------------  
fadeSpeed = 1; // Smoke fade speed.  
floatUpSpeed = 2; // Smoke float up speed.  
// Every frame attach a puff of smoke.  
this.onEnterFrame = function(){  
// Get next available depth.  
d = this.getNextHighestDepth();  
// Attach a puff of smoke.  
aPuff = attachMovie(‘aPuff’,‘aPuff’+d,d);  
// Set initial scale to 10%.  
aPuff.\_xscale = aPuff.\_yscale = 10;  
// Put puff where the mouse is. (add small random)  
aPuff.\_x = Math.random() \* 5;  
// Randomizes the starting animation for realism.  
aPuff.gotoAndPlay(Math.round(Math.random()\*20));  
// Smoke will animate each frame.  
aPuff.onEnterFrame = function(){  
// Scale smoke up.  
this.\_xscale = this.\_yscale += fadeSpeed;  
// Fade smoke.  
this.\_alpha -= fadeSpeed;  
// Smoke floating up.  
this.\_y -= floatUpSpeed;  
// When smoke is 100% scale, remove it.  
if(this.\_xscale \>= 100){  
this.removeMovieClip();  
}  
}  
}  
[/LIST]  
[/FONT]  
Can anybody help me? at the moment im getting lots of access of undefined movie problems and it also doesnt like Attachmovie…

Any help would be brilliant, Thanks very much!
