Jump to content
Dataton Forum

Get the state of timelines playing or not in Flash AS3

Recommended Posts

Hey guys!


I use Flash a lot to create remote apps to control my watchout shows, using them on windows tablets or android tablets.

I manage to do the basics (starting/stopping stuff) but i'm puzzled how i can get the state of a timeline into flash.


I would like to be able to have a button change when a timeline is done playing or maybe get the time info to show next to the button, just to be able to show more information in the app.

Would also be nice to be able to show if the app is still connected to Watchout..


I have read the API info, but it's just a bit out of my league for now to understand on my own.

I hope someone can show me how i would be able to get this to work, would be so cool!



Thanks in advance!


Frank Doeve

The Netherlands

Share this post

Link to post
Share on other sites

The Flash (AS3) API is probably the easiest route if you want to build something in Flash/AIR. It's fairly well documented with ASDoc files, assuming you have the complete SDK. Here's the docs:




I'm not sure the rest of the SDK it's still available on the web, though, but you may have a copy since before.


To work with Aux Timelines, call GetAuxTimeline to get access to the desired timeline, then use the methods on the returned AuxTimeline object to control or obtain info on the aux timeline. There may still be some sample code ont eh academy site that shows how to use thie API from flash.



Share this post

Link to post
Share on other sites

Hi Mike!


Thanks for your answer. Again, I should say, because I just remembered I already asked a similar question a long time ago and then, too you were the one to answer me

I decided to try and pick up where I left off, doing everything the same for the AuxTimelines as I did for the main, but I get nothing back from the auxes... Main works though. So there must be a different approach needed for aux timelines I guess.

Share this post

Link to post
Share on other sites

Here's what i'm trying:


the "led" and "led2" are small movieclips of a little led that's red on frame 1-9 and green on frame 10, so i want it to change from red to green when a certain aux timeline is playing.

The part for the main wo works, the movieclip changes when wo is connected or when the main timeline is playing, just nothing happens when i try the same for Aux Timelines...

import com.dataton.watchout.*;
import flash.events.MouseEvent;
import flash.events.KeyboardEvent;
import flash.events.EventDispatcher;
import flash.utils.Timer;
import flash.net.SharedObject;
import flash.display.DisplayObject;

import flash.display.StageDisplayState;

var wo : WATCHMan = new WATCHMan("");
var auxTL : AuxTimeline = wo.GetAuxTimeline("Theater_PPT");

wo.addEventListener(WATCHMan.KEvt_ConnectedChanged, function(evt : Event) {
if (wo.Connected)

auxTL.addEventListener(AuxTimeline.KEvt_PlayingChanged, function(evt : Event) {
  if (auxTL.Playing)

Anyone have any idea where my approach is wrong?



Share this post

Link to post
Share on other sites

It may be necessary to wait for the connect event from the aux timeline before attempting to subscribe to its "playing" status.



Share this post

Link to post
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