
Welcome Guest
|
#1
|
|||
|
|||
|
problem with dynamic images
hi
i'm loading variables from a db (these are all defined as "folio_ ...") these generate a list of buttons that when clicked fill in some text fields with info from the db and load a few images my problem is basically the last image doesn't load first time on of any of the buttons but after i've clicked on any of the buttons once they all work fine, i just can't seem to work out why you can see an example here here's the code Actionscript:
onClipEvent(load){
imageArray = new Array("001","002","003","004");
for (i=1; i<=_root.numrows; i++) {
this.attachMovie("clientListMC", "buttonMC"+i, i);
this["buttonMC" + i].client_list_name = eval("_root.folio_name" + i);
setProperty ("buttonMC"+i, _x, 60);
setProperty ("buttonMC"+i, _y, 10 + (i*20));
}
onBtnReleased = function(mc) {
btnDestin = mc._name;
whichButton = mc;
}
thumbMCs = function(){
for(n=0;n<imageArray.length;n++){
_root.attachMovie("thumbBtnMC","thumbMC"+n,(n+100));
_root["thumbMC"+n]._x = 333 + (n*50);
_root["thumbMC"+n]._y = 30;
}
}
imageloadThumb = function(chosenThumbBtn){
thumb_picked = eval("_root.folio_variable" + chosenThumbBtn);
for(i=0;i<=imageArray.length;i++){
_root["thumbMC"+i].thumbHolder.loadMovie("folio_images/folio/" + thumb_picked + "/" + imageArray[i] + "_thumb.jpg");
}
}
imageload = function(chosenBtn){
client_picked = eval("_root.folio_variable" + chosenBtn);
_root.testtext = "images/folio/" + client_picked + "/001.jpg";
_root.client_details.bigview.loadMovie("folio_images/folio/" + client_picked + "/001.jpg");
}
}
onClipEvent(enterFrame) {
if (whichButton) {
for(i=0;i<=_root.numrows;i++){
if(btnDestin == "buttonMC" + i){
btnClicked = btnDestin.slice( 8, 50 );
_root.client_details.client_name = eval("_root.folio_name" + btnClicked);
_root.client_details.client_description = eval("_root.folio_description" + btnClicked);
_root.client_details.client_url = eval("_root.folio_url" + btnClicked);
thumbMCs();
imageload(btnClicked);
imageloadThumb(btnClicked);
}
}
whichButton = null;
}
}any help would be greatly appreciated regards andy |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Dynamic Images Scroller - Almost Finished | alyken | Actionscript 2.0 |
0 | 09-24-2008 10:36 PM |
| gif images problem | madmag | Newbies |
1 | 09-07-2007 12:46 PM |
| Preload multiple Dynamic Images to cache in flash mx | purdywurdy | Flash MX 2004 |
2 | 01-26-2007 01:34 PM |
| script for slideshow... dynamic loading of images and URLs | oquindrg | General Flash | 1 | 10-25-2006 02:00 PM |
| Dynamic Text for Flash Lite 1.1 (my big problem) | jopeman | All Things Apple |
2 | 01-12-2005 03:14 PM |




