Author Message

Posted: Thu Oct 15, 2009 4:21 pm   Post subject: as3 custom play controls example

Hi All
I am trying to use the as3 api to control. I have downloaded the sdk and some of the examples i have found all seem to be missing the core classes. Can someone point me to a simple as3 example or tutorial of using the api to start, pause, previous and next button controls or the presentation


I found the classes in the sdk install directories and that seems to be working but when I run this code from the example I get no errors and it does not seem to work. seems like the s3bridge.swf that I am trying to load which I found in the samples is not working correct.

someone please help

Code:
import ispring.as3bridge.*;
import flash.display.*;
import flash.events.*;

var player:Player;

// create target sprite
var target:Sprite = new Sprite();
addChild(target);

// load bridge
var loader:BridgeLoader = new BridgeLoader(target);
loader.addEventListener(BridgeEvent.BRIDGE_LOADED, onBridgeLoaded);
loader.addEventListener(BridgeEvent.PRESENTATION_LOADED, onPresentationLoaded);
loader.connectToBridge("as3bridge.swf");


function onPlayClick(e:MouseEvent):void
{
   player.playbackController.play();
}

function onPauseClick(e:MouseEvent):void
{
   player.playbackController.pause();
}

function onBridgeLoaded(e:BridgeEvent):void
{
   trace("bridge loaded")
   //loader.loadPresentation("AH-6s.swf");
}

function onPresentationLoaded(e:BridgeEvent):void
{
   trace("press" +e.player)
   if (e.player.initialized)
   {
      player = e.player;
      //writeLog("Presentation loaded");
      player.playbackController.addEventListener(BridgeEvent.SLIDE_CHANGE, onSlideChange);
   
      playButton.buttonMode = true;
      playButton.addEventListener(MouseEvent.CLICK, onPlayClick);
      pauseButton.buttonMode = true;
      pauseButton.addEventListener(MouseEvent.CLICK, onPauseClick);
   }
}
function onSlideChange(e:BridgeEvent):void
{
   trace("current slide: " + e.slideIndex);
}




Profile profile test

Posted: Fri Oct 16, 2009 12:52 pm   Post subject: Re: as3 custom play controls example

Hi!

AS3-bridge is an obsolete component that is included into iSpring SDK package for versions' backward compatibility. We recommend that you use AS3-connector instead.

You can find documentation here:

http://www.ispringsolutions.com/kb/docs/sdk/4.2/as_api/actionscript3_and_flex.html


Profile profile test

Posted: Mon Oct 19, 2009 10:22 am   Post subject: Re: as3 custom play controls example

davej wrote:
I am trying to use the as3 api to control. I have downloaded the sdk and some of the examples i have found all seem to be missing the core classes. Can someone point me to a simple as3 example or tutorial of using the api to start, pause, previous and next button controls or the presentation


Core classes are not missing. They are located in the following folder:
C:\Program Files\iSpring\Presenter\sdk\ispring\as3bridge
Relative path to this folder is defined in sample .FLA files' properties.


Profile profile test WWW www ICQ ICQ

Posted: Thu Apr 12, 2012 11:55 am   Post subject: Re: as3 custom play controls example

Thanks! I was having this issue, your solution worked for me!


Profile profile test
Display posts from previous:  Sort by  

  


Who is online
Who is online In total there are 7 users online :: 1 registered, 0 hidden and 6 guests (based on users active over the past 5 minutes)
Most users ever online was 108 on Thu Nov 21, 2013 3:41 pm

Registered users: Google [Bot]