I have a photo viewer swf that uses XML to load photos from /images into itself.
When I load this viewer using MovieClipLoader the clips loads, but the SWF clearly cannot load xml/photos, probably due to it looking in parent directory of test.swf.
My question is how do I fix this? It shouldn't be too awkward, hopefully it is possible.
I have attached a PNG to show folders.
(test = main swf, gal1 contains viewer.swf, xml, /images folder)
- are you using the airtightinteractive 'simple viewer' gallery?...(looks like it)
- what version of Flash are you using?...
- which player are you publishing for?...
Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
OS X 10.3.9 || Flash MX04 Pro
| del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |
Flash 8 Pro (yes I actually own it) - publishing for flash 8, and yes I am using the airtightviewer autoviewer app. I only blurred out the filenames to make it more relevant.
It's a great photo gallery viewer! But only for individual gallerys. I figured I could make a dynamic gallery chooser that floats over the gallery itself..
Any help would be lovely, and when it all works I will post source here, I'm sure there are others who would like it.
Phil
EDIT: I was thinking of making my app take a thumb from each directory 'thumb.jpg' and scroll across the top in the same style as the viewer itself.
Last edited by svenviking; 08-03-2006 at 06:36 PM.
ok.. the problem is.. that the 'simpleviewer' is published for Flash Player 6 and was coded in ActionScript 1.0. And you're publishing for Flash 8 with AS2.0... That's why you're having conflicts. You'll either have to buy the SimpleViewer source files and edit/update them to AS 2.0, or find another gallery..... sorry...
Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
OS X 10.3.9 || Flash MX04 Pro
| del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |
- does the gallery work properly on it's own?...
- is the XML file in the same directory as the swf and the 'thumbs' & 'images' folders
- is your XML doc formatting properly?..
---> check to make sure all tags are correct and not missing a '<' or '>' somewhere...
- did you save all your images as 'non-progressive' jpgs?.... or are they progressive? (flash can't load progressive jpg files)
- are you loading into a container clip?.. or into a _level?
and finally..
- did you buy the source files?.. or are you using the free version? (if you bought the source files, then you can do some troubleshooting...)
i know i bought the source files like 2 years ago so i could see how they put it together so i could try to make my own. It also allowed me to make changes and adjustments according to my own likes/dislikes.... I also believe in supporting people who invest their time and energy into creating something they make available for free unlimited use.
Last edited by madzigian; 08-03-2006 at 09:02 PM.
Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
OS X 10.3.9 || Flash MX04 Pro
| del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |
I am using the free Autoviewer app. It has a plugin for picasa to autogenerate galleries.
Runs perfect on it's own, xml files are lovely - standalone its perfect.
My code for loading the SWF is as follows:
code:
on (release) {
var container:MovieClip = createEmptyMovieClip("container", getNextHighestDepth());
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this);
mcLoader.loadClip("gal1/viewer.swf", container);
function onLoadInit(mc:MovieClip) {
trace("onLoadInit: " + mc); //returns: onLoadInit:_level0.instance2.container
}
}
I have also attached a gif with screenies of the swf running.
well first, your syntax for the MovieClipLoader listeners is wrong... but you can look that up in HELP...
try putting you xml file, the viewer.swf and the THUMB and IMAGE folders all in your root directory and see if it works
Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
OS X 10.3.9 || Flash MX04 Pro
| del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |
I thought flash had a problem where if you load a movie in externally, and that movie has external resources in a subdirectory - that the external file would be looking for the external files relative to the parent movie clip - not itself.
var mcLoader:MovieClipLoader = new MovieClipLoader();
var listen:Object = new Object();
listen.onLoadStart = function(target_mc:MovieClip) {
trace("Loading...");
};
listen.onLoadInit = function(target_mc:MovieClip) {
target_mc._lockroot = true;
// this should trace all the info & vars from the clip being loaded...
trace("From : " + target_mc);
for (i in _root) {
trace(" "+i+" -> "+_root[i]);
}
trace("");
};
listen.onLoadComplete = function(target_mc:MovieClip) {
// this should hopefully trace back all info from your main movie.....
trace("From : " + _level0);
for (var i in _level0) {
trace(" "+i+" -> "+_level0[i]);
}
trace("");
};
mcLoader.addListener(listen);
var container:MovieClip = _parent.createEmptyMovieClip("container", _parent.getNextHighestDepth());
mcLoader.loadClip("gal1/viewer.swf", container);
Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
OS X 10.3.9 || Flash MX04 Pro
| del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |
it''s really easy to create relative paths.... but you need to be able to edit the code to do it. The way that gallery was created does not give you an option to change the path to the XML file (actually, it's a little funny... because they actually wrote a check for a default file path into the XML file's preloader, but then they never added a way to actually alter the path.... so it's really just 2 or 3 useless lines of code.) The XML file allows you to change the default image/thumb folders... so why don't you just keep the viewer.swf and xml file in your root directory with all your other main files and load your images from wherever you want?...
Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
OS X 10.3.9 || Flash MX04 Pro
| del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |
Well the idea was that I can export from picasa lots of autoviewer gallerys (gal1, gal2, gal3, gal4, gal5 etc) and then make a main flash program that will load each one individually. Having to edit each one everytime kinda beats the point of it.
However, I could buy the code - and what would I need to do exactly - anywhere I can start?
i would just edit the code so you can provide alt paths to XML files.. then you just need one xml file for each gallery.... and you'd simply point the viewer towards the appropriate xml file..
Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
OS X 10.3.9 || Flash MX04 Pro
| del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |