Java Reference
In-Depth Information
time: .7s
action:function(){
var totalProgress = seq1.progress() + seq2.progress() + seq3.progress();
if (totalProgress == 300.0){
checkProgress.stop();
progressText.text = "";
asteroidButton.disable = false;
jackButton.disable = false;
skullButton.disable = false;
} else {
var progress:Integer = Math.round(totalProgress/300.0*100);
progressText.text = "Loading Images...{progress}%";
}
}
}
}
checkProgress.play();
}
function asteroid():Void{
sequenceView = ImageSequenceView{
translateX: 640/2
translateY: 480/2
imageSequence:
MediaLoader.imageSequence("/org/lj/jfxe/chapter7/images/asteroidA_64_", 31, false)
}
anim.play();
}
function jack():Void{
sequenceView = ImageSequenceView{
translateX: 640/2
translateY: 480/2
imageSequence: MediaLoader.imageSequence("/org/lj/jfxe/chapter7/images/bomb-pur-64-
", 63, false)
}
anim.play();
}
function skull():Void{
sequenceView = ImageSequenceView{
translateX: 640/2
translateY: 480/2
imageSequence:
MediaLoader.imageSequence("/org/lj/jfxe/chapter7/images/Explosion01_", 35, false)
}
anim.play();
}
In Listing 7-1 the main function builds the scene. A couple of buttons are added and an
ImageSequenceView called sequenceView is added. There is also a Label used to tell the user that the
Search WWH ::




Custom Search