At last! Some AS3 code! Let’s start at the beginning: loading a AS3 based SWF. Here’s the code:
import flash.display.*;
import flash.events.*;
import flash.text.*;
import fl.motion.*;
this.stop();
//everytime we enter the first frame of this swf perform the preLoad function
addEventListener(Event.ENTER_FRAME, preLoad);
function preLoad(e:Event):void {
var pcent:Number=this.loaderInfo.bytesLoaded /this.loaderInfo.bytesTotal*100;
preloadBar.scaleX=pcent/100;
preloadText.text=int(pcent)+”%”;
if (pcent==100) {
removeEventListener(Event.ENTER_FRAME, preLoad);
this.gotoAndPlay(2);
}
};
Yup, that’s it. 2 objects on the stage preLoadBar & preLoadText.
Broadband recommended as a […]
Leave a comment, 1 so far
Christian Montoya has put up a great new Wordpress theme called Rain in my world, URL: http://www.christianmontoya.com/2006/11/03/wordpress-theme-rain-in-my-world/
I’ll be trying a few WP themes on this blog - so apologies if you arrive here and it doesn’t look like Rain in my world!
But the theme from Christian is excellent and I love the colors and graphics. […]
Leave a comment, 0 so far
http://flare.prefuse.org/
Found the above link on RIAPEDIA. As the Flare site says: Flare is a collection of ActionScript 3 classes for building a wide variety of interactive visualizations. For example, flare can be used to build basic charts, complex animations, network diagrams, treemaps, and more. Flare is written in the ActionScript 3 programming language and can […]
Leave a comment, 0 so far
This being the first post for Design:Code:Repeat I had hoped to launch straight into actionscript programming tutorials, hints and tips etc. (don’t worry I will…) but NO! I just have to get this off my chest - having upgraded from Flash 8 to CS3 recently - I was shocked to find European customers were expected to pay a lot […]
Leave a comment, 1 so far