Ramblings

September 1, 2009

Getting strongly typed objects from flash cs3

Filed under: as3, cool, flash, flex, tip — michaelangela @ 11:53 pm

I have done this for AS2 using Flash Develop, and something similar to it using PureMVC for a Flash CS3 project developed within FlexBuilder, but it’s nice to see it “approved” of sorts. The issue? How do you access objects on the timeline in a strongly-typed manner. The blog post itself describes the situation well and this solution handles it well enough for me. The good thing is with this solution is that the movie clip name can of course change in the FLA and you only have this to update to keep it in sync.

Flex and Flash Developer – Jesse Warden dot Kizz-ohm » Blog Archive » Designer vs. Developer: Declaring Stage Instances

I think I’ve seen this approach in the Essential ActionScript 3 book and I’ve used it.

1. Leave the option turned on, so the Flash IDE will generate all the properties.
2. For every thing I need to refer and use code hinting I would do the following:

private function get scroller { return this[“mcScroller”]; }

or something like this.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Create a free website or blog at WordPress.com.