- Posted by kajyr on January 10th, 2009
- Tagged: actionscript, AIR, flex, tools
Better than trace or alert, I suggest anyone Arthropod for tracing out debugging information.
It consist in one class to include in your project, and a small AIR app wich contains the console and some easy configuration.
import com.carlcalderon.arthropod.Debug;
Debug.log("My log message");
Supports logging of a lot of types of data: text messages, objects, bitmaps.
Rating: 10 ;-)
- Posted by kajyr on January 10th, 2009
- Tagged: examples, gallery
ABunchOfPhotos is a free, flash based image viewer. It is still just an example, based on a more complex work I’ve done for a client.
Controls
Drag the thumbnails around to move them, double click to enlarge, or to shrink them.
Demo
Demo of ABunchOfPhotos
Download
Download ABunchOfPhotos (it is released under CreativeCommon’s Attribution-Share Alike Licence); If anyone wants, I’ll post the code.
How to use it
Open with your preferred text editor the data.xml file, and modify (and add, and remove) <image> tags for any image you want to show
Upload the files (ABunchOfPhotos.html, ABunchOfPhotos.swf, data.xml and the photos) where you want and open the html, or embed the swf in your own page)
Features
It is fast (8k)
It is free
;-)
- Posted by kajyr on January 9th, 2009
- Tagged: actionscript, api, tips
In Actionscript, the stage object is referenced by the DisplayObject.stage property. I use it alot, for example, to center elements on the screen, but as we read in the api reference,
If a display object is not added to the display list, its stage property is set to null.
this can be uncomfortable when you want to position something before attaching it, for any reason, or if you want a control object to operate on some stage property (fullscreen, for example).
So to avoid this, I usually add a static property to my Document Class, let’s call it staticStage:
GeSHi Error: GeSHi could not find the language actionscript3 (using path /nfs/c03/h01/mnt/85630/domains/nightdrops.com/html/wp-content/plugins/snipplr/geshi/geshi/) (code 2)
Of course, the stage in FlashExample will not be null, since the DocumentClass is always added to the display list.
With this trick, you always have the stage at hand, by simply referencing FlashExample.staticStage anywhere on your code.
- Posted by kajyr on January 8th, 2009
- Tagged: Flexbuilder, svn, tools
In real life, projects need to be kept under control, specially when you work on a team. I usually use subversion, and the TortoiseSVN client for Windows, which I kinda like. But using flex, which is a port of eclipse, I didn’t see a reason why not to use the eclipe svn plugin.
To install subclipse fon Flex just follow these instructions. Remember that you also need to have SVNKit installed.
It’s really easy to use, all options you need are in the Team menu, in the right click over the project list.
Thanks to Samuele for the support with eclipse.
- Posted by kajyr on January 8th, 2009
- Tagged: actionscript, quickreference, tips, TweenLite
One class i really do like is TweenLite. I don’t really like the default tweening engine for a couple of reasons, but mainly because i have to save the tween object in a reference in my class, or the garbage collector could eat it (stopping the tweens in a unpredictable status).
TweenLite don’t require this (it exposes static functions, and keep internal references to the tweens) and permits me to specify functions to be called, not only handlers (which i know, may sound a little ActionScript 2.0, but in fact permits to call any funcion, and so avoiding one-line handlers).
One small example, (to be used inside a DisplayObjectContainer) is fading out a child, and detaching after. In one clear line:
GeSHi Error: GeSHi could not find the language actionscript3 (using path /nfs/c03/h01/mnt/85630/domains/nightdrops.com/html/wp-content/plugins/snipplr/geshi/geshi/) (code 2)
Let’s bring this a step further: we can easily apply this technique to all child of a given container:
GeSHi Error: GeSHi could not find the language actionscript3 (using path /nfs/c03/h01/mnt/85630/domains/nightdrops.com/html/wp-content/plugins/snipplr/geshi/geshi/) (code 2)
So now all the time removeChild is called from outside, the child gently fade away, and then quietly removes himself.