Replay button

hello,
i've got a pretty simple CS3 animation. Just about at the end
of the timeline a replay button appears. However, so far I can't
get it to work.
In the replay button's timeline, I have defined keyframes for
up, over and down states. (the button is changing images properly
when I hover the mouse over it, and press down.) For the hit state,
I've created a keyframe. I've also tried to insert some Action
Script there. The window for the Action Script says "Current
selection cannot have actions applied to it." So, my first question
is: Does CS3 allow for Action Script to appear in the timeline of a
button? I keep reading how people are applying AS3 in button
timelines, but I can't put my AS3 in the "hit" frame's keyframe.
So, i've tried to get the button to work using the main
timeline. I've given the button an instance name: btnReplay. In the
first frame of the timeline, I've got AS that says:
function replayClick(event:MouseEvent):void
trace('inside onClick');
gotoAndPlay(1); // plays the current timeline from 1
} // end of onClick
btnReplay.addEventListener(MouseEvent.CLICK, replayClick);
Unfortunately, i get a compiler error with the first line.
(I've changed my AS version to 1-2, it still gives me the error.
So, I'm currently running AS3.)
The compiler error says '{' expected. I've compared this
first line (i.e., "function...") with other examples that I've
found, and I don't see what the source of the compiler error is.
does anyone have any advice? Thanks.

Ned,
thanks for looking at my FLA file. I sent it to your email.
However, here's some comments:
1. when I run it, I get an error on frame 103, line 1. It
says '{' expected with this statement:
function replayClick(event:MouseEvent):void
2. frame 109 has some AS3 that doesn't work. Here's the code:
var request="
http://www.Adobe.com"
try {
flash.net.navigateToURL(request, "_self");
catch (e:Error) {
// handle error here
// trace('e:Error: ' + e:Error);
I'm trying to give the user about 5 seconds to hit the
"replay" button. If the person doesn't do this, then I want the
flash to force the calling page to load a new page. (So that the
calling page functions as a splash page.)
3. the replay button doesn't work.
Thanks again for looking at my FLA. I appreciate it.

Similar Messages

  • Ipod 4.3.1 : after playing a video, i couldn't get the replay button, instead of that i get black screen fully

    ipod 4.3.1 : after playing a video, i couldn't get the replay button, instead of that i get black screen fully

    Have you tried resetting your iPod: Nothing will be lost:
    Reset iPod touch:  Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.

  • Remove Video Controls and add Replay button on page

    Hello,
    I am trying to create a page in Adobe Edge that loads a video without any controls (play, slider bar, volume, full screen) and then displays a replay button after the video finishes which will start it from the beginning.
    Currently I am able to load the video file and have it play to the end and stop, but I can't seem to get a replay button working.  I also can't find a way to disable controls on the video so they do not show.
    Here is the code I am using to load the video:
    // insert code to be run when the composition is fully loaded here
    $("#Stage").css("margin","auto")
    sym.stop();
    // original video play code starts here
    // create a text object called vid;
    var vid = $("<video width='980' height='300' controls='none'>" +
       "<source src='video.mp4' type='video/mp4' />" +
       "<source src='video.webm' type='video/webm' />" +
       "<source src='video.ogv' type='video/ogg' />" +
       "This browser is not compatible with HTML 5" +
    "</video>"
    sym.$("replay_btn").stop().animate({"size":"absolute", "top":"-265", "left":"7", "opacity":"1"}, 0);
    // stage symbol lookup, and append the above vid object to it;
    // in other words, get the div called 'vcontainer' and attach the video control to it;
    sym.$("vContainer").append(vid);
    // additional options for the video object
    vid.attr('autoplay', 'autoplay');
    vid.attr('preload','auto');
    vid.attr('controls', 'none');
    // End original code
    // this is the insert for the action after the video ends
    $(vid).bind("ended", function () {
    sym.$("vContainer").stop().animate({"size":"absolute", "left":"0", "opacity":"0"}, 0);
    sym.$("replay_btn").stop().animate({"size":"absolute", "top":"394", "left":"19", "opacity":"1"}, 0);
    $("#Stage").on('click','#replay_btn',function(){
    vid.pause();
    vid.currentTime = '0';
    vid.play();
    sym.$("vContainer").stop().animate({"size":"absolute", "top":"133", "left":"0", "opacity":"1"}, 0);
    vid.removeAttribute("controls");
    As you can see, I tried a few ways of disabling the controls, and I also tried adding the replay function to the button itself, but neither of those worked.  Any advice or information on controlling the video control display and replay function in Adobe Edge would be very helpful.
    Thanks!

    In case anyone is interested in the replay button, I was able to find code that worked:
    var myVideo = document.getElementById("activeVideo");
    myVideo.currentTime = 0;
    myVideo.play();
    This is executed when the replay button is clicked.  Just be sure to set the video in question's ID to "activeVideo".
    I am still unable to turn off the controls on the video.  It seems like some of the code I have tried should work, but I haven't had success yet.
    I've tried all of the following:
    var vid = $("<video width='980' height='300' controls='none'>"
    var vid = $("<video width='980' height='300' controls='0'>"
    var vid = $("<video width='980' height='300' controls=''>"
    vid.attr('controls', 'none');
    vid.attr('controls', '0');
    vid.attr('controls', '');
    But nothing has worked so far.  Any help would be much appreciated.
    Thanks!

  • How do you make a replay button?

    I made a flash movie and all i need to do is make a replay button, but i have no idea how. i am using cs5. my movies goes through multiple scenes so at the last scene i want them to click on the reply button to go to the 1st scene again. however, i have no idea where my actions layer and labels layer go or what action to put into my button.
    i looked around, but every video i find, they seem to only be working in one scene and within one layer too.
    --edit--
    this works just fine:
    http://www.youtube.com/watch?v=k9UjtNxAQN8&NR=1

    assuming no variables/code need to be reset, you can use:
    yourreplaybutton.onRelease=function(){
    _root.gotoAndPlay(1);

  • HT1689 On the new version of  iTunes the shuffle button and replay buttons appear to have disappeared on the genius tab and am always having to listen to shuffled songs now :( how can I stop this?

    On the new version of  iTunes the shuffle button and replay buttons appear to have disappeared on the genius tab and am always having to listen to shuffled songs now :( how can I stop this?

    It appears from many other posts that the " Keep This iPod in the Source List" function isn't included in iTunes 7 unfortunately. You can leave your feedback on it's absence at this link: Apple Product Feedback
    You can check out a workaround at this link which may help out for now: Create ready-to-sync playlists for Shuffles in iTunes 7

  • Creating a Replay Button for a Flash Video

    I want to replay a flash video by clicking on a "replay" button. I know how to creat the buttons. I can't figure out how to create the action script. Thanks in advance for any help.
    I know how to create the Action Script to replay flash, but when I have a flash video that I want to replay that's when I run into trouble.

    Hi,
    This snippet should hint a solution to you (NetStream class):
    netStream.seek = 0;
    netStream.resume();
    Anyway, you would need to know when the movie has finished playing.
    On a Flash Media server, there should be an event just for that.
    If you are not running on such a kind of server, make yourself a cuepoint to listen to, at the very last frame of the movie, so your app knows when its time to offer the replay functionality. You can insert cuepoints in a movie when you are in the Flash Video Encoder options.
    Design Cyboïde
    Création de sites web Montréal

  • Flash help for replay button

    I have a simple movie that consists of 1 scene with some
    layers. Each layer
    contains a movie clip and there's an actions layer with a
    stop action. All
    the clips play at once. The clip that contains the ending
    sequence contains
    a replay button. The actionscript is as follows:
    on (release) {
    gotoAndPlay("Scene 1", 1);
    With simple buttons enabled within flash, it does what is
    expected, but when
    I save as a .swf, it goes back to the first frame of the
    movie clip it's
    contained in, not the movie itself. How do I add a replay
    button to a movie
    set up the way I have it?
    Thanks
    -mark

    Thanks for that. I got it to work by simply having the button
    reload the
    movie. I got to thinking that since all the clips play
    through and then stop
    at their respective endings. Going back to the first frame of
    the root may
    not work as the root only has 1 frame and the clips have
    already played
    through. Figured I should reload the movie.
    But I'll try your solution and see if it also works.
    -mark
    > on(release){
    > _root.gotoAndPlay(1);
    > }
    >
    > You don't need to specify a scene name unless you are
    moving outside of the
    > scene.
    >
    > The _root sends the action to the root timeline, so if
    this is inside of a
    > movie clip, the action will happen at the root level.
    >

  • Back button & Replay button for Flash movie on website

    Three questions all related:
    1. I need to add a "Back"  and a "Replay" button to a Flash movie that plays full screen when the link is clicked on a website. I have created the two buttons and placed them on the stage. I've given them the names back_btn and play_btn. I've tried several scripts from postings on the Forum for the replay button but all of them come up with errors such as, "1119: Access of possibly undefined property onRelease through a reference with static type flash.display:SimpleButton" when I use this script:
    stop();
    play_btn.onRelease = function()
    play();
    I also tried this script:
    stop();
    play_btn.addEventListener(MouseEvent.CLICK, playMovie);
    function playMovie(event)
    play();
    It didn't report any errors, but it didn't work.
    2. I saw a posting that said one needs to name the movie clip and reference it in the script. Would this be the file name of the movie after it is exported? I am unclear on this.
    3. For the "Back" button, would I include the whole url to get the viewers back to the previous page or is there a shortcut way to get them back there?
    If you can help, please provide detailed script as I do not know Action script.
    Thank you,
    Marilyn

    Hi, Ned:
    I have a presentation completed that is already up  on a website and now I need the "Back" button and "Replay" button, so whether I'm ready or not, I have to find a solution. I know I'm missing some important step. I have Lynda.com and I can usually figure out what's wrong with the lessons on there, but this one has me stumped.
    I did try the code change you sent and I was unable to get the movie to replay. I'm attaching two screen shots so you'll see that I did have the button instance named properly and the Action Script correctly written. You can "Ctrl" "Scroll" to enlarge the images on your screen.
    Marilyn

  • Flash video replay button

    Hi all..
    I'm working on a flash video.. I have no problem converting/linking the video, etc - however, need to have a replay button as well as another button (to go to another page and such) after the video is done playing... Can anyone help me out or diret me to a tutorial about this? I'm assuming that I need to check for when the video is done playing and than make the buttons visible?
    Thanks a bunch ahead of time!

    here's an example, it assumes you have two buttons on stage or instantiated(restartButton and goButton), and your vid file/playback linked up etc
    restartButton.addEventListener(MouseEvent.CLICK, restartVideo);
    goButton.addEventListener(MouseEvent.CLICK, goSomewhere);
    goButton.visible = false; // hiding it till you need it
    myVideoPlayBack.addEventListener(Event.COMPLETE, setGoButtonVisible);
    function restartVideo(event:MouseEvent):void
         myVideoPlayBack.stop();
         myVideoPlayBack.seek(0);
         myVideoPlayBack.play();
    function setGoButtonVisible(event:Event):void
         goButton.visible = true;
    function goSomewhere(event:MouseEvent):void
         //whatever this should do, be it load a page, go to a frame etc
    HTH

  • AS3 Replay Button

    OK, so here I am having finished my flash project and I have
    no reply button. I tried adding the code to the button, but had to
    slap myself very hard seeing as how I created a AS3 document! Now I
    have no idea how to make a replay button with AS3. I read some
    gibberish somewhere online, but don't understand it. There was a
    mile of code and something called a listener....wha?
    There has to be a simple easy way to add a replay button like
    on action script 2....
    If not, can someone made a step by step tutorial on how to
    add a replay button? Please T.T
    Thanks
    D

    I get this error:
    quote:
    ArgumentError: Error #2109: Frame label beginning not found
    in scene DEATH.
    "DEATH" being the scene name.

  • Replay button in Cp7

    How can I add a replay button to a slide in Captivate 7.0? I saw online a way to do that using advanced actions, but I didn't understand. Thank you!

  • Replay button problem

    Hello,
    I have a problem with my Replay button. I've created the same advanced action that I've used earlier withount issues. Instead of replaying the slide it just freezes.
    Anyone seen this before or have an idea of what the reason could be?
    I use Captivate 5 on XP. I'll attach a pic of the advanced action.
    Thanks in advance.
    Kind regards,
    Patrik

    Hi Anjaneai,
    Thanks for the prompt reply.
    The button is set to infinite attempts, I have not changed it anyway.
    I tried to insert a blank slide with just the replay button and a caption, still the same problem.
    On an average slide there is basically four buttons, next, back, home and replay. With this there are captions and basic shapes, nothing fancy.
    This has worked just fine before, but with this project it doesn't. Confusing to say the least.
    Kind regards,
    Patrik

  • Replay button AS3

    I wastrying to set a script to a replay button placed in a different scene then the main timeline and I was trying all solutions provided from all forum nothing seems work for me.

    Show the code you tried that did not work and explain what it is supposed to be doing... otherwise, you are probably just going to end up with more information that you do not know how to interpret into your design.

  • Replay button like youtube

    im making a 300x250 banner. im having trouble with the replay button. i want it to appear at the end of the video. anyone can help me? im using adobe cs5 trial version and actionscript 2.0

    again, are you using an flvplayback component?  or, are you using a netstream instance?  or, did you embed the flv in a  timeline? or, something else?

  • Replay Button troubles...

    Hello Everyone!
    I am in need of some assistance with attaching the
    actionscript to replay my movie (and the music to go along with
    it).
    This is what I have done:
    1. My button has been created. I just don't know where to put
    the actionscript.
    2. I'm using Flash CS3.
    Any response will be fine. Basically I just need to know
    where to put the actionscript for this replay button.
    Thank you so much!!! :)

    Hi,
    I am still having trouble attaching the code.
    This is what I am doing:
    1. Like I said before, the button has been created.
    2. now from what i've been reading, you can only attach the
    script to the main timeline of the movie, however I only want to
    attach the code to the button and I cannot.
    3. Something I did try was copying a replay button from
    another movie into the movie i'm working on now. When I go to test
    the movie, I get this error:
    WARNING: Actions on button or MovieClip instances are not
    supported in ActionScript 3.0. All scripts on object instances will
    be ignored.
    I really want to get this accomplished today, any help is
    appreciated. Thank you all so much.
    This is the code that is attached to the copied replay button
    from the previous movie:

Maybe you are looking for

  • Oracle 10G Linux runInstaller Error in writing to directory

    RDBMS Version: 10.1.0.3.0 Operating System and Version: Enterprise Red Hat Linux 4.0 Linux runInstaller Error in writing to directory Steps :- 1. Downloaded the Install 10.1.0.3 for Linux X86 2. Followed the Instructions as per B15521-01 3. When runn

  • Export file out of sync

    Exported mov file is out of sync after about 2 minutes into a 4 minute clip. Using FCXP 10.0.5 Exporting using h.264 Using one audio clip in a multi cam edit Audio - stereo Sample rate is 48kHZ Video - 1080P 29.7p video Using high quality original/op

  • Ajax Autocomplete

    Hi Folks, i´m using one of the great examples of Denes Kubicek and have a question. I have a textbox. let´s call it P1_CITY. I enter some characters and it autocompletes the city. OK, works! Example: MUNICH But know i want to build a second textbox.

  • Double click does not work

    I used to be able to double-click on cfm files on my computer (XP pro) or right-click and select "Edit in Homesite+" and they would open perfectly in Homesite. (I'm running Homesite 5.5.) Now, for some reason, neither of those work -- when I try them

  • Preview lists too many files

    When Preview is open and I right click on the Preview icon, a list of files appears.  The list is split in two by a faint horizontal line.  The documents below the line are preceded by a diamond and if I go to one of them, I can close it.  I can also