Stuff I am building:


Ted Patrick - Events & Community @ Adobe Systems


Note: This is the personal blog of Ted Patrick. The opinions and statements voiced here are my own.



Central Components via attachMovie

DIGG IT!     0 Comments Published Friday, December 12, 2003 at 7:45 AM .

In working with Central Components, I found it very effective to use attachMovie with the components. There are some tricks to making this work effectively.\0

Central components are RSLs (Runtime Shared Libraries) and observe all the same quirks as with the Flash Player only in this case the components are already on the local machine via the central local file system.

Rule 1:
First you need to present one component on stage to import the Central Component RSL into your application. Once a single component has been presented on stage you can use attachMovie to create any component instance in your application. I add an MIconButton to the left of 0,0 on _level0 of my apps. This keeps it out of view, but imports the RSL for attachMovie use.

It seems that createObject doesn't exist in the Central Player. I recommend using createObject in all areas other than the Central 1 player as it doesn't work.

Rule 2:
The names of the component in the RSL are different than the formal Central names. Simply add "Symbol" to the end of the formal name to get the movieClip instance in the RSL. Here are the component names:

Components:

MAccordionTabSymbol
MCalendarSymbol
MCheckBoxSymbol
MCloseButtonSymbol
MComboBoxSymbol
MDataGridSymbol
MDialogBoxSymbol
MExpandingPodSymbol
MIconButtonSymbol
MIconMenuSymbol
MListBoxSymbol
MProgressBarSymbol
MPushButtonSymbol
MRadioButtonSymbol
MRoundIconButtonSymbol
MScrollBarSymbol
MScrollPaneSymbol
MTextInputFieldSymbol
MTossButtonSymbol

Icons:

icon_close
icon_bookmark_remove
icon_alert
icon_toss-to
icon_bookmark_add
icon_add
icon_favorites_add
icon_favorites_remove
icon_print
icon_remove

Also here are the properties set by the DesignTime components. Using these properties within attachMovie via the InitObj allows you to properly instantiate the Central components as needed.

Central Component Props

3. There are additional components/symbols/classes within the RSL. Here is a list of the export linkages in the RSL.
Central RSL Linkage Ids

There is some interesting stuff in here! Especially the ActionScript versions of Robert Penner's Easing Equations and Ric Ewings's Drawing Methods. Hope they got a credit for the code! Once the RSL is added to your app within Central at runtime, check the Math Object as easing equations are added within.

Cheers,

ted ;)

0 Responses to “Central Components via attachMovie”

Post a Comment

Where to find me:

Ted on Twitter - @AdobeTed
Ted on Adobe Groups
Ted on LinkedIn
Ted on Facebook
Ted at Adobe


Latest

Lists

Links

Jobs

Flex Jobs
city, state, zip

Archives