Click Camera to play sound in Flartoolkit

82 views
Skip to first unread message

Ahmad Romadhon

unread,
Jun 21, 2013, 7:53:11 PM6/21/13
to flartool...@googlegroups.com
package {
  impor flash.events.Event;
  impor org.papervision3d.objects.parsers.DAE;
  impor flash.media.Sound;
  impor flash.media.SoundChannel;
  impor flash.net.URLRequest;

  [SWF (width = 640, height = 480, backgroundColor = 0x808080, framerate = 30)]
    Piramid public class extends PV3DARApp {
    swasta var _Piramid; DAE;
soundChannel var swasta: SoundChannel = SoundChannel baru ();
swasta var myURLRequest: URLRequest = new URLRequest ("lagu.mp3");
swasta var mySound: Suara = new Suara (myURLRequest);

Fungsi Piramid publik () {
  addEventListener (Event.INIT, _onInit);
  init ('Data / camera_para.dat', 'Data / Piramid.pat');
}
         fungsi swasta _onInit (e: Event): void 
{
  _Piramid = New DAE ();
  _Piramid.load ('Model / Piramid.dae'); 
  _Piramid.scale = 2; 
  _Piramid.rotationX = 90; 
  _markerNode.addChild (_Piramid);
  
  soundChannel = mySound.play ();
  addEventListener (Event.ENTER_FRAME, _update);
}
fungsi swasta _update (e: Event): void
{
_Piramid.rotationZ - = 0,5
}
     }
}

Reply all
Reply to author
Forward
0 new messages