I have some cue points that are loaded dynamically from an XML document into the page, and used as actionscript cue points. Below is my XML:
**XML: **
<cuepoints>
<one name="bullet1" time="3.500" type="actionscript" said="Konnektivität"></one>
<two name="bullet2" time="6.500" type="actionscript" said="Internet"></two>
<three name="bullet3" time="7.500" type="actionscript" said="Bilder und Video"></three>
<four name="bullet4" time="9.000" type="actionscript" said="Gaming"></four>
<five name="bullet5" time="10.000" type="actionscript" said="Akkulaufzeit"></five>
</cuepoints>
**ActionScript (2):
**
import mx.transitions.Tween;
import mx.transitions.easing.*;
/*////////////////////////////////////////////////////////////////
Load the video content paths
/////////////////////////////////////////////////////////////////*/
playback1.contentPath = getNodeValue(findNode(videos, "one"));
//turn off the visibilit of the bullet mc
bullet_bg._alpha = 0;
bullet_one._alpha = 0;
bullet_two._alpha = 0;
bullet_three._alpha = 0;
bullet_four._alpha = 0;
bullet_five._alpha = 0;
// Assign the mySeekBar instance to the flvPlayback instance
playback1.playPauseButton = playpause;
playback1.backButton = myrewind;
playback1.seekBar = seekbar_container.myseek;
playback1.bufferingBar = mybuffer;
/*////////////////////////////////////////////////////////////
Create the Cuepoints for the video
///////////////////////////////////////////////////////////*/
var bullet1:Object = new Object();
bullet1.time = findNode(cuepoints, "one").attributes.time;
bullet1.name = findNode(cuepoints, "one").attributes.name;
bullet1.type = "actionscript";
var bullet2:Object = new Object();
bullet2.time = findNode(cuepoints, "two").attributes.time;
bullet2.name = findNode(cuepoints, "two").attributes.name;
bullet2.type = "actionscript";
var bullet3:Object = new Object();
bullet3.time = findNode(cuepoints, "three").attributes.time;
bullet3.name = findNode(cuepoints, "three").attributes.name;
bullet3.type = "actionscript";
var bullet4:Object = new Object();
bullet4.time = findNode(cuepoints, "four").attributes.time;
bullet4.name = findNode(cuepoints, "four").attributes.name;
bullet4.type = "actionscript";
var bullet5:Object = new Object();
bullet5.time = findNode(cuepoints, "five").attributes.time;
bullet5.name = findNode(cuepoints, "five").attributes.name;
bullet5.type = "actionscript";
playback1.addASCuePoint(bullet1);
playback1.addASCuePoint(bullet2);
playback1.addASCuePoint(bullet3);
playback1.addASCuePoint(bullet4);
playback1.addASCuePoint(bullet5);
/*///////////////////////////////////////////////////////////
CUE POINT LISTENER
///////////////////////////////////////////////////////////*/
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object) {
var cuePtName = eventObject.info.name;
if (cuePtName == "bullet1") {
var b1:Tween = new Tween(bullet_one, "_alpha", Strong.easeInOut, 0, 100, 1, true);
var b1x:Tween = new Tween(bullet_one, "_x", Strong.easeInOut, 100, 115, 1, true);
trace(bullet1.time);
}
if (cuePtName == "bullet2") {
var b2:Tween = new Tween(bullet_two, "_alpha", Strong.easeInOut, 0, 100, 1, true);
var b2x:Tween = new Tween(bullet_two, "_x", Strong.easeInOut, 100, 115, 1, true);
trace(bullet2.time);
}
if (cuePtName == "bullet3") {
var b3:Tween = new Tween(bullet_three, "_alpha", Strong.easeInOut, 0, 100, 1, true);
var b3x:Tween = new Tween(bullet_three, "_x", Strong.easeInOut, 100, 115, 1, true);
trace(bullet3.time);
}
if (cuePtName == "bullet4") {
var b4:Tween = new Tween(bullet_four, "_alpha", Strong.easeInOut, 0, 100, 1, true);
var b4x:Tween = new Tween(bullet_four, "_x", Strong.easeInOut, 100, 115, 1, true);
trace(bullet4.time);
}
if (cuePtName == "bullet5") {
var b5:Tween = new Tween(bullet_five, "_alpha", Strong.easeInOut, 0, 100, 1, true);
var b5x:Tween = new Tween(bullet_five, "_x", Strong.easeInOut, 100, 115, 1, true);
trace(bullet5.time);
}
}
/*/////////////////////////////////////////////
//// LISTENERS for FLVPlayback component
////////////////////////////////////////////*/
var alreadyShown:Boolean;
var startObject:Object = new Object();
startObject.playing = function(eventObject:Object): Void {
trace("FLV is playing");
if(alreadyShown != true) {
var laserFadeIn:Tween = new Tween(bullet_bg, "_alpha", Strong.easeInOut, 0, 100, 3.4, true);
alreadyShown = true;
}
}
playback1.addEventListener("cuePoint", listenerObject);
playback1.addEventListener("playing", startObject);
**Issue:
**Everything seems to load in fine, but when I put in 10.000 seconds for the last cue-point it screws up everything and all the cue-points before it are negated and all trigger at once when it hits that 10.000 mark. If I put in 9.999 seconds it works fine, it just crossing that 2 digit threshold. Is there specific time format for these, and does anyone know why this is happening?
Update:
When I hardcode the 10.000 seconds into the code, everything works fine. Any ideas?
i.e. bullet5.time = 10.000