dyadica.net

Fun and Games in the Dyadic Sea

Posts Tagged ‘Actionscript’

permalink image comments image
Tuesday, 20 January '09: Force Focus in AS3

When developing in AS3, there are times when you will  need to be able to define the users focus, for things like moving a user onto a desired input TextField, after a page has transitioned or for ensuring that any input code you might have will capture events.

If you search the web, or in the Flash IDE help in reference to setting focus, you might find notes on the FocusManager, IFocusManager, and possibly some details on having to include components for these classes to be triggered. These are all significant in some situations, but for setting focus in everyday AS3, it’s much, much easier.

All you really need to do is use stage.focus property.

As it is a read/write property, by result you are provided with ultimate control. The following details some AS3 code which allows you force focus onto any InteractiveObject – Sprites, MovieClips, TextFields etc:

stage.focus = your_object

So say we have a list of clips stored as an Array like so:

var movieA:MovieClip = new MovieClip();
var movieB:MovieClip = new MovieClip();

addChild(movieA);
addChild(movieB);

var clips:Array = new Array(movieA, movieB);

We could set the focus to movieB by calling the following:

stage.focus = clips[1];

Simple eh. I use a similar system for controlling button tabbing within some of my applications. The above code is fairly psudo so I hope you get the idea.

Tags: , , ,
permalink image comments image
Monday, 28 January '08: Paradox: actionscript architect

Paradox is developed by the same guy who did 3d pathfinding in as3. Developed in the flash format Paradox seems to be a high quality 3d engine full of promise.

paradox-banner-1.jpg

To Jump straight to the demos click on the images, controls e, s, d and f keys + mouse and click.

paradox-banner-2.jpg

For full details check out the following: animasinteractive.com , actionscriptarchitect.com

I must remember to keep an eye on this one.

Tags: , , , , ,
permalink image comments image
Thursday, 5 July '07: 3D Pathfinding in AS3

Of interest to me at the moment especially as Im developing similar in lingo.

paulspitzerpath.png

actionscriptarchitect.com
drawk.wordpress.com

Tags: , , , , , ,

poll tags

css | xhtml | dyadica.net © admin 2010 | powered: wordpress | fuel: ps-wii-elite | top | sign-up