Scenes are the content of a movie. A movie can have many scenes, and scenes are played in the order they appear in the scenes property of a movie object.
To create a new scene call the sdl.Scene constructor:
var scene = new sdl.Scene();
The Movie object contains an array of scenes in an property called scenes. The scenes are played in the order they appear in that array.
To append a scene at the end simple add the scene to the scenes araray:
movie.scenes.push(scene);
To access the first or last scene:
var firstScene = movie.scenes[0]; var lastScene = movie.scenes[scenes.length-1];
The visual content of a scene is made up from composing VisualTracks on top of each other, much like layers in a Photoshop image. Tracks a stacked in the sequence they appear in the tracks property of a scene, i.e the first track is at the bottom and the last track is on top.
In contrast to Photoshop, VisualTracks are sequences of frames, not a single image. Therefore, in most cases, VisualTracks have a length. To set the length (or duration) of a track, specify the number of frames in the numframes property. If the length of the track cannot be specified beforehand, the numframes property is set to -1.
var track = new sdl.VisualTrack({numframes: 100});
scene.tracks.push(track);
Terms of Use | © 2017, Impossible Software, or its affiliates.