PDA

View Full Version : how load button


little_prince41
08-03-2007, 03:29 AM
he me, i have problem about load image or button?

i want load small image ,then i chick small image that its show or load big image .
how i do?:o

3pepe3
08-03-2007, 03:48 AM
O_

small=this.createEmptyMovieClip("cont_thumb",1)
big=this.createEmptyMovieClip("cont_img",2)
small.loadMovie("myThumb.jpg")
small.onPress=function(){
big.loadMovie("myImg.jpg")
}

read on flash help about loadMovie, loadClip and also you can find like 1,000,000 of pages on google about this subject.
good luck

little_prince41
08-03-2007, 07:04 AM
thanks you......
if this code,where past code?
i want increase 1.jpg then click its.
..............................................
LO = new Object();
LO.change = function(EO) {
c1Value = c1.getSelectedItem().label;
c2Value = c2.getSelectedItem().label;
c3Value = c3.getSelectedItem().label;
//call the checkValue function
checkValue();
};
function loadThisHere(thisClip:MovieClip, thisImage:String)
{
thisClip.loadMovie(thisImage);
}

function checkValue()
{
msg = "Youselected Pcontroller Kd=0 kp=10 ki=0 " ;
statusMessage.text = msg;



if(c1Value=="0"&&c2Value=="10"&&c3Value=="0")
{

setTimeout(loadThisHere, 1000,_root.d0,"0.jpg");
setTimeout(loadThisHere, 2000,_root.d1,"0.jpg");
setTimeout(loadThisHere, 3000,_root.d5,"10.jpg");
setTimeout(loadThisHere, 4000,_root.d2,"10.jpg");
*** setTimeout(loadThisHere, 6000,_root.small,"1.jpg");****
setTimeout(loadThisHere, 5000,_root.d3,"100.jpg");
setTimeout(loadThisHere, 7000,_root.d0,"8.jpg");
setTimeout(loadThisHere, 8000,_root.d1,"8.jpg");
setTimeout(loadThisHere, 9000,_root.d2,"2.jpg");
setTimeout(loadThisHere, 10000,_root.d3,"20.jpg");

}

}

for (i=1; i<3; ++i)
{
_root["c"+i].addEventListener("change", LO);
}

veena
08-03-2007, 07:23 AM
hey 3pepe3,
i pasted that code, but it is not working

3pepe3
08-03-2007, 07:27 AM
mmmmmmmmmmmhhhhhhhhhh.... where is loaded each thumbs and where you want to load the image.
that code looks more like a combobox or a drop down menu.