lundi 27 mars 2017

AS3. Multiple Photo/Video Gallery within a scene

I wanted to create a scene where multiple viewers can interactive with the content on a huge touch display.

Have a look at this attachment: Concept/idea

Below is something I know, creating a most basic workable gallery with next prev buttons.

stop ()

 btn1.addEventListener (MouseEvent.CLICK,backward);
 btn2.addEventListener (MouseEvent.CLICK,forward);

 function forward(event:MouseEvent) {
     if (this.currentFrame == this.totalFrames){
        gotoAndStop(1);
     }
     else{
         nextFrame();
     }
 }

 function backward(event:MouseEvent) {
     if (this.currentFrame == 1){
        gotoAndStop(this.totalFrames);
     }
     else{
         prevFrame();
     }
 }

Basically, there might be people browsing through some images on the left and right at the same time, and the "next" and "prev" button will only affect the targeted area, not the whole scene.

Aucun commentaire:

Enregistrer un commentaire