Image

Listens: BNL - War On Drugs

Flash Help pleases.

Hey-oh, and thanks in advance for any help anyone can offer.

I have a fun filled question about flash, I'm working on a website which I'm programming dynamically, and I am loading thumbnails to a sliding scroll bar which moves up and down. This much works. What I need to happen is have the ability to click one of these thumbs, and have the relative picture go up. It is not working. If I don't load the image to the holder then it works, but that makes things difficult.

Heres all of the code I believe to be relevant, I would really appreciate any help. Thanks.



//*****************************
//Function to load image
//*****************************
function imageToScreen(imageFolder,inputNum,num){
var imageHolder:Array = []; // array to hold filenames of images
for (l=0;l
[Error: Irreparable invalid markup ('<inputnum;l++){>') in entry. Owner must fix manually. Raw contents below.]

Hey-oh, and thanks in advance for any help anyone can offer.

I have a fun filled question about flash, I'm working on a website which I'm programming dynamically, and I am loading thumbnails to a sliding scroll bar which moves up and down. This much works. What I need to happen is have the ability to click one of these thumbs, and have the relative picture go up. It is not working. If I don't load the image to the holder then it works, but that makes things difficult.

Heres all of the code I believe to be relevant, I would really appreciate any help. Thanks.


<lj-cut text="Code under the cut, for your friends list ease">
//*****************************
//Function to load image
//*****************************
function imageToScreen(imageFolder,inputNum,num){
var imageHolder:Array = []; // array to hold filenames of images
for (l=0;l<inputNum;l++){
imageHolder[l]= imageFolder+"/"+imageFolder+l+".jpg"; // loads the filenames of the images into the imageholder array
}
loadMovie(imageHolder[num], "imageLoader_mc"); //loads the image onto the area I want it (imageLoader_mc)
imageLoader_mc._x = 95 + ( ( 700 - Number(this.imageLoader_mc._width)) / 2); // Centers to X axis (is not working correctly)
imageLoader_mc._y = 30 + ( ( 500 - Number(this.imageLoader_mc._height)) / 2); // Centers to Y axis (is not working correctly)
}

//*****************************
//Function to put thumbs on slider
//*****************************
function thumbsToSlider(imageFolder,inputNum){
var thumbImageHolder:Array = []; // array to hold filenames of thumbs
for (m=0;m<inputNum;m++){
thumbImageHolder[m] = imageFolder+"/"+imageFolder+m+"thumb.jpg"; // loads the filenames of the thumbs into thumbImageHolder array
scrollbar_mc.attachMovie("thumbHolder","thumbHolder"+m,scrollbar_mc.getNextHighestDepth()); // attaches thumb HOLDER to scroll bar
scrollbar_mc["thumbHolder"+m]._x=3; // sets thumb HOLDER to appropriate X of scroll bar
scrollbar_mc["thumbHolder"+m]._y=53+(67*m); // sets to thumb HOLDER to appropriate Y of scroll bar
scrollbar_mc["thumbHolder"+m].loadMovie(thumbImageHolder[m]); // loads thumb image to appropriate thumb HOLDER
scrollbar_mc["thumbHolder"+m].onRelease = function():Void{ // on Holder Release put thumb image on screen.
imageToScreen(imageFolder,inputNum,Number(this._name.substr(-1,1)));
}
}
}>>
</lj-cut>


So, if I don't load the image to the holder, then I can click the holder and it will load the image. This tells me its because my code is referring to clicking the holder instead of the image... but I've tried all kinds of ways to refer to the loaded image so that they can click that and they haven't worked. Thanks for any help you can offer.