tags:

views:

28

answers:

2

I created flex application that loads a image. I compiled this app and ran in the computer where it was created. it works. when i try in a different system, the image does not load.

I think it's chekcing for the image path.

how to include image as part of the application

+1  A: 

You want to embed the image. Check this out.

http://livedocs.adobe.com/flex/3/html/help.html?content=embed_1.html

Also, you want to put the image in a relative path not absolute. This is case you run the project on another computer.

Nick
the path is relative only. no luck. im gonna try the link you gave. thanks a lot
Vivek Chandraprakash
i tried embedding and it works great. thanks
Vivek Chandraprakash
Embedding the image adds it to the swf at compile time which gives you faster access from then on (disadvantage is in swf file size), otherwise, point the image source to a url or to a folder/file on the servers/flex apps base path.
Brian Bishop
A: 

hey buddy, why don't u just put that code here, wht u have written?

Image Embedding is gud option, but it increases the size of swf, so if it is really needed, then only go for it,

are u using Flex builder,

show me the code, may be i'll be able to give u some soln, and do give ur project structure, where is the image lying in the project tc

Ankur Sharma
<mx:Image x="-2" source="@Embed(source='../images/header.jpg')" />
Vivek Chandraprakash
k u got th soln by embedding, thats pretty gud for small demo application, i use wamp server normally while i m using all this in ma projects, i put all the images in the www directory, in some folder
Ankur Sharma
and then i keep using thm in ma project, it helpful, when u have to upload to the stuff to server, u dont have to change ur project structure
Ankur Sharma
i did the same .. created a folder /images and tried... no luck>
Vivek Chandraprakash