
If your animation contains video, sound or complex animations then you must implement two functions in the main timeline of the Flash file in order to allow the Nxtbook to control when it plays.
You should never allow sound or video to begin playing immediately within your animation. All sound, video and animations must only play when the
startMedia()
The
flv.play();
}
stopMedia()
This
flv.stop();
}
Controlling the Nxtbook from within an animation
Animations have some ability to communicate with the Nxtbook they are loaded into. In order to call a function in the Nxtbook insert the following function in the main timeline of your fla:
try {
parent["nxtbookCommand"].apply(parent, args);
} catch(e:Error){}
}
Once this function exists in your timeline you can call it passing various command names and arguments to the Nxtbook.
Click here for a list of available commands and their arguments.