/// <summary>This slide is now starting.</summary> internal override void start() { base.start(); Timeline tl = track.timeline; // Display this dialogue slide now! // Any audio? if (!string.IsNullOrEmpty(audioFilePath)) { // Play the audio now. // Note that PowerSlide will follow the lead of the audio engine. playAudio(); } // Get the template to use: string templateToUse = (template == null)? tl.template:template; // Open the widget (which closes the prev one for us): Widgets.Widget widget = tl.openWidget(templateToUse); if (widget != null) { // Trigger a dialogue start event: SlideEvent s = new SlideEvent("dialoguestart", null); s.slide = this; tl.dispatchEvent(s); } if (waitForCue) { // Wait! Advance to the end of the slide now too // (because it has an auto duration which doesn't have any meaning). tl.setPause(true); if (tl.backwards) { tl.currentTime = computedStart; } else { tl.currentTime = computedEnd; } } }
internal override void start() { // Pause it now! Timeline tl = track.timeline; tl.setPause(true); if (tl.backwards) { tl.currentTime = 1f - computedStart; } else { tl.currentTime = computedStart; } // Hook up cue elements now: HTMLCollection targs = cuedBy; if (targs != null && eventName != null) { foreach (Element e in targs) { Dom.EventListener <Dom.Event> d = new Dom.EventListener <Dom.Event>(delegate(Dom.Event ev){ // Cued by the cue point! element.cue(); }); CueElementData ced = new CueElementData(eventName, d, e); // Add to a list on the timeline: if (track.timeline.cueElements == null) { track.timeline.cueElements = new List <CueElementData>(); } track.timeline.cueElements.Add(ced); // Add listener: e.addEventListener(eventName, d); } } base.start(); }