No logro que esto suceda, me pueden dar una mano??? estoy volviéndome loco, jejeje!!!
Les dejo el AS que cree.
Código ActionScript :
function crearbotones(){ loc_x=("-460"); trace(loc_x); loc_x=("-348"); trace(loc_y); for(i=0; i<largo; i++){ _root.dataSheet.attachMovie("AccionesBG_btn","boton" + i,i); ["boton" + i]_x=loc_x; ["boton" + i]_y=loc_y - i * 24; al_clicar = new Object(); al_clicar.click = function(objetivo) { if (objetivo.target == boton0 ) { var k=0; description_txt.model_txt.text = model[k]; description_txt.description1_txt.text = description_1[k]; description_txt.description2_txt.text = description_2[k]; image1_mc.loadMovie(image_1[k]) image2_mc.loadMovie(image_2[k]); image3_mc.loadMovie(image_3[k]); trace("Has pulsado el boton 0!!"); } else if (objetivo.target == boton1 ) { var k=1; description_txt.model_txt.text = model[k]; description_txt.description1_txt.text = description_1[k]; description_txt.description2_txt.text = description_2[k]; image1_mc.loadMovie(image_1[k]) image2_mc.loadMovie(image_2[k]); image3_mc.loadMovie(image_3[k]); trace("Has pulsado el boton 1!!"); } else if (objetivo.target == boton2) { var k=2; description_txt.model_txt.text = model[k]; description_txt.description1_txt.text = description_1[k]; description_txt.description2_txt.text = description_2[k]; image1_mc.loadMovie(image_1[k]) image2_mc.loadMovie(image_2[k]); image3_mc.loadMovie(image_3[k]); trace("Has pulsado el boton 2!!"); } else if (objetivo.target == boton3) { var k=3; description_txt.model_txt.text = model[k]; description_txt.description1_txt.text = description_1[k]; description_txt.description2_txt.text = description_2[k]; image1_mc.loadMovie(image_1[k]) image2_mc.loadMovie(image_2[k]); image3_mc.loadMovie(image_3[k]); trace("Has pulsado el boton 3!!"); } else if (objetivo.target == boton4) { var k=4; description_txt.model_txt.text = model[k]; description_txt.description1_txt.text = description_1[k]; description_txt.description2_txt.text = description_2[k]; image1_mc.loadMovie(image_1[k]) image2_mc.loadMovie(image_2[k]); image3_mc.loadMovie(image_3[k]); trace("Has pulsado el boton 4!!"); } else if (objetivo.target == boton5) { var k=5; description_txt.model_txt.text = model[k]; description_txt.description1_txt.text = description_1[k]; description_txt.description2_txt.text = description_2[k]; image1_mc.loadMovie(image_1[k]) image2_mc.loadMovie(image_2[k]); image3_mc.loadMovie(image_3[k]); trace("Has pulsado el boton 5!!"); } else if (objetivo.target == boton6) { var k=6; description_txt.model_txt.text = model[k]; description_txt.description1_txt.text = description_1[k]; description_txt.description2_txt.text = description_2[k]; image1_mc.loadMovie(image_1[k]) image2_mc.loadMovie(image_2[k]); image3_mc.loadMovie(image_3[k]); trace("Has pulsado el boton 6!!"); } else if (objetivo.target == boton7) { var k=7; description_txt.model_txt.text = model[k]; description_txt.description1_txt.text = description_1[k]; description_txt.description2_txt.text = description_2[k]; image1_mc.loadMovie(image_1[k]) image2_mc.loadMovie(image_2[k]); image3_mc.loadMovie(image_3[k]); trace("Has pulsado el boton 7!!"); } else if (objetivo.target == boton8) { var k=8; description_txt.model_txt.text = model[k]; description_txt.description1_txt.text = description_1[k]; description_txt.description2_txt.text = description_2[k]; image1_mc.loadMovie(image_1[k]) image2_mc.loadMovie(image_2[k]); image3_mc.loadMovie(image_3[k]); trace("Has pulsado el boton 8!!"); } else if (objetivo.target == boton9) { var k=9; description_txt.model_txt.text = model[k]; description_txt.description1_txt.text = description_1[k]; description_txt.description2_txt.text = description_2[k]; image1_mc.loadMovie(image_1[k]) image2_mc.loadMovie(image_2[k]); image3_mc.loadMovie(image_3[k]); trace("Has pulsado el boton 9!!"); } else if (objetivo.target == boton10) { var k=10; description_txt.model_txt.text = model[k]; description_txt.description1_txt.text = description_1[k]; description_txt.description2_txt.text = description_2[k]; image1_mc.loadMovie(image_1[k]) image2_mc.loadMovie(image_2[k]); image3_mc.loadMovie(image_3[k]); trace("Has pulsado el boton 10!!"); } else if (objetivo.target == boton11) { var k=11; description_txt.model_txt.text = model[k]; description_txt.description1_txt.text = description_1[k]; description_txt.description2_txt.text = description_2[k]; image1_mc.loadMovie(image_1[k]) image2_mc.loadMovie(image_2[k]); image3_mc.loadMovie(image_3[k]); trace("Has pulsado el boton 11!!"); } else if (objetivo.target == boton12) { var k=12; description_txt.model_txt.text = model[k]; description_txt.description1_txt.text = description_1[k]; description_txt.description2_txt.text = description_2[k]; image1_mc.loadMovie(image_1[k]) image2_mc.loadMovie(image_2[k]); image3_mc.loadMovie(image_3[k]); trace("Has pulsado el boton 12!!"); } else if (objetivo.target == boton13) { var k=13; description_txt.model_txt.text = model[k]; description_txt.description1_txt.text = description_1[k]; description_txt.description2_txt.text = description_2[k]; image1_mc.loadMovie(image_1[k]) image2_mc.loadMovie(image_2[k]); image3_mc.loadMovie(image_3[k]); trace("Has pulsado el boton 13!!"); } else if (objetivo.target == boton14) { var k=14; description_txt.model_txt.text = model[k]; description_txt.description1_txt.text = description_1[k]; description_txt.description2_txt.text = description_2[k]; image1_mc.loadMovie(image_1[k]) image2_mc.loadMovie(image_2[k]); image3_mc.loadMovie(image_3[k]); trace("Has pulsado el boton 14!!"); } else if (objetivo.target == boton15) { var k=15; description_txt.model_txt.text = model[k]; description_txt.description1_txt.text = description_1[k]; description_txt.description2_txt.text = description_2[k]; image1_mc.loadMovie(image_1[k]) image2_mc.loadMovie(image_2[k]); image3_mc.loadMovie(image_3[k]); trace("Has pulsado el boton 15!!"); } else if (objetivo.target == boton16) { var k=16; description_txt.model_txt.text = model[k]; description_txt.description1_txt.text = description_1[k]; description_txt.description2_txt.text = description_2[k]; image1_mc.loadMovie(image_1[k]) image2_mc.loadMovie(image_2[k]); image3_mc.loadMovie(image_3[k]); trace("Has pulsado el boton 16!!"); } else if (objetivo.target == boton17) { var k=17; description_txt.model_txt.text = model[k]; description_txt.description1_txt.text = description_1[k]; description_txt.description2_txt.text = description_2[k]; image1_mc.loadMovie(image_1[k]) image2_mc.loadMovie(image_2[k]); image3_mc.loadMovie(image_3[k]); trace("Has pulsado el boton 17!!"); } else if (objetivo.target == boton18) { var k=18; description_txt.model_txt.text = model[k]; description_txt.description1_txt.text = description_1[k]; description_txt.description2_txt.text = description_2[k]; image1_mc.loadMovie(image_1[k]) image2_mc.loadMovie(image_2[k]); image3_mc.loadMovie(image_3[k]); trace("Has pulsado el boton 18!!"); } else if (objetivo.target == boton19) { var k=19; description_txt.model_txt.text = model[k]; description_txt.description1_txt.text = description_1[k]; description_txt.description2_txt.text = description_2[k]; image1_mc.loadMovie(image_1[k]) image2_mc.loadMovie(image_2[k]); image3_mc.loadMovie(image_3[k]); trace("Has pulsado el boton 19!!"); } } boton0.addEventListener("click", al_clicar); boton1.addEventListener("click", al_clicar); boton2.addEventListener("click", al_clicar); boton3.addEventListener("click", al_clicar); boton4.addEventListener("click", al_clicar); boton5.addEventListener("click", al_clicar); boton6.addEventListener("click", al_clicar); boton7.addEventListener("click", al_clicar); boton8.addEventListener("click", al_clicar); boton9.addEventListener("click", al_clicar); boton10.addEventListener("click", al_clicar); boton11.addEventListener("click", al_clicar); boton12.addEventListener("click", al_clicar); boton13.addEventListener("click", al_clicar); boton14.addEventListener("click", al_clicar); boton15.addEventListener("click", al_clicar); boton16.addEventListener("click", al_clicar); boton17.addEventListener("click", al_clicar); boton18.addEventListener("click", al_clicar); boton19.addEventListener("click", al_clicar); } }