Hey dear

@Embed() works on compile time
The compiler embeds the file image at compile time that means its takes the
data of the source (image) convert it into binary format it may be vector to
the application and then it is being used. so even at runtime if the source
file is not not there, no effect is observed since the image is already
embeded

 '{r.currentItem.mood}' is a binding which strictly runs at runtime

so u wont find the image when u run the app

moreover when u r giving such thing:-source="@Embed('images/icon_
extra-medicine.gif')"/>

it is done at compile time not at runtime

however the compiler must be crying when u r trying to compile the given
code,right??

I think I'm clear with the explantion




On Wed, Jan 21, 2009 at 3:34 AM, subeesh a <[email protected]> wrote:

> Hi,
>
> I assume that "r.currentItem.mood" gives the correct path to the image. Try
> removing the @Embed() from the dynamic one like this
>
> <mx:Image  height="35" width="35"  source="{r.currentItem.mood}"/>
>
>  m
> Subeesh
>
>
> On Wed, Jan 21, 2009 at 3:14 PM, Yogesh Gaur <[email protected]>wrote:
>
>>
>> HI...can u plz give more details of ur requirement and  what is
>> r.currentItem.mood  ... by are using souce twice (source inside a
>> source ) ...it doesnt work this way .... mostly for dynamic image
>> loading ...u shd make a class and associate an image to it ... and
>> then us that class in ActionScript
>>
>> moshe wrote:
>> > Hi
>> >
>> > I am trying to display images in 2 ways static and dynamic
>> > unfortunately the dynamic display the last 2 doesn't show anything
>> >
>> >
>> > <mx:Image height="35" width="35" styleName="MediumIcon"
>> > visible="{r.currentItem.extramedicine=='true'?true:false}"
>> > source="@Embed('images/icon_extra-medicine.gif')"/> -> Display Image
>> >
>> > <mx:Image  height="35" width="35"  source="@Embed
>> > ('{r.currentItem.mood}')"/>             -> Don't display image
>> >
>> > <mx:Image  height="35" width="35"  source="@Embed
>> > (source='{r.currentItem.mood}')"/> -> Don't display image
>> >
>> >
>> > moshe
>>
>>
>>
>
> >
>


-- 
-----------------------------
Regards,
 HISSAM,
------------------------------

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to