I cant do an image gallery movie clip , my buttons doesnt work

30 views Asked by At

i need to do a simple navigation system with an image gallery , all its working but an image gallery . I click on the buttons called "vaifoto" and "voltafoto" and when i do i got this message

TypeError: Error #1006: value is not a function. at prototipo_animate_2_4_fla::_1960fotos_38/changeImages()

i dont know where this error is ?

===============================================

import flash.net.URLRequest;
import flash.display.Loader;
import fl.motion.MotionEvent;

stop();
var currentImage:int = 1;
var totalImages:int =27;
var request:URLRequest = new URLRequest("fotos/1960/" + currentImage + (".png"));
var loader:Loader = new Loader ();
loader.load (request);
addChildAt(loader ,0);
 
addEventListener(MouseEvent.CLICK, changeImages);
function changeImages (e:MouseEvent){

if  (e.target ("vaifoto")){

if(currentImage<totalImages){
    
    currentImage ++ ;
    
    }   
    
    }
    if (e.target("voltafoto"))  {
        
        if(currentImage>1){
    
            currentImage -- ;
    }   
    
    
    }
    
}

i dont know how to do it , i can do a simple next frame back frame but i got a lot of images , that´s why use the URL

0

There are 0 answers