开发者

Flash AS3 - Problems Getting Flash to Load Dynamically Generated XML Files

开发者 https://www.devze.com 2022-12-21 04:27 出处:网络
I\'m not quite sure how to describe the problem I\'m having but I\'ll do my best. I have an image gallery built in AS3 that loads content via an XML file. Nothing mind blowing here...

I'm not quite sure how to describe the problem I'm having but I'll do my best.

I have an image gallery built in AS3 that loads content via an XML file. Nothing mind blowing here... When testing locally on a static XML file, the gallery works as intended. The purpose of this gallery is to function within a CMS and load dynamically generated XML files to display the appropriate images/info for each particular gallery.

All this functions fine, to an extent...

The XML file that gets p开发者_高级运维opulated dynamically is called photos.xml. This is what I am trying to load in the image gallery.

Once the XML file gets assigned to a specific gallery the string becomes something to the effect of photos.xml?content=xxxxxx

The only way I can get the gallery to function properly is if I tell the gallery to load that specific "photos.xml?content=xxxxxx" string, and it will, and everything works fine.

What I can't seem to get it to do is load a gallery, regardless of its specific string. So if I'm at the index of all the galleries and I click on any of the galleries, it wont load the XML for that gallery.

So I guess what I'm asking is how can I get it so that the AS3 will load the XML for any gallery I click, whether is be "photos.xml?content=xxxxxx" or "photos.xml?content=yyyyyy" or "photos.xml?content=zzzzzz"


The only way I can get the gallery to function properly is if I tell the gallery to load that specific "photos.xml?content=xxxxxx" string, and it will, and everything works fine.

I looks like the cms is generating the xml file on request, in which case it's not the actionscript code that needs editing, but the backend/cms.

can you access the xml file without the ?content=xxxxxx at the end? If not, that's the part you'll have to fix, or ad a call like ?content=showAll and customize it to dump the entire structure.


If you have access to the names ie xxx,yyy & zzz for example cant you simply call them something like:

"photos.xml?content="+ X[i];

where X could be an array of all the names you have.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号