No, I've tried that and it still doesn't work. Besides, if I just draw a rectangle in the graphics of the child object, it displays properly, without having to set any dimensions in the parent.

On 10-Jan-08, at 5:25 PM, Alex Harui wrote:


In Flex apps, the protocol is that parents size their children. You’ll probably have to set the size and position of the component.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Elie Zananiri
Sent: Thursday, January 10, 2008 1:55 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Using the Flex Component Kit in an ActionScript project



Hi again,



So I checked the link-report XML and the SWC seems to get loaded. Also, the debugger shows that the Object gets instantiated, but its x, y, width, and height are 0.



I've uploaded my work files (http://www.silentlycrashing.net/flex2flash.zip ), if anyone has a minute, could you have a look at it and see if you can find the problem?



Thanks again,



-Elie



On 10-Jan-08, at 2:28 PM, Alex Harui wrote:






Use link-report to make sure it got in the swf.



Use the debugger to see if it got instantiated and given the right size, position and visibility



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Elie Zananiri
Sent: Thursday, January 10, 2008 9:44 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Using the Flex Component Kit in an ActionScript project



Hello all,

I am trying to use the Flex Component Kit to export some graphics drawn in Flash CS3 to
an ActionScript p! roject in Flex and I can't get it to work.

Here's what I'm doing:
In Flash:
1. Creating an MC symbol in Flash.
2. Giving it name="SomeName", class="SomeName", and base
class="mx.flash.UIMovieClip".
3. Right-clicking on the symbol in the library and exporting it as an SWC file called
"SomeNameUIMC.swc".
In Flex Builder:
4. Creating a new ActionScript project with main application file "SomeOtherName.as".
5. Importing the SWC file to the library path.
6. Creating a new class called "SomeName.as" which extends "mx.flash.UIMovieClip". 7. Instancing "SomeName" in "SomeOtherName" and adding it to the canvas.

Now when I run this, I don't get any compilation errors, but the display is blank. I don't think my SWC file is being linked to the class, but I don't see any info on h! ow to do this. All the tutorials I found online are using mxmlc, so is it possible that the Component Kit only works with Flex projects? If not, does anyone have any examples working on ActionScript
projects or can anyone see what I'm doing wrong?

Thanks for the help,

-Elie











Reply via email to