Forums / Templates, Stylesheets, Page Layout / Flash: Unable to load Images from other subdomain

Flash: Unable to load Images from other subdomain

Locked
Results 1 to 12 of 12
This thread is locked. New replies are disabled.
05 Aug 2008, 17:49
#1
robd75 avatar

robd75

New Zenner

Join Date:
Aug 2008
Posts:
6
Plugin Contributions:
0

Flash: Unable to load Images from other subdomain

Hello,
Recently, I developed a javascript component to dynamically grab data from a database and rotate through the items. It displays a picture and 2 lines of text.
That works perfectly fine.
When creating a Flash version of this component, however, I run into some trouble. XML is dynamically generated by a webservice that makes the same calls to the database. The XML is generated perfectly fine and the component reads the XML fine.
I have several variables passed into the Flash declaration, including a service URL that points to the XML. The component rotates through the items, but does not display the images. I know that it's grabbing the XML because it outputs the appropriate text.
I have checked the image paths and they're all valid. I've had the flash component output the url that it should be loading and that's also correct. The URLs are all fully qualified. Now the weirdest thing is that I can chance the background color (no that's not the weird part :P) and thus see a white placeholder for the images. The image should resize when it becomes the center image, and the placeholder does resize to the size of the image that should be loading. Therefor, it has to be seeing the images so that it can grab their dimensions, as they're all different, but no images come up.
On a local machine in Adobe Flash CS3 Professional, the movie runs fine when I statically put in the XML path. (I've also pushed it online with a static XML path and it doesn't work when you go to the site).
I seem to get conflicting results in my research on the subject of flash loading images from other subdomains. The images that are to be loaded are on a different subdomain than the Flash component and the XML. It is all in the same domain, however. I looked into crossdomain policies, but that shouldn't affect it since it's on the same domain.
I can't post the code here or a site to view this on as we're not ready to release yet, so I was wondering if anyone had heard of a similar issue before or could offer some suggestions.

Here's a screenshot of the program in action though:
http://people.clarkson.edu/~dorara/screenshotFlash.GIF
As you can see, the images on the side are all a uniform size, but the one in the center resized to the appropriate height.
Ignore the blue text in the back - that was for testing to confirm that the Flash has an appropriate URL and matches the output for the local version.

Thanks,
-- Rob
05 Aug 2008, 18:26
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Flash: Unable to load Images from other subdomain

The images that are to be loaded are on a different subdomain than the Flash component and the XML.

Since you state that these are "Sub-Domains" - why not just get all of this central to your Cart and not mess with crossing over?
05 Aug 2008, 18:37
#3
robd75 avatar

robd75

New Zenner

Join Date:
Aug 2008
Posts:
6
Plugin Contributions:
0

Re: Flash: Unable to load Images from other subdomain

Unfortunately, we can't. We have tons of images that are loaded and changed each week. These images are located on a separate subdomain because they are specific to the brand assigned to that subdomain. They are used for a separate function in that part of the site. We don't want to have to continually update these images into multiple locations as it would take a good deal of added processing and space on the server.
05 Aug 2008, 18:40
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Flash: Unable to load Images from other subdomain

Well then move a set to get this working and then change things item by item to point elsewhere and you will see which part is breaking it and have only that item to address
05 Aug 2008, 18:48
#5
robd75 avatar

robd75

New Zenner

Join Date:
Aug 2008
Posts:
6
Plugin Contributions:
0

Re: Flash: Unable to load Images from other subdomain

Thank you,
Upon further inquiry it appears that it can load images in the same subdomain from the XML using the fully qualified URL. Unfortunately, it still will not load images from an alternate subdomain, which we'll need to do.
05 Aug 2008, 18:53
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Flash: Unable to load Images from other subdomain

Unfortunately, it still will not load images from an alternate subdomain, which we'll need to do.

Same suggestion as before - get it to work within the cart space first then change item by item to see what is breaking/not coded correctly
05 Aug 2008, 19:05
#7
robd75 avatar

robd75

New Zenner

Join Date:
Aug 2008
Posts:
6
Plugin Contributions:
0

Re: Flash: Unable to load Images from other subdomain

It will load any image that is within the same subdomain, but will not load any image that is in an alternate subdomain. The code works correctly in the chosen subdomain, so the problem is being caused by the call to items in a different subdomain. I feel that it may be the related to the way the programmer is loading the images, as I've tested loading images from another subdomain or an entirely different domain with the LoadMovie() Function and have had no problems.

Thanks,
Rob
05 Aug 2008, 19:13
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Flash: Unable to load Images from other subdomain

I feel that it may be the related to the way the programmer is loading the images

I guess this is a matter between you and your programmer
05 Aug 2008, 19:34
#9
robd75 avatar

robd75

New Zenner

Join Date:
Aug 2008
Posts:
6
Plugin Contributions:
0

Re: Flash: Unable to load Images from other subdomain

kobra:

I guess this is a matter between you and your programmer


Yes, and I intend to talk to him about it tomorrow. Thank you for your help :)
I'm not certain, however, that this is the issue. I'm curious as to whether anyone else has experienced problems loading images from other subdomains with Flash.

Thanks,
Rob
05 Aug 2008, 19:39
#10
bigbadboy avatar

bigbadboy

Totally Zenned

Join Date:
Apr 2008
Posts:
557
Plugin Contributions:
0

Re: Flash: Unable to load Images from other subdomain

You need to install a crossdomain.xml file at the root level of the main domain.

http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14213

This is nothing to do with Zen but inbuilt security in Flash itself.
05 Aug 2008, 19:39
#11
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Flash: Unable to load Images from other subdomain

I'm curious as to whether anyone else has experienced problems loading images from other subdomains with Flash.

But you stated:
I've tested loading images from another subdomain or an entirely different domain with the LoadMovie() Function and have had no problems.

So I would suspect that this works and is based in proper coding or lack there of or as you stated something different with the exact images you are attempting to link to
05 Aug 2008, 20:02
#12
robd75 avatar

robd75

New Zenner

Join Date:
Aug 2008
Posts:
6
Plugin Contributions:
0

Re: Flash: Unable to load Images from other subdomain

bigbadboy:

You need to install a crossdomain.xml file at the root level of the main domain.

http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14213

This is nothing to do with Zen but inbuilt security in Flash itself.


Thank you :D
I have been looking at crossdomain policies to determine if it was necessary. I was of the impression that the crossdomain.xml file was only necessary to cross domains, rather than subdomains, and that it only needed be placed at the root of the directory in which the website is being hosted rather than the root directory of the server. I had tried placing one in the root directory of the website, but it didn't seem to help.
I was looking at the link you provided and it says that when accessing content on a separate subdomain, it will prompt the user to ask if it's okay to allow this action. We don't receive a prompt asking for permission, so I'm not sure if that refers to the same issue I'm experiencing.

Thanks,
-- Rob