Could you help me with some coding please
hello there
please could you help me with some action script in flash 8.
what i would like to achieve is an if statement or something similar where a user will click on the hazard button. if the user clicks on the hazard button between the cuepoints of hazard1 and hazard2 the flash will output will say "win". if the user clicks on the hazard either before the hazard1 cuepoint or after the hazard2 cuepoint the flash output will be "lose"
if there is anything else that you need to know please post here or contact me on [email protected] and i will reply ASAP
once again many thanks to all who can help
thank you for your time
adey
stop();
//button to next frame
NxtVid.onRelease = function(){
gotoAndStop(2);
}
trace("Hazard clip 1");
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
// Put any code you like here
//trace("Cue point name: " + eventObject.info.name);
//trace("Cue point type: " + eventObject.info.type);
if(eventObject.info.name=="Hazard1")
{
trace("start timer")
}
else
if(eventObject.info.name=="Hazard2")
{
trace("stop timer")
}
//if the hazard button is pressed between hazard1 and hazard two output "win"
Hazardbtn.onRelease = function(){
trace ("hazards pressed");
}
// if(eventObject.info.name=="Hazard2")
//and
//if(eventObject.info.name=="End")
// {
// trace ("win")
//}
if(eventObject.info.name=="End")
{
trace("Click Here for next clip")
}
}
video1.addEventListener("cuePoint", listenerObject);