Jump to content
Search Community

Different actions on Multiple ASCuepoints

zedman test
Moderator Tag

Recommended Posts

Hi,

 

I´m using the LoaderMax and it works like a charm. Now I was wondering how to trigger different actions on multiple cuepoints.

 

Here´s my code that doesn´t work:

 

IntroFirst.addASCuePoint(5.87, "one");

IntroFirst.addASCuePoint(7.76, "two");

IntroFirst.addEventListener(VideoLoader.VIDEO_CUE_POINT, _onCuePoint);

 

function _onCuePoint(event:LoaderEvent):void {

if (event.target=="one") {

trace("here´s the first cuepoint");

}

if (event.target=="two") {

trace("here´s the second cuepoint");

}

}

 

I would like to set different action on different cuepoints. Like showing one text here than doing other stuff on other cuepoint.

Any idea how to manage this? Many thanks in advance.

Zoran

Link to comment
Share on other sites

This is outlined in the ASDocs:

http://greensock.com/as/docs/tween/com/ ... SCuePoint()

 

IntroFirst.addASCuePoint(5.87, "one");
IntroFirst.addASCuePoint(7.76, "two");
IntroFirst.addEventListener(VideoLoader.VIDEO_CUE_POINT, _onCuePoint);

function _onCuePoint(event:LoaderEvent):void {
   if (event.data.name == "one") {
        trace("here´s the first cuepoint");
   } else if (event.data.name == "two") {
        trace("here´s the second cuepoint");
   }
}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...