0 Replies Latest reply on Apr 28, 2010 12:25 PM by screen name 23

    AS2 project

    screen name 23

      Hi,
      I do have an assignemnt, deadline os tommorow 4pm. In this  assignment i should create interactive video in flash. I have choosen to  create game like Mortal Kombat. I have one video with 28 cue points. I  made buttons that take us to the right place in the video which are  hidden at the beggining but are visable when video reaches first cue  point. I have created life bar which in fact is made of 5 small MC`s and  I thought that if user will press kick button then one small life bar  will become hidden - I have no idea how to do this.
      Second thing is  that I want to put mp3 file but I want it to start at the same cue point  as buttons.
      third - I do want to dispaly random cue point of 2, so  if user will press punch button he will be taken to piece where my  character hits opponent or to the piece where opponent block the punch.  And I want from time to time randomly display piece of the vide where my  opponent hits the character

       

      Please help!!

       

      I do have this  actionscript 2.0:
      import fl.video.*;

       

       

       

      punch.onRelease =  function() {
      myVideo.seekToNavCuePoint("lennypunchs");
      }

       

      kick.onRelease  = function() {
      myVideo.seekToNavCuePoint("lennykicks");
      }

       

      flame.onRelease  = function() {
      myVideo.seekToNavCuePoint("lennyelectrics");
      }

       

      patelnia.myHomeX=patelnia._x;
      patelnia.myHomeY=patelnia._y;

       

      patelnia.onMouseDown=function(){

       

      mousePressed=true;
      }
      patelnia.onMouseUp=function(){
      mousePressed=false;
      }
      patelnia.onEnterFrame=function(){

       

      if(mousePressed==false){
      this._x-=(this._x-this.myHomeX)/5;
      this._y-=(this._y-this.myHomeY)/5;
      }
      }

       

      patelnia.onRelease=patelnia.onReleaseOutside=function(){
      stopDrag();
      if  (this._droptarget == "/lenny") {
      this.onTarget=true;
      myVideo.seekToNavCuePoint("lennygotpatelnias");
      }
      if  (this._droptarget == "/behindlenny") {
      this.onTarget=true;
      myVideo.seekToNavCuePoint("lookbehindlennys")
      }
      if  (this._droptarget == "/between") {
      this.onTarget=true;
      myVideo.seekToNavCuePoint("lookbetweens")
      }
      if (this._droptarget  == "/piano") {
      this.onTarget=true;
      myVideo.seekToNavCuePoint("pianogotpatelnias")
      }
      if  (this._droptarget == "/behindpiano") {
      this.onTarget=true;
      myVideo.seekToNavCuePoint("lookbehindpianos")

       

      }
      }

       

       

       

      var  listenerObject:Object = new Object();
      listenerObject.cuePoint =  function(eventObject:Object):Void  {
      if (eventObject.info.name ==  "welcomes") {
      punch._alpha = 100;
      kick._alpha = 100;
      flame._alpha = 100;
      patelnia._alpha = 100;
      lennylife1._alpha =  100;
      lennylife2._alpha = 100;
      lennylife3._alpha = 100;
      lennylife4._alpha = 100;
      lennylife5._alpha = 100;
      pianolife1._alpha = 100;
      pianolife2._alpha = 100;
      pianolife3._alpha = 100;
      pianolife4._alpha = 100;
      pianolife5._alpha = 100;
      vs._alpha = 100;
      lenny._alpha = 100;
      raiden._alpha = 100;

      }
      if (eventObject.info.name ==  "moved") {
      myVideo.seekToNavCuePoint("moves")
      }
      if  (eventObject.info.name == "lennypunchd") {
      myVideo.seekToNavCuePoint("moves")
      }
      if (eventObject.info.name  == "lennykickd") {
      myVideo.seekToNavCuePoint("moves")
      }
      if (eventObject.info.name == "lennyelectricd") {
      myVideo.seekToNavCuePoint("moves")

      }

      if  (eventObject.info.name == "lennypatelniapunchd") {
      myVideo.seekToNavCuePoint("moves")
      }
      if (eventObject.info.name  == "lookbehindlennyd") {
      myVideo.seekToNavCuePoint("moves")
      }
      if (eventObject.info.name == "lookbetweend") {
      myVideo.seekToNavCuePoint("moves")
      }
      if (eventObject.info.name  == "lookbehindpianod") {
      myVideo.seekToNavCuePoint("moves")
      }
      if (eventObject.info.name == "pianopatelniapunchd") {
      myVideo.seekToNavCuePoint("moves")
      }


      trace("Elapsed  time in seconds: "+myVideo.playheadTime);
      trace("Cue point name is:  "+eventObject.info.name);
      trace("Cue point type is:  "+eventObject.info.type);
      };
      myVideo.addEventListener("cuePoint",  listenerObject);