A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: please could you help my script a cuepoint with a button

  1. #1
    Junior Member
    Join Date
    Apr 2009
    Location
    plymouth UK
    Posts
    20

    please could you help my script a cuepoint with a button

    hello again

    please could you help me with some coding

    i have a video with cuepoints playing in a player

    i have 3 cuepoints in the video. hazard1, hazard2 and end. when the end cuepoint occurs at the moment i have a message that states click here to go to next video.

    what i would like to happen is that rather than a message to appear i would like a button to appear. the button is called NxtVid1.

    here is my coding so far

    stop();


    var listenerObject:Object = new Object();
    var inBound:Boolean = false;

    listenerObject.cuePoint = function(eventObject:Object):Void {
    if(eventObject.info.name=="Hazard1")
    {
    inBound = true;
    }
    else if(eventObject.info.name=="Hazard2")
    {
    inBound = false;
    }
    else if(eventObject.info.name=="End")
    {
    // i would the button "NxtVid1" to appear when the end cuepoint is reached. my code so for is
    // myListener.cuePoint = function (evt){
    // NxtVid1


    //trace("Click Here for next clip")
    }
    }

    Hazardbtn1.onRelease = function(){
    if(inBound)
    {
    trace("You win.");
    }
    else
    {
    trace("You lose.");
    }
    }

    NxtVid1.onRelease = function(){
    gotoAndStop(2);
    }

    video1.addEventListener("cuePoint", listenerObject);


    If you need any extra information please ask or contact me on [email protected]

    any help from you will be very greatly appreciated.

    thank you very much for your time

    adrian

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    place the button on stage
    use the _visible property to hide the button - NxtVid1._visible = false;

    when the "End" cuepoint is reached, show the button -
    else if(eventObject.info.name=="End"){
    NxtVid1._visible = true;
    }

  3. #3
    Junior Member
    Join Date
    Apr 2009
    Location
    plymouth UK
    Posts
    20
    thank you very much

    it has done the trick

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center