|
#1
|
|||
|
|||
|
I researched to no avail and need someone's help.
Instead of #include "main.as" I have, On keyframe 1: #include "print.as" On keyframe 2: #include "design.as" On keyframe 3: #include "web.as" print.as: _root.xmlFile = "printgallery.xml" design.as: _root.xmlFile = "designgallery.xml" web.as: _root.xmlFile = "webgallery.xml" Basically, the flash viewer will only load whichever xml is loaded first. So if I gotoandStop(2) first, then keyframes 2,1, and 3 all will see only designgallery.xml. I've read about how to clear xml cache, but couldn't find anything helpful. Please help me so I can stop hitting my head against the monitor. Thanks, Blase |
|
#2
|
|||
|
|||
|
Here's an example.
http://www.contactstudios.com/test.html Click on portfolio, then print design. Close popup then click product design or web design, and the same xml loads. If you click on product or web design first, then its xml loads exclusively. |
|
#3
|
|||
|
|||
|
The problem I see is that on run time these files get sent to your browser cache. So going to another button to load this is going to pick up the brower cached files and load them first so it's going to keep doing what your showing. Not sure how good you are with flash and xml but it might be easier to just add more code for xml in the flash end and in the xml file and have it reference to certain parts of the xml file to load what you want. Then it's only one xml file. I know it's a bit more work then what you have done but it's the only way I can think of this working and still being able to only need to load one .swf and xml file. It's that or three scripts and renaming the xml files so it will point to those xml files for what you want. What ever seems best for you to work with.
|
|
#4
|
|||
|
|||
|
But I already do use multiple scripts and multiple renamed xml's. I've also tried loading the galleries as multiple external swf's referring to these renamed xml's with the same problem.
There's no way from flash I can just force the browser to recache the xml? |
|
#5
|
|||
|
|||
|
Or, do you know of how I could get the external swf galleries to load properly into my clip?
Thanks, Blase |
|
#6
|
|||
|
|||
|
Ok renaming the xml files is one thing but your still using the same swf file. If you were to have three scripts with this same .swf file name it's still going to load that one .swf file each time. You might consider renaming the .swf files to different names and edit the object code to make sure the two paths for these also point to the corect .swf file name. That way there isn't any reason to worry about the browser cache then and it would load it's own swf and xml file for each link.
|
|
#7
|
|||
|
|||
|
No, I have 3 separate swf files too with 3 different .as files referencing 3 different xml files.
Although maybe I'm simply not referencing them right. I'm trying to load them into a movieclip at _root.level but can only get them to load at _root. In the process of doing it wrong, I'm experiencing the same symptoms as the other way. Thanks for the replies, Blase |
|
#8
|
|||
|
|||
|
The main swf will always control the root but you may want to play with the lock root setup. This will kind of explain how it works:
http://livedocs.adobe.com/flash/9.0/...0001937.ht ml |
|
#9
|
|||
|
|||
|
Quote:
I was able to "fix" the problem locally by loading, then unloading, then reloading the new swfs in successive frames. But alas, on the server, it doesn't work as reliably. Not sure why. Did you ever figure out what to do? I've been working on it nearly 6 hours straight and am baffled that Flash lacks the easy ability to just "clear all xml data". |
|
#10
|
|||
|
|||
|
By the way -- I fixed this a bit ago.
In main.as, for each gallery, I replaced this: Code:
if(_root.xmlFile == undefined)
{
_root.xmlFile = "galleryname.xml"
}
Code:
_root.xmlFile = "galleryname.xml" I load the first gallery, say, abstractgallery.swf, which loads abstractgallery.xml as well, right? Works fine. Then I click the second gallery, deckpatiogallery.swf, but then it was checking to see if xml was undefined -- AND ONLY THEN would it load the new xml. Since xml still was defined at the time of the actionscript question, it didn't load the new one in, and the second gallery looked like the first. i.e, in fakecode: Code:
load gallery1.swf do we have an xml? no? then load gallery1.xml into gallery1.swf success! load gallery2 do we have an xml? yes, it's gallery1.xml sounds good to me! load gallery1.xml into gallery2.swf failure! |
![]() |
| Thread Tools | |
| Display Modes | |
|
|