Hi!
I use flash with php & mysql to load images into my movieclip.
So far I’ve managed to load the images but I want an loaderclip to play each time before the image shows up.
I have a dropdownlist with different options, when I choose one of them the clip loads 3 images directly and loads them. I want to load them one at a time with a pause and loaderclip between…
Here’s my ActionSript for the dropdownlist:
on (change) {
import mx.utils.Delegate;
var theXML2:XML = new XML();
theXML2.ignoreWhite = true;
theXML2.onLoad = function() {
var nodes = theXML2.firstChild.childNodes;
for(i=0;i<nodes.length;i++) {
imageCon = createEmptyMovieClip("holder"+i, i);
imageCon.loadMovie(nodes*.firstChild.nodeValue, "holder"+i);
var total = getBytesTotal();
var loaded = getBytesLoaded();
setProperty("holder"+i, _y, 50);
setProperty("holder"+i, _x, 100 *i);
// I have no idea what to do here...
setProperty(_root.imgLoader, _y, 138);
setProperty(_root.imgLoader, _x, 128 + (i*100));
_root.imgLoader.gotoAndPlay(2)
_root.Percent = ((loaded/total)*100) + "% loaded";
}
}
theXML2.load("models.php?sid=" + (this.value+1));
}
the XML2 string containes image addresses
Also, the last thing in the actionscript “theXML2.load…” can I (when the dropdown loads it’s data) set specific value for each addItem? As it is now it just sends the viewer to models.php?sid=1,2 or 3, but I want it to send it to models.php?sid=“database-id”…
This code loads data to the dropdown:
seasonDrop.addItem(". . . . .");
import mx.utils.Delegate;
var theXML:XML = new XML();
theXML.ignoreWhite = true;
theXML.onLoad = function() {
var nodes = theXML.firstChild.childNodes;
for(i=0;i<nodes.length;i++) {
seasonDrop.addItem(nodes*.firstChild.nodeValue,i);
}
}
theXML.load("collections.php");
the XML looks like this
<?xml version=“1.0”?>
<models>
<item>AUTUMN 2007</item>
<item>SPRING 2008</item>
<item>SUMMER 2008</item>
</models>In the end I also want these loaded images (thumbnails) to be clickable, so maby I just have to erase all and start over?
Thanks!!
Mikeey