Naw, I meant if Kashif got it working, hehe!  Haven't had the time to test this yet, figured he'd beat me to it.
 
----- Original Message -----
Sent: Thursday, October 20, 2005 5:12 PM
Subject: RE: [flexcoders] Using @ContextRoot() with Loader

Just guessing!  Judging by who responded, I would bet my lunch (2 cups Ramen and a Coke) this won’t work.

 

What if instead, in the mxml, you did this:

<mx:String id="strContextRoot">@ContextRoot()</mx:String>

 

Then:

source={ strContextRoot + ‘ /’ + object.imagePath}

 

 

Tracy

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of JesterXL
Sent: Thursday, October 20, 2005 3:26 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Using @ContextRoot() with Loader

 

If you get this to work, please let us know!

 

----- Original Message -----

From: Tracy Spratt

Sent: Thursday, October 20, 2005 1:13 PM

Subject: RE: [flexcoders] Using @ContextRoot() with Loader

 

Oops:

source=[EMAIL PROTECTED]() + ‘ /’ + object.imagePath}

Tracy


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Tracy Spratt
Sent: Thursday, October 20, 2005 12:47 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Using @ContextRoot() with Loader

 

Just guessing, but try:

source=[EMAIL PROTECTED]()} + ‘ /’ + object.imagePath}

 

Tracy

 

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Kashif Noorani
Sent: Thursday, October 20, 2005 12:53 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Using @ContextRoot() with Loader

 

I am trying to figure out a way to load an image dynamically without coding in relative paths. I tried the following with little luck:

<mx:Loader source="@ContextRoot()/{object.imagePath}" width="40" height="58"/>

The same code works if I replace the @ContextRoot() with the relative path i.e. "../../../".

Any tips?

kash




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to