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 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:
-abdul
From: [email protected] [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 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
Yahoo! Groups Links
http://groups.yahoo.com/group/flexcoders/
[EMAIL PROTECTED]

