1 Reply Latest reply on Oct 9, 2015 3:00 AM by kglad

    How do I make my multi choice video work in HTML? AS3

    luis infocus med

      Hi guys,


      I have a big question,


      I'm been doing a multi choice video in AS3 flash for a few weeks now, the client already approved everything, so I delivered them the video as a projector (.exe) so then can play it in any computer.

      The problem came when inside the company they started testing the video, they are using Windows and the antivirus don't let them open the projector. They have offices across all the country, and can't change the security settings in all the offices so they can view this video.


      Swf isn't a option either, because they need flash player in all the computers to open it. So i thought maybe publishing the project as HTML, would work, or open the SWF in a browser. But when I try this option, the video starts well, but the buttons don't work, I can press them but they don't take me anywhere, I try the SWF in the desktop and works fine.


      The way the project works is like this:


      - I open the project and a video starts playing, when the video is over, the voiceover tells the user to select one of two choices leading them to another video depending on the user choices. The interaction is made with two buttons.

      - Once more the video starts playing according to the user choice, and when the video is over the user is asked again to choose one of two options.

      - This is the last video and ends with the company logo.

      - There are 7 videos you can see this way but the user have to choose one path.

      Something like this.


           2          3

      4     5     6     7


      And the flash structure, is divided by scenes one for each video. The last thing I tried was doing one video each frame but didn't work either. I'm using FLV Playback and calling each video by code, but they are in the library in the flash project.


      Here is the code:




      tienda_btn.addEventListener(MouseEvent.CLICK, parte_tienda);

      function parte_tienda(event: MouseEvent): void {


        gotoAndStop(2, "INTRO");


      autoservicios_btn.addEventListener(MouseEvent.CLICK, parte_autoservicios);

      function parte_autoservicios(event: MouseEvent): void {


        gotoAndStop(5, "INTRO")


      tienda_final_btn.addEventListener(MouseEvent.CLICK, tienda_final_in);

      function tienda_final_in(event: MouseEvent): void {


        gotoAndStop(2, "INTRO")


      tienda_positivo_btn.addEventListener(MouseEvent.CLICK, tienda_positivo_in);

      function tienda_positivo_in(event: MouseEvent): void {


        gotoAndStop(3, "INTRO")


      tienda_negativo_btn.addEventListener(MouseEvent.CLICK, tienda_negativo_in);

      function tienda_negativo_in(event: MouseEvent): void {


        gotoAndStop(4, "INTRO")


      autoservicios_final_btn.addEventListener(MouseEvent.CLICK, autoservicios_final_in);

      function autoservicios_final_in(event: MouseEvent): void {


        gotoAndStop(5, "INTRO")


      autoservicio_positivo_btn.addEventListener(MouseEvent.CLICK, autoservicios_positivo_in);

      function autoservicios_positivo_in(event: MouseEvent): void {


        gotoAndStop(6, "INTRO")


      autoservicio_negativo_btn.addEventListener(MouseEvent.CLICK, autoservicios_negativo_in);

      function autoservicios_negativo_in(event: MouseEvent): void {


        gotoAndStop(7, "INTRO")


      import flash.events.MouseEvent;

      salir_btn.addEventListener(MouseEvent.CLICK, salir_btn_in);

      function salir_btn_in(event: MouseEvent) {




      And this is a screenshot of the video, the top right corner is where the buttons are located, so the user can jump between videos. The big buttons in the middle of the screen are the ones mentioned earlier, that represent the multi choice.

      Screen Shot 2015-10-08 at 4.59.01 PM.png


      So my final question, after explaining all I did in my knowledge is, how can I play this video in a HTML, or if there is a better way of delivering this project to the client.


      PD: sorry if I didn't make myself clear, if you don't understand something ask me, so I can provide more info on the subject.


      And thanks in advance.

        • 1. Re: How do I make my multi choice video work in HTML? AS3
          kglad Adobe Community Professional & MVP

          the first problem i see is you are failing to explicitly reference the timeline in your code.  ie


          in as3, the following works, but will fail in html5:




          in html5, you must use:




          also, if you intend to direct the current timeline to its first frame, you should use:


          this.gotoAndStop(0);  // ie, timelines use 0-based enumeration of their frames.