To give more details on the problem.

Basically I have a Flex Library Project called for example 
TestLib.swc this has a flex component in it called MyComp.mxml.

In this component I have a SWFLoader that points to an asset in the 
same SWC file.  I refer to it via url="com/bmc/assets/myimage.png"

When I create a Flex project that includes TestLib.swc and uses 
MyComp.mxml, myimage.png is never found.  


I have a component which needs to dynamically load images at runtime 
and this component is in a SWC file.  I want to use this component 
in my flex applications, but alas the images just don't show up.

Any ideas?


--- In [email protected], "Roger Gonzalez" <[EMAIL PROTECTED]> 
wrote:
>
> SWC files are used at compile time.  SWFLoader is runtime.  Won't 
work.
>  
> (Note that if you caused MyTest.swf to be embedded instead of 
included
> when you built TestLib.swc, you can then refer to it as a class 
from
> your main project, and just instantiate an object of type 
SpriteAsset,
> MovieClipAsset, or MovieClipLoaderAsset, depending on how you 
embedded
> it.)
>  
> -rg
> 
> 
> ________________________________
> 
>       From: [email protected]
> [mailto:[EMAIL PROTECTED] On Behalf Of jgraham_us
>       Sent: Thursday, November 30, 2006 12:15 PM
>       To: [email protected]
>       Subject: [flexcoders] how to access assets in RSL file
>       
>       
> 
>       Not sure what I am doing wrong here, I would think this would
> work.
>       
>       I have a Flex Library project called that builds to 
TestLib.swc,
> this 
>       swc has several components and some common assets which are 
SWF 
>       files. 
>       
>       So for example in this swc I have com/x/y/z/MyTest.swf.
>       
>       I then have a Flex project which uses this SWC file. I 
attempt
> to use 
>       SWFLoader with URL="com/x/y/MyTest.swf"
>       
>       This doesn't work, I have tried a ton of other ways to access
> the SWF 
>       thats in the SWC file. 
>       
>       Whats the correct way to access assets in the SWC file?
>       
>       Thanks
>


Reply via email to