# code-block-pro/1.13.0/build/shiki/samples/actionscript-3.sample

Code Block Pro – Beautiful Syntax Highlighting, version 1.13.0. 27 lines.

- Page: https://pluginprobe.com/plugins/code-block-pro/1.13.0/code/build/shiki/samples/actionscript-3.sample
- Raw: https://pluginprobe.com/plugins/code-block-pro/1.13.0/raw/build/shiki/samples/actionscript-3.sample
- Modified: 2022-08-22T22:25:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/code-block-pro/1.13.0/code/build/shiki/samples/actionscript-3.sample#L10-L20`.

```
private function createParticles( count ):void{
    var anchorPoint = 0;
    for(var i:uint = 0; i < count; i++){
     
        var particle:Object;
        if( inactiveFireParticles.length > 0 ){ 
            particle = inactiveFireParticles.shift();
        }else {
            particle = new Object(); 
            fireParticles.push( particle );                 
        }               
         
        particle.x = uint( Math.random() * frame.width * 0.1 ) + anchors[anchorPoint];
        particle.y = frame.bottom;
        particle.life = 70 + uint( Math.random() * 30 ); 
        particle.size = 5 + uint( Math.random() * 10 );
         
        if(particle.size > 12){
            particle.size = 10;
        }
        particle.anchor = anchors[anchorPoint] + uint( Math.random() * 5 );
         
        anchorPoint = (anchorPoint == 9)? 0 : anchorPoint + 1;
    }       
}

// From https://code.tutsplus.com/tutorials/actionscript-30-optimization-a-practical-example--active-11295
```
