PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.8.0
Code Block Pro – Beautiful Syntax Highlighting v1.8.0
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / samples / actionscript-3.sample

actionscript-3.sample in Code Block Pro – Beautiful Syntax Highlighting 1.8.0, at build/shiki/samples/actionscript-3.sample

27 lines 993 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 private function createParticles( count ):void{
2 var anchorPoint = 0;
3 for(var i:uint = 0; i < count; i++){
4
5 var particle:Object;
6 if( inactiveFireParticles.length > 0 ){
7 particle = inactiveFireParticles.shift();
8 }else {
9 particle = new Object();
10 fireParticles.push( particle );
11 }
12
13 particle.x = uint( Math.random() * frame.width * 0.1 ) + anchors[anchorPoint];
14 particle.y = frame.bottom;
15 particle.life = 70 + uint( Math.random() * 30 );
16 particle.size = 5 + uint( Math.random() * 10 );
17
18 if(particle.size > 12){
19 particle.size = 10;
20 }
21 particle.anchor = anchors[anchorPoint] + uint( Math.random() * 5 );
22
23 anchorPoint = (anchorPoint == 9)? 0 : anchorPoint + 1;
24 }
25 }
26
27 // From https://code.tutsplus.com/tutorials/actionscript-30-optimization-a-practical-example--active-11295