Having got the bulk of my site to work - I seem unable to get the AS to work in loading the first image.
The main script runs after a button has been pressed, but how do I get the following script to execute after the XML file (called pictures) has been loaded. I have tried lots of different ways - onenterframe, frame loaded etcbut none seem to work
Thanks - it works! I have been able to load my first image…BUT I can not understand why the preloader I am using does not work(it works in the rest of the site when a button is pressed). If I have the following script as follows - the image loads - but the loadbar does not work:
[AS]
pictures = new XML();
pictures.ignoreWhite = true;
pictures.onLoad = function(success) {
if (success) {
this.createEmptyMovieClip(“preloader”, 1000);
_root.picture.loadMovie(pictures.childNodes[0].childNodes[1].attributes[“jpegURL”]);
picture._visible = 0;
preloader.onEnterFrame = function() {
var l = picture.getBytesLoaded();
var t = picture.getBytesTotal();
var getPercent = l/t;
loadBar._width = getPercent*100;
if (l>0 && l>=t) {
picture._visible = 0;
}}}};
pictures.load(“pictures.xml”);
[/AS]
Why does the preloader loop not work(and yes I know I said in my thread title that this was not a preloader question - as I thought I had a script that worked!)??