Hai,
  I again have a problem with loading the image. say i have an swf named img1.swf, I have an xml tag <thumbNail>img1.swf</thumbnail> ok. In a tilelist i try to dispaly that swf using the following code:
<mx:Image id="prodThumbNail" width="80" height="80"  autoLoad="true"
                  source="@Embed('{dataObject.thumbNail}')"
                     creationComplete="hideWhenChanging()" />
when i run the application now again the image doesnt get displayed..
please help me.
Abdul Qabiz <[EMAIL PROTECTED]> wrote:
Ok,
 
I got it, you mean, when you run the swf on different machine it doesn't work. But if you run the swf from same machine it works, right?
 
The reason behind is that, your 3724.jpg is loaded on runtime, that's why when you run the swf on other machine, it is not finding the jpg file there. To avoid this, you can embed the jpeg in the swf itself by using Embed metadata tag.
 
 
 
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*"   backgroundColor="#FFFFFF"  >
        <mx:Canvas clipContent="true" backgroundColor="#FFFFFF" verticalGap="0" height="400" width="400"
          hScrollPolicy="off"
          vScrollPolicy="off">
         
             <mx:Image source="@Embed('3724.jpg')" height="100%" width="100%"/>
        </mx:Canvas>
</mx:Application>
 
 
But this would increase the SWF file size becase jpeg is embedded in final swf. Look at this link as well:
 
http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_19243
 
-abdul

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of nithya karthik
Sent: Friday, June 10, 2005 9:54 AM
To: flexcoders
Subject: [flexcoders] [flexcoders- to abdul] image in swf. pls help

Hai abdul,
      I forgot to attach the code in my mail. i am sending it now
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*"   backgroundColor="#FFFFFF"  >
        <mx:Canvas clipContent="true" backgroundColor="#FFFFFF" verticalGap="0" height="400" width="400"
          hScrollPolicy="off"
          vScrollPolicy="off">
         
             <mx:Image source="3724.jpg" height="100%" width="100%"/>
        </mx:Canvas>
</mx:Application>
 
 
When i compilt this mxml to swf and run it on a different machine it doesnt display the image. but when i tried running it from the same folder which contains the image then it works. y so? pls help m,e with this?

Send instant messages to your online friends http://uk.messenger.yahoo.com

Send instant messages to your online friends http://uk.messenger.yahoo.com


Yahoo! Groups Links

Reply via email to