[flexcoders] Bug when extending in Flex a component created in Flash CS3 ??

2008-02-09 Thread João
After some hours fighting, I've tried to create the simplest test case
to solve one problem I was having with a component created in Flash
CS3 and exported to Flex.

I have created in Flash CS3 a very simple component:

- One MovieClip Test (without code or graphics)
- Inside that MovieClip, another one (without code or graphics) with
an instance name set myMC

Then I used Flex Component Kit for Flash CS3 to export the SWC of the
Test component. 

In Flex Builder, I've started creating an instance of the Flash CS3
component on an empty MXML Application file. Compiled. Worked fine.

Then, I decided to create the extended version of my component. So:

package pt.webfuel.view.components
{
public class TestExtended extends Test
{
}
}

Then I changed my MXML Application file so that is calls the extended
version:

componentes:TestExtended/

Compiled without errors. But after opening on the browser, I get an
exception: 

ReferenceError: Error #1056: Cannot create property myMC on
pt.webfuel.view.componentes.TestExtended.
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at
mx.flash::UIMovieClip()[E:\dev\flex_3_beta3\sdk\frameworks\projects\flash-integration\src\mx\flash\UIMovieClip.as:475]

[etc. If you need the full message, please ask]



Am I missing something here, or is this a bug? 
Should I file this on the Flex bugbase?

Also, is there a solution? This is creating us a lot of troubles :|

Thanks, 

João Saleiro



RE: [flexcoders] Bug when extending in Flex a component created in Flash CS3 ??

2008-02-09 Thread Alex Harui
Try

 

public dynamic class TestExtended extends Test



 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of João
Sent: Saturday, February 09, 2008 8:30 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Bug when extending in Flex a component created in Flash 
CS3 ??

 

After some hours fighting, I've tried to create the simplest test case
to solve one problem I was having with a component created in Flash
CS3 and exported to Flex.

I have created in Flash CS3 a very simple component:

- One MovieClip Test (without code or graphics)
- Inside that MovieClip, another one (without code or graphics) with
an instance name set myMC

Then I used Flex Component Kit for Flash CS3 to export the SWC of the
Test component. 

In Flex Builder, I've started creating an instance of the Flash CS3
component on an empty MXML Application file. Compiled. Worked fine.

Then, I decided to create the extended version of my component. So:

package pt.webfuel.view.components
{
public class TestExtended extends Test
{
}
}

Then I changed my MXML Application file so that is calls the extended
version:

componentes:TestExtended/

Compiled without errors. But after opening on the browser, I get an
exception: 

ReferenceError: Error #1056: Cannot create property myMC on
pt.webfuel.view.componentes.TestExtended.
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at
mx.flash::UIMovieClip()[E:\dev\flex_3_beta3\sdk\frameworks\projects\flash-integration\src\mx\flash\UIMovieClip.as:475]

[etc. If you need the full message, please ask]

Am I missing something here, or is this a bug? 
Should I file this on the Flex bugbase?

Also, is there a solution? This is creating us a lot of troubles :|

Thanks, 

João Saleiro