I have never tried using them like you are (by dragging the components into the director components folder), but I have used AS3 components a lot. The way I do it is to open Flash, add the component to the stage, give it an instance name, and save it as a swf. Then, in director, you would simply import the swf normally and use Lingo like this:
Maybe I'm just missing something really simple, but I can't seem to get it to work no matter what I do.
I've tried the suggestion of making a separate .SWF file with an instance name ("test" in this case) and importing it and placing it on the stage, but within Director, statements such as:
fail with "property not found" on #test.
Even dragging the sprite into the Object Inspector doesn't show me a path to get to the properties that are declared as public in the ActionScript 3 code.
All I need to do is reference the underlying public properties/methods that are defined in the Flash component AS3 code - certainly this must be possible in Director 11.5.9???
According to the online Flash documentation (and the source code for the Flash Component TextArea), the TextArea component defines a public property named selectionBeginIndex. All I want to do is check this value, but every attempt I make to reference it from Lingo results in "property not found".
Does anyone know of a way to simply drag the TextArea component onto the stage and reference sprite(1).selectionBeginIndex?
Many thanks in advance to anyone who can point me in the right direction!
Can you post the CS5 SWC component somewhere so we can test it?
I'm a little hesitant to repost any Adobe components without their consent. I'm using the TextArea.swc files that ship with Director (and the ones that ship with Flash). I've tried the files from Flash CS3 and CS5. Over the last couple of days, I've downloaded the trial version of Flash CS5.5 and copied the TextArea.SWC component from there for testing - same results.
After MUCH research, I am convinced that ALL of the .SWCs that ship with Flash (including CS5.5) are the ActionScript 2.0 versions. It seems that the newer versions of Flash only ship the ActionScript 3.0 versions of the components in an .FLA file (which Director doesn't recognize). Can anyone confirm this?
It also appears that Flash supports creating .SWC components with ActionScript 3.0, but not being an experienced Flash developer, I am really getting confused on HOW to do this.
Can anyone help me discover how to convert/recompile the ActionScript 3 version of the TextArea component from ANY version of Flash into an .SWC file that Director can recognize so I can call the ActionScript 3.0 methods within it?
Again, many thanks in advance...
Can you not publish the FLA as a SWF and import this into Director?
I'd have to make some (major) changes to it. The new "FLA component" is a special type of component file. Unlike the old .SWC files, the .FLA combines all of the user interface components and a group of skinning objects together into a single library. If you were to place this in your Director movie as a .SWF, you'd essentially have a movie with a bunch of (unnecessary) controls dumped onto the stage.
There's a pretty good overview of the FLA components described in the Flash documentation at http://help.adobe.com/en_US/as3/components/WS5b3ccc516d4fbf351e63e3d118a9c65b32-7ff1.html.