Image extends SWFLoader so you want to see how Image uses the SWFLoader code to 
determine the actual path to try.


On 8/26/10 11:45 AM, "Julian Tenney" <julian.ten...@nottingham.ac.uk> wrote:






SWFLoader or Image?

Surely the problem is with Image - or does Image use the paths set by SWFLoader 
to resolve its own paths?

________________________________
From: flexcoders@yahoogroups.com on behalf of Alex Harui
Sent: Thu 26/08/2010 18:33
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Loading Images into a loaded SWF


I don’t see any obvious problem with your setup.  Set a breakpoint in 
SWFLoader.as:loadContent and watch it try to resolve the URL into an absolute 
URL.  Maybe there is a clue there.


On 8/26/10 1:12 AM, "Julian Tenney" <julian.ten...@nottingham.ac.uk> wrote:






Yes, that’s right: mx:SWFLoader

mySWFLoader.load(swfFile); //to load it

loadForCompatibility is true or false, makes no odds,

Not specifying a loaderContext, but when I’ve tried it makes no odds – am I 
missing something here?



From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Alex Harui
Sent: 26 August 2010 00:43
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Loading Images into a loaded SWF



Just so I’m clear, you are using mx:SWFLoader and s! etting 
source=”C:\x35\learningObject.swf”?

I was just checking to see if you are or aren’t specifying loadForCompatibility 
or loaderContext


On 8/25/10 2:53 PM, "Julian Tenney" <julian.ten...@nottingham.ac.uk> wrote:






C:\x35\LearningObject.swf is the path.

'x35' is a folder containing the mxml file compiled by the app via fcsh.

AirTricks waits for fcsh to finish, and then loads LearningObject.swf.

What other params can I pass in to the swf that might help?

Thanks Alex,

J

________________________________

From: flexcoders@yahoogroups.com on behalf of Alex Harui
Sent: Wed 25/08/2010 18:13
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Loading Images into a loaded SWF


What is the path to the LearningObjects.swf that you are handing to SWFLoader 
in the AirTricks.SWF?  Are you specifying any other parameters for loading 
LearningObjects.swf?

mx:Image has code that tries to convert relative paths to absolute paths 
relative to the current SWF so you don’t need to place the JPG in the AirTricks 
folder.   It looks like the absolute path conversion is getting fooled.


On 8/25/10 1:28 AM, "Julian Tenney" <julian.ten...@nottingham.ac.uk> wrote:





Thanks for your help.

The! loaded SWF is a flex SWF, all built with the latest stable release.
It uses mx:Image
Yes, using Flex 4.
Paths:

To Air App:
C:\Program Files\Xerte 3.5\AirTricks\AirTricks.exe which loads C:\Program 
Files\Xerte 3.5\AirTricks\AirTricks.swf

To SWF:
C:\x35\LearningObject.swf

To image – it’s in all these places, and it doesn’t load.
C:\x35\media\DSC_0095.JPG [where it really ought to load from, or be able to 
load from.]
C:\Program Files\Xerte 3.5\AirTricks\media\DSC_0095.JPG [where you guys are 
telling me it should load from, but it doesn’t]

The relative path is media/DSC_0095.JPG

If I execute C:\x35\LearningObject.swf it works fine.

The application is an .mxml ! editor and compiler, which creates and edits mxml 
files, and compiles them. What I’m trying to do is load and preview the results 
in the application.

Thanks,

J
&nb! sp;




From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Alex Harui
Sent: 24 August 2010 18:41
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Loading Images into a loaded SWF



Is the loaded SWF a Flex SWF?  Is it using SWFLoader/Image?  Are you using Flex 
4?  What is the path to the AIR app, the SWF and the image and what are you 
using for a relative path?


On 8/24/10 8:58 AM, "Julian Tenney" <julian.ten...@nottingham.ac.uk! > wrote:






No, when I move the folder into the air app folder, the image DEFINITELY does 
not load.

So, WTF?


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Keith Reinfeld
Sent: 24 August 2010 14:29
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Loading Images into a loaded SWF



Once your SWF is loaded the path is relative to your Air app. Place a copy of 
your media folder and its contents accordingly.


Regards,

Keith Reinfeld
Home Page: http://keithreinfeld.home.comcast.net 
<http://keithreinfeld.home.comcast.net/>  
<http://keithreinfeld.home.comcast.net/> <htt! 
p://keithreinfeld.home.comcast.net/ <http://keithreinfeld.home.comcast.net/> >
! < FONT color="#0000ff">



This message and any attachment are intended solely for the addressee and may 
contain confidential information. If you have received this message in error, 
please send it back to me, and immediately delete it.   Please do not use, copy 
or disclose the information contained in this message or in any attachment.  
Any views or opinions expressed by the author of this email do not necessarily 
reflect the views of the University of Nottingham.

This message has been checke! d for viruses but the contents of an attachment 
may still cont! ain soft ware viruses which could damage your computer system: 
you are advised to perform your own checks. Email communications with the 
University of Nottingham may be monitored as permitted by UK legislation.




--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui

Reply via email to