Yes, assets1 folder is one sub folder inside the main application
folder. I think the path is correct, because 

<mx:Image id="image2" source = "assets1/btn_sales.png" />  works
<mx:Image id="image2" source =
"@Embed(source='assets1/btn_sales.png')" />  works too without
resource bundles.

Thanks


--- In [email protected], "Abdul Qabiz" <[EMAIL PROTECTED]> wrote:
>
> How does the directory structure look like? is assets1 folder inside en
> directory?
> 
> -abdul
> 
> On Jan 28, 2008 2:33 PM, li_rang <[EMAIL PROTECTED]> wrote:
> 
> >   Hi,All,
> >
> > I am creating an application for three languages. To make things
easier,
> > I am using resource bundle to manage images, (you know, different
> > languages will need different pictures).
> >
> > My code is like following:
> >
> > [ResourceBundle("EmbeddedClassesBundle")]
> > public var rb_embed_1:ResourceBundle;
> >
> > [ResourceBundle("EmbeddedClassesBundle_sp")]
> > public var rb_embed_2:ResourceBundle;
> >
> > [ResourceBundle("EmbeddedClassesBundle_ge")]
> > public var rb_embed_3:ResourceBundle;
> >
> > rb_embed_1 is for English version
> > rb_embed_2 is for Spanish version
> > rb_embed_3 is for some other language version
> >
> > the code of EmbeddedClassesBundle is like following:
> >
> > package {
> > import mx.resources.ResourceBundle;
> > import img_1_en;
> >
> > public class EmbeddedClassesBundle extends ResourceBundle {
> > public function EmbeddedClassesBundle() {
> > super();
> > }
> >
> > override protected function getContent():Object {
> > var contentObj:Object = new Object();
> >
> > // Add a reference to the embedded graphic asset.
> > contentObj["img_1"] = img_1_en; //img_1_en is a class of bitmapassets
> > return contentObj;
> > }
> > }
> >
> > So for example, my main app looks like
> > <mx:Image id="image1" source = "{rb_embed_1.getObject('img_1')}"/>
> >
> > That works fine for me.
> >
> > But my problem is: when i use those resource bundles,
> > <mx:Image id="image2" source =
"@Embed(source='assets1/btn_sales.png')" />
> >
> > will never display the png. once i removed those resouce bundles,
> > image2 works.
> >
> > Do you know why i cannot embed images in mxml after i am using
> > resource bundles?
> >
> > for those three language versions, most pictures will be same, so i
> > don't want to create a class for each of them.
> >
> > Thanks
> >
> >  
> >
> 
> 
> 
> -- 
> -abdul
> ---------------------------------------
> http://abdulqabiz.com/blog/
> ---------------------------------------
>


Reply via email to