If you want to position the flash top/left and not have it scale when you resize it’s bounding box window, you can set the following code. stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; For full documentation from Adobe take a look here.
Remove an onRelease Handler
After creating a onRelease handler in Actionscript 2 as follows: myMovieClip.onRelease = function() { doWhatever(); } ..you then want to remove the handler for whatever reason, you can remove it like this: delete myMovieClip.onRelease;
Online Flash IDE Anybody?
Anyone up for an online Flash IDE? Take a look at this: http://antimatter15.com/ajaxanimator/build/ Nice work!
Papervision Event Listener Idea
The problem: While working on a Papervision3D Flash Project I had a problem where a back button that sits above the 3d canvas and acts as a main navigational item was required to change Events according to where the site was in 3d space at the time. The solution: Everytime I’m about to add a
Read More…
Clear an array in Actionscript 3
I personally really like this way of clearing an array’s elements: Declare your array to use: var myArray:Array=new Array(); Add elements: for (var i:Number;i<10;i++) { myArray[i] = "an item"; } Clear the array: myArray.length = 0;
Adidas
I came across this site today: http://www.adidas.com/campaigns/adidasdfb/content/locale/com/?strcountry_adidascom=uk It is a game made and run on the adidas site.. Play it, it’s quite cool. Nice flash site to whoever made it!
Transparent swf in html
So you have now placed a swf file into your html page and you want to be able to see through it. Lucky for you, this is a very easy thing to do! The following code does the trick: <object type=‘application/x-shockwave-flash’ data=‘flash/home_side_left.swf’ width=’40px’ height=’550px’> <param name=‘movie’ value=‘flash/home_side_left.swf’ /> <param name=‘bgcolor’ value=‘#ffffff’>
Read More…
What is CWS>+?
So what the heck kind of file starts with the characters “CWS>+” ? That would be a flash swf file!
Papervision error 1046
Error: “1046: Type was not found or was not a compile-time constant: InteractiveScene3DEvent.” I got this this morning when I opened up a project I have been working on. I was using the Flash IDE to compile and FlashDevelop to code in as I am not the biggest fan of the Flash IDE for coding
Read More…
16000 Limit!
Today I discovered that Flash truly has a limit! 16,000 frames: Exceeding this limit causes the movie playback to stop. While this limit is rarely reached by most developers, it is possible. If your movie must have more than this number of frames,try creating multiple movies with fewer than 16,000 frames each and then linking
Read More…
Trying to get variables into flash from the browser!
Ever wondered how to get variables from an html page to a flash element? Well, it’s quite easy using the following actionscript 2 example: I use javascript to embed my flash elements: <embed src=”somefilename.swf?varname=varvalue&vartwo=var2value” width=”550″ height=”400″></embed> Now in Flash I can just call: _root.varname and it will give us `varvalue` _root.vartwo will give us `var2value`
Read More…
Flash Tweening
tween is an actionscript class and can be used after importing the core files. import mx.transitions.Tween; import mx.transitions.easing.*; //Tween( obj:Object, prop:String, func:Function, begin:Number, finish:Number, duration:Number, useSeconds:Boolean); e.g. var myRot:Tween = new Tween(myText, "_rotation", Elastic.easeOut, 0, 360, 3, true);





