Go to next frame

Hi,
     I have a FLA that was originally created in indesign and I'm trying to get it to go to the next frame at a set interval. This is my first attempt at action script This is what I've come up with but it's not working. any help would be much apreciated
stop();
var myTimer:Timer = new Timer(5000);
myTimer.addEventListener(TimerEvent.TIMER, fiveSec);
myTimer.start();
function fiveSec(event:TimerEvent):void
   this.nextFrame();

There's nothing wrong with the code.  Do you have enough frames in the timeline to go anywhere?  Try putting a trace in the function to see what it has to say about which frame you're in...
function fiveSec(event:TimerEvent):void
   this.nextFrame();
   trace(currentFrame);

Similar Messages

  • End of Flv to go to next frame

    > This message is in MIME format. Since your mail reader
    does not understand
    this format, some or all of this message may not be legible.
    --B_3261382853_1599170
    Content-type: text/plain;
    charset="ISO-8859-1"
    Content-transfer-encoding: 8bit
    I have a flash movie with an external .flv file playing in
    it. I would like
    that once the video ends, it should play the next frame in
    the flash file, I
    have searched a lot on the net I can¹t seem to find
    anything easy to
    implment. Can someone help me pleaseeeeeeee?!??!
    --B_3261382853_1599170
    Content-type: text/html;
    charset="ISO-8859-1"
    Content-transfer-encoding: quoted-printable
    <HTML>
    <HEAD>
    <TITLE>End of Flv to go to next frame</TITLE>
    </HEAD>
    <BODY>
    <FONT FACE=3D"Helvetica, Verdana, Arial"><SPAN
    STYLE=3D'font-size:12.0px'>I hav=
    e a flash movie with an external .flv file playing in it. I
    would like that =
    once the video ends, it should play the next frame in the
    flash file, I have=
    searched a lot on the net I can&#8217;t seem to find
    anything easy to implm=
    ent. Can someone help me
    pleaseeeeeeee?!??!</SPAN></FONT>
    </BODY>
    </HTML>
    --B_3261382853_1599170--

    var vidList : Object = new Object();
    vidList.complete = function() {
    _level0.play(); //this is the action that occurs when the
    movie is finished
    vid.addEventListener ("complete",vidList);
    stop();
    The FLVPlayback component needs an instance name of vid for
    this to work

  • Cue point to jump to next frame of movie

    Hi. I'm a bit lost assigning an action script created
    CuePoint (Entered in Paramenters Window for FLV media component) to
    tell my SWF movie to advance to the next frame and thus call the
    next video I want to throw onto that next keyframe.
    I know this must be basics to most, but somewhere I'm
    missing it. Once a CuePoint is created, how do I link that to
    trigger an action?

    Thanks for reply. I was out of things for a week with flu.
    Serious flu. Now I have to catch up. Grrrr.
    Does that mean ("cuePoint" , ... needs to be replaced with
    the actual name of the cue point to work?
    + The Cue point Parameters. What should they be set
    as?

  • Skip to next frame

    Dear all
    how can I advance to a next frame in a sequence upon a condition
    becoming true in a previos frame? I am waiting for a response from a
    serial instrument. If the instrument does not respond, the program sits
    there forever. I would like to have some time-out condition, i.e. if no
    response for, say, 5 seconds- move to next frame. Something easy 2 do in
    a text based language- but how can I do it in labview?
    TIA
    YZ

    I must agree with joe, anytime I see a sequence a state machine comes to mind, this is a much more flexible solution since you can easily modify the order of a sequence, skip steps by just modifying the transition logic.  I made the change from sequence to state machined about 3-4 years age and havent looked back.  Finite automata is a very well studied and mature design pattern and is easily modeled and implemented in labview.  The only disadvantage to it is that it is a little bit  more conceptually difficult to grasp than a sequence structure. 
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • If Multiple Hittests equal true, go to and play next frame

    Hi All,
    I am trying to finish up a project and run into this problem, right now I am trying to create a drag and drop game and on the last game you can drop
    parts into the others, what I want to happen is that when all are in the correct spot gotoandplay next frame. This is my current code,
    Thanks
    if(one_mc._droptarget=="/onedef_mc" && two_mc._droptarget=="/twodef_mc" && three_mc._droptarget=="/threedef_mc" &&
    four_mc._droptarget=="/fourdef_mc" && five_mc._droptarget=="/fivedef_mc" && six_mc._droptarget=="/sixdef_mc" &&
    cave_mc._droptarget=="/cavedef_mc" && eight_mc._droptarget=="/eightdef_mc" && nine_mc._droptarget=="/ninedef_mc" &&
    ten_mc._droptarget=="/tendef_mc" && eleven_mc._droptarget=="/elevendef_mc" && twelve_mc._droptarget=="/twelvedef_mc");
    this is the if statement, im just not sure how to implement the gotoandplay...
    Does this make sense?
    Thanks

    if you don't have code to check if all the movieclips have been dropped on their targets, there's no way that code can work.
    use something like:
    one_mc.onPress = function()
    one_mc.startDrag();
    one_mc.onRelease = function()
    checkF();
    if(one_mc._droptarget=="/onedef_mc")
      // align Sprite3
      one_mc._x = onedef_mc._x + (onedef_mc._width-one_mc._width)/2;
      one_mc._y = onedef_mc._y + (onedef_mc._height-one_mc._height)/2;
      one_mc.gotoAndPlay("success");
      // the code in italics doesn't look right
    } else {
      (one_mc._droptarget=="/onedef_mc")
      // align Sprite3
      one_mc._x = onewrong_mc._x + (onewrong_mc._width-one_mc._width)/2;
      one_mc._y = onewrong_mc._y + (onewrong_mc._height-one_mc._height)/2;
      onedef_mc.gotoAndStop("fail");
    one_mc.stopDrag();
    function checkF(){
    if(one_mc._droptarget=="/onedef_mc" && two_mc._droptarget=="/twodef_mc" && three_mc._droptarget=="/threedef_mc" &&
    four_mc._droptarget=="/fourdef_mc" && five_mc._droptarget=="/fivedef_mc" && six_mc._droptarget=="/sixdef_mc" &&
    cave_mc._droptarget=="/cavedef_mc" && eight_mc._droptarget=="/eightdef_mc" && nine_mc._droptarget=="/ninedef_mc" &&
    ten_mc._droptarget=="/tendef_mc" && eleven_mc._droptarget=="/elevendef_mc" && twelve_mc._droptarget=="/twelvedef_mc"){
    gotoAndPlay(_currentframe+1);

  • Go back/next frame label

    Hi:
    How can I code a button that goes back to the previous frame
    label and another that goes to the next frame label?
    I know about prevFrame() and nextFrame(), but I need
    something similar that references the next/previous named label and
    not the frame number... Any ideas?
    thank you,
    Rafael.

    I don't think someone who is 'new to flash' will not be able to get this by just having the attributes and properties mentioned.  (If you can do that, you're pretty good at it already). Maybe someone can help me with this simple test Flash (which should serve as a begineer tutorial).  (If you are a Flexer, I have made a Flash timeline with three Frame Labelled sections: "One", "Two" and "Three".  Each has two buttons ("nextButton" and "prevButton") along with a text number on the stage, denoting which frame section we are on).  Here is the Actionscript code:
    stop();
    import flash.events.MouseEvent;
    nextButton.addEventListener(MouseEvent.CLICK, onNext)
    function onNext(event:MouseEvent):FrameLabel
    gotoAndStop(nextFrame);
    prevButton.addEventListener(MouseEvent.CLICK, onPrev)
    function onPrev(event:MouseEvent):FrameLabel
    gotoAndStop(prevFrame);
    With this, I get the error:"ArgumentError: Error #2109: Frame label function Function() {} not found in scene Scene 1."  I think this means that I'm supposed to define a function (is it the function that calls my FrameLabel array?).  How do I do this?

  • Action Script for next frame

    Hi,
    I'm making an interactive world map.
    The idea is that the mouse rolls over a country which makes
    the country goes red and the countries name appears. I have got
    this to work fine, but I am trying to use some script so that when
    the mouse clicks down and releases on the country, another screen
    appears which is a screen with information about the country (the
    original screen needs to disappear - it's not a box of text which
    will appear but a whole new screen)
    Can anyone advise? I have tried to use a basic 'on release go
    to' script but it doesn't work.
    Thanks very much.

    Thanks, I've got this to work now, but when it advances to
    the next frame it keeps looping back to the first frame. I've tried
    using stop() on the frame I am advancing to, gotoandStop(2) in the
    first frame and a few other things I have found in the looping
    problem threads on this forum. I'm publishing as a flash movie not
    HTML.
    Any thoughts?

  • Quick key launch for next frame in sequenced loop?

    Hi, 
    I want go quickly through my sequence loop. Is there a key combo for next frame?
    Thanks
    Solved!
    Go to Solution.

    ctrl + mousewheel will skip through frames in all structures
    - Cheers, Ed

  • Queued up events are supposed to get processed the next frame, but in practice it is not true!

    According to Adobe's documentation found here, there are 3 parts to runtime code execution: events, the enterFrame event, and rendering. Events, it says, are processed during the first part. It then states:
    If events occur during other parts of the execution cycle, the runtime queues up those events and dispatches them in the next frame.
    However, when I'm seeing a low framerate, and lots of input events occur (say mouseclicks for example), those events are sometimes not executed until several seconds and 10s of frames later. According to that documentation, all my mouseclicks should be processed on the next frame and the event queue should then be empty (assuming I don't click during the next frame). This problem only occurs in Firefox and Internet Explorer. Chrome, Safari, and the standalone player behave correctly, in that they process all input events on the following frame.
    Why is this happening? It seems like the Firefox and IE plugins implement event handling differently than what is described in the flash documentation, or is it possible the browsers are responsible for delaying the input to flash?

    each clock cycle, if no new objects were created and no previously created objects are eligible for gc:
    Flash checks for any events completed from the previous cycle.
    Then it executes the listener function code, if there is any, for those events.
    Then if you have code on a frame that was just entered, that code will execute.
    Then it dispatches the Event.ENTER_FRAME event to all your listeners for that event.
    Then the display is rendered.
    in view of that and knowing that time alone cannot be used to determine in which cycle anything occured in flash, what evidence do you have that an event dispatched in one cycle failed to be detected by a listener in the next cycle?

  • Crop Tool -- shortcut to advance to next frame since forward arrow doesn't work in crop tool?

    Hi,
    As a pro, I crop all my photos.
    I normally use the forward arrow to move through each image, but with the crop tool the forward arrow doesn't work for advancing to the next frame.
    It only adjusts the crop.
    This is extremely frustrating for me as it slows down my workflow.
    Is there a one key shortcut, within the Crop Tool -- that permits us to move forward from frame to frame?
    I wish the forward key worked for this within the crop tool!
    Is there an easy answer or a way to format something in Lightroom -- so I can have a one-key method to advance frames within the Crop tool?
    thank so much, Teri

    Thank you so much Jim, really appreciate you're taking the time to get back to me... its so helpful and now I can get my jobs done!
    I just tested it on my Mac and it worked with the Command + arrow Key...
    However, using two fingers for this shortcut is a little clumsy and uncomfortable...
    I think there's a way to create your own keyboard shortcuts -- do you know how to do this, maybe assigning a single key which would be a little easier?
    Thanks again so much for taking the time to answer this Jim and hope you have a great night!
    all the best, Teri

  • TweenEvent.MOTION_FINISH & how can I get "next frame()" to work?

    I just started learning AS3 the other day and NEED HELP!!. I'm trying to tween two movie clips at the same time and when they are finished, make them timeline move to the next frame. How do I do this or make it work!?!!?!? .
    Here is my current code:
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    import fl.transitions.TweenEvent;
    var myTween:Tween = new Tween(doorRightMc, "x", Bounce.easeOut, 500.7, 1001, 3, true);
    var myTween2:Tween = new Tween(doorLeftMc, "x", Bounce.easeOut, 24.2, -480, 3, true);
    stop();
    myTween.addEventListener(TweenEvent.MOTION_FINISH, handleReset);
    function handleReset(e:TweenEvent):void {
        e.target.nextFrame();
    PLEASE Help me out with this! I can't get the nextFrame() function to work .
    Thanks!!!
    Here is the ERROR MESSAGE:
    Error: Error #1023: Stack overflow occurred.
        at fl.transitions::Tween/getPosition()
        at fl.transitions::Tween/update()
        at fl.transitions::Tween/set time()
        at fl.transitions::Tween/nextFrame()
        at intro4_fla::MainTimeline/onFinish()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at fl.transitions::Tween/set time()
        at fl.transitions::Tween/nextFrame()
        at intro4_fla::MainTimeline/onFinish()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at fl.transitions::Tween/set time()
        at fl.transitions::Tween/nextFrame()
        at intro4_fla::MainTimeline/onFinish()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at fl.transitions::Tween/set time()
        at fl.transitions::Tween/nextFrame()
        at intro4_fla::MainTimeline/onFinish()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at fl.transitions::Tween/set time()
        at fl.transitions::Tween/nextFrame()
        at intro4_fla::MainTimeline/onFinish()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at fl.transitions::Tween/set time()
        at fl.transitions::Tween/nextFrame()
        at intro4_fla::MainTimeline/onFinish()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at fl.transitions::Tween/set time()
        at fl.transitions::Tween/nextFrame()
        at intro4_fla::MainTimeline/onFinish()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at fl.transitions::Tween/set time()
        at fl.transitions::Tween/nextFrame()
        at intro4_fla::MainTimeline/onFinish()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at fl.transitions::Tween/set time()
        at fl.transitions::Tween/nextFrame()
        at intro4_fla::MainTimeline/onFinish()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at fl.transitions::Tween/set time()
        at fl.transitions::Tween/nextFrame()
        at intro4_fla::MainTimeline/onFinish()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at fl.transitions::Tween/set time()
        at fl.transitions::Tween/nextFrame()
        at intro4_fla::MainTimeline/onFinish()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at fl.transitions::Tween/set time()
        at fl.transitions::Tween/nextFrame()
        at intro4_fla::MainTimeline/onFinish()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at fl.transitions::Tween/set time()
        at fl.transitions::Tween/nextFrame()

    Stack overflows occur with infinite loops involving function calls (deep recursion).
    Your code causes a stack overflow because it calls the tween's nextFrame() function when the motion is already complete. That means that the MOTION_FINISHED event will be dispatched in the function you defined for the MOTION_FINISHED event: an infinite loop.
    I encountered a similar stack overflow when I tried to set the time of a tween beyond it's upper time in a MOTION_FINISHED event handler.
    ex.
    import fl.transitions.Tween;
    import fl.transitions.TweenEvent;
    import fl.transitions.easing.*;
    var xTween:Tween = new Tween(testObject, 'x', None.easeNone, 0, stage.stageWidth, 1, true);
    xTween.addEventListener(TweenEvent.MOTION_FINISH, handleReset);
    function handleReset(e:TweenEvent):void{
         e.target.time = 9001;
    (also, you're only supposed to use the nextFrame() method for frame-based tweens (Tweens with the useSeconds parameter set to false))

  • Newbie: How to go to the next frame after movie clip is complete

    I know this should be the simplest thing to do, but I can't
    figure it out. I have a movie clip on my timeline. I want it to
    play completely before the timeline moves to the next frame. Can
    someone point me in the right direction?

    On the last frame in the movieclip, place this code (it's
    Actionscript 2).
    _parent.nextFrame();

  • Once a timer is at 40 go to the next frame.

    Hey there,
    When a timer in my game hits 40 I want it to go to the next frame. Here is what I have:
    onClipEvent (enterFrame) {
              var atFrame:Boolean = false;
              if (_root.timer == 40) {
                        atFrame = true;
              } else {
                        _root.timer++;
              if (atFrame == true) {
                        myRandom = random(3);
                        if (myRandom == 0) {
                                  gotoAndStop("game1");
                        if (myRandom == 1) {
                                  gotoAndStop("game2");
                        if (myRandom == 2) {
                                  gotoAndStop("game3");
    Where "game1-3" are the names of my frames. And timer is the name of my dynamicText.
    Any suggestions as to why this isn't working would be greatly appreciated.
    Kind Regards, Eric

    first of all your variable must be initiated
    _root.timer=0
    Yor code is insede a MovieClip?
    I change the code
    _root.timer = 0;
    onClipEvent (enterFrame) {
              var atFrame:Boolean = false;
              if (++_root.timer == 40) {
                        goGame();
    function goGame() {
         myRandom = int(Math.random()*3);
          if (myRandom == 0) {
              _root.gotoAndStop("game1");
         if (myRandom == 1) {
              _root.gotoAndStop("game2");
         if (myRandom == 2) {
              _root.gotoAndStop("game3");

  • Removing a Button Event Listener on a Specific Frame and Reactivating it on Next Frame

    Hi , i am trying to develop a Slideshow where Next Button needs to behave in a certain way on a specific Frame , lets say a Specific Condition is met only then Next Button would work , I have been able to achieve that but problem is the Button Retains its Event Listener even on the next Frame , whereas  i have already included removeEventListener on the next frame with a new Function for the button , but its doesnt take it like that.
    Can anyone help please ?

    Hello Ned,
    I have fixed the issue with few Frame , but where we have the conditions to be met on two consecutive frames , I am not able to achieve that.
    here is the Code on my first Frame.
    FRAME1
    stop();
    slidecounter.text = String(this.currentFrame - 1 + "/" + indexframe);
    mc_prog.width = 0;
    //LIBRARIES TO BE IMPORTED ///////////////////////////////////////////////////////////
    import flash.events.MouseEvent;
    //VARIALBLES INITIATED
    var score:Number = 0;
    var questions:Number = 0;
    var qtotal:Number = 11;
    var attempt:Number = 0;
    var indexframe:int;
    indexframe = this.totalFrames - 1;
    var notes:Array = new Array();
    var count:int;
    count = 0;
    var backcounter:int;
    backcounter = 0;
    var count2:int;
    count2 = 0;
    var backcounter2:int;
    backcounter2 = 0;
    var count3:int;
    count3 = 0;
    var backcounter3:int;
    backcounter3 = 0;
    // MOVIE CLIPS INITITATED ////////////////////////////////////////////////////////////////
    var volbutton1:volcontrol;//VOLUME BUTTON ROLLOVER MOVIE CLIP
    volbutton1 = new volcontrol();
    var clist:courselist;//VOLUME COURSE LIST ROLLOVER MOVIE CLIP
    clist = new courselist();
    var pop1:Mc_slide9 = new Mc_slide9;
    pop1 = new Mc_slide9;
    var pop2:Mc_slide13 = new Mc_slide13;
    pop2 = new Mc_slide13;
    var pop3:Mc_slide17 = new Mc_slide17;
    pop3 = new Mc_slide17;
    //BUTTONS INITIATED
    btn_nxt.addEventListener(MouseEvent.CLICK, fl_ClickToGoToNextFrame);//NEXT SLIDE BUTTON
    btn_bck.addEventListener(MouseEvent.CLICK, backbtn);//BACK BUTTON
    btn_loc.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage); //LIST OF COURSES BUTTON
    btn_notice1.addEventListener(MouseEvent.CLICK, loadnotice1);
    pop1.closebtn.addEventListener(MouseEvent.CLICK, unloadbtn1);
    btn_notice2.addEventListener(MouseEvent.CLICK, loadnotice2);
    pop2.closebtn.addEventListener(MouseEvent.CLICK, unloadbtn2);
    btn_notice3.addEventListener(MouseEvent.CLICK, loadnotice3);
    pop3.closebtn.addEventListener(MouseEvent.CLICK, unloadbtn3);
    //VOLUME BUTTON ROLL OVER FUNCTION EVENT LISTENERS ///////////////////////////////////////
    btn_vol.addEventListener(MouseEvent.ROLL_OVER,vol);
    btn_vol.addEventListener(MouseEvent.ROLL_OUT,volout);
    btn_loc.addEventListener(MouseEvent.ROLL_OVER,coursel);
    btn_loc.addEventListener(MouseEvent.ROLL_OUT,corlist);
    // FUNCTIONS INITIATED /////////////////////////////////////////////////////////////////
    function fl_ClickToGoToNextFrame(event: MouseEvent): void
      nextFrame();
    function backbtn(event:MouseEvent):void{
       prevFrame();
    function fl_ClickToGoToWebPage(event: MouseEvent): void {
      navigateToURL(new URLRequest("https://www.onlineinduction.com/fmgl/courselist.php?ist=2&type=Vendor Employee Inductions"), "_self");
    //VOLUME BUTTON ROLLOVER EFFECT FUNCTION
    function vol(e:MouseEvent):void
      addChild(volbutton1);
      //popup_instance.width = 675;
      //popup_instance.height = 300;
       if(this.currentFrame == 2)
        volbutton1.x = 150;
        volbutton1.y = 528;
       else{
        volbutton1.x = 278;
        volbutton1.y = 528;
      function volout (e:MouseEvent):void {
        removeChild(volbutton1);
       function coursel(e:MouseEvent):void {
       addChild(clist);
        if(this.currentFrame == 2)
         clist.x = 85;
         clist.y = 532;
        else if(this.currentFrame == 5){
         clist.x = 115;
         clist.y = 325;
        else{
         clist.x = 175;
         clist.y = 532;
      function corlist (e:MouseEvent):void {
        removeChild(clist);
    function loadnotice1(Event:MouseEvent):void//FRAME 9 FUNCTION FOR IMPORTANT NOTICE
      if ( count == 1 && stage.contains(pop1))
       removeChild(pop1);
        if(count == 1)
         nextFrame();
        else
         addChild(pop1);
         pop1.x = 40;
         pop1.y = 120;
         count = 1;
      trace("Counter Value:" + count);
    function loadnotice2(Event:MouseEvent):void//FRAME 9 FUNCTION FOR IMPORTANT NOTICE
      if ( count2 == 1 && stage.contains(pop2))
       removeChild(pop2);
        if(count == 2)
         nextFrame();
        else
         addChild(pop2);
         pop2.x = 40;
         pop2.y = 120;
         count2 = 1;
      trace("Counter Value:" + count);
    function loadnotice3(Event:MouseEvent):void//FRAME 9 FUNCTION FOR IMPORTANT NOTICE
      if ( count3 == 1 && stage.contains(pop3))
       removeChild(pop3);
        if(count == 3)
         nextFrame();
        else
         addChild(pop3);
         pop2.x = 40;
         pop2.y = 120;
         count2 = 1;
      trace("Counter Value:" + count);
    function nextframe9(event: MouseEvent): void
        if(count == 1 && stage.contains(pop1) )
           removeChild(pop1);
        if(count == 1)
         nextFrame();
        else
         addChild(pop1);
         pop1.x = 40;
         pop1.y = 120;
         count = 1;
    function nextframe13(event: MouseEvent): void
        if(count2 == 1 && stage.contains(pop2) )
           removeChild(pop2);
        if(count2 == 1)
         nextFrame();
        else
         addChild(pop2);
         pop2.x = 40;
         pop2.y = 120;
         count2 = 1;
    function nextframe17(event: MouseEvent): void
        if(count3 == 1 && stage.contains(pop3) )
           removeChild(pop3);
        if(count3 == 1)
         nextFrame();
        else
         addChild(pop3);
         pop3.x = 40;
         pop3.y = 120;
         count3 = 1;
    function backbtnscript1(event:MouseEvent):void
       if(stage.contains(pop1) )
          removeChild(pop1);
          backcounter = 1;
          trace("back" + backcounter);
          prevFrame();
    function unloadbtn1 (e:MouseEvent):void {
      removeChild(pop1);
    function backbtnscript2(event:MouseEvent):void
       if(stage.contains(pop2) )
          removeChild(pop2);
          backcounter2 = 1;
          trace("back" + backcounter2);
          prevFrame();
    function unloadbtn2 (e:MouseEvent):void {
      removeChild(pop2);
    function backbtnscript3(event:MouseEvent):void
       if(stage.contains(pop3) )
          removeChild(pop3);
          backcounter3 = 1;
          trace("back" + backcounter3);
          prevFrame();
    function unloadbtn3 (e:MouseEvent):void {
      removeChild(pop3);
    //SLIDE COUNTER
    and here is the Code on all the Frames where I need to call in specific Listeners
    FOR EXAMPLE ON FRAME 8,9,10,
    Here Is the Code ,
    FRAME 8
    stop();
    slidecounter.text = String(this.currentFrame - 1 + "/" + indexframe);
    count = 0;
    backcounter = 0;
    btn_nxt.addEventListener(MouseEvent.CLICK , fl_ClickToGoToNextFrame);
    btn_bck.addEventListener(MouseEvent.CLICK, backbtn);
    btn_bck.removeEventListener(MouseEvent.CLICK , backbtnscript1);
    btn_nxt.removeEventListener(MouseEvent.CLICK , nextframe9);
    pop1.closebtn.addEventListener(MouseEvent.CLICK, unloadbtn1);
    //btn_notice1.addEventListener(MouseEvent.CLICK , loadnotice1);
    FRAME 9
    stop();
    slidecounter.text = String(this.currentFrame - 1 + "/" + indexframe);
    //POPUP FUNCTION
    count = 0;
    btn_nxt.removeEventListener(MouseEvent.CLICK , fl_ClickToGoToNextFrame);
    btn_bck.removeEventListener(MouseEvent.CLICK, backbtn);
    btn_bck.addEventListener(MouseEvent.CLICK , backbtnscript1);
    btn_nxt.addEventListener(MouseEvent.CLICK , nextframe9);
    btn_notice1.addEventListener(MouseEvent.CLICK , loadnotice1);
    FRAME 10
    stop();
    slidecounter.text = String(this.currentFrame - 1 + "/" + indexframe);
    count = 0;
    backcounter = 0;
    btn_nxt.addEventListener(MouseEvent.CLICK , fl_ClickToGoToNextFrame);
    btn_bck.addEventListener(MouseEvent.CLICK, backbtn);
    btn_bck.removeEventListener(MouseEvent.CLICK , backbtnscript1);
    btn_nxt.removeEventListener(MouseEvent.CLICK , nextframe9);
    pop1.closebtn.addEventListener(MouseEvent.CLICK, unloadbtn1);
    I am repeating this Pattern on each frame set where I need these Listeners ,
    Problem is with the next one where I have two consecutive frames have different conditions to meet, any ideas how would I disable and enable listeners respectively on these frames ?
    I hope I am not confusing this very much ?;(

  • How do I optimize "Waiting for the next frame"

    When running my swf file in release build, the first time I start the browser after cleaning the browser cache, the .swf will appear in less than a second.  If I attach scout, I can see it is around .7 seconds to finish.
    However, after this run all subsequent times I load the page, it takes ~3 seconds.
    When I look at scout, I see almost identical CPU and memory use , but it is spending ~2.3 seconds "Waiting for the next frame".  (almost an extra 700ms per frame).
    There is no requirement for animation, all of the content is very static.   I'd just like to render it as fast as possible.
    I know it's not related to caching the .swf file because I have tried turning off the caching (by adding a random parameter) and verified using Httplogger that it is always downloading a new .swf file.  (I turned back on caching).  So I'm kind of not sure what to do next...
    What things can I try to optimize this?  Are there places I can read about this issue?
    (P.S.  >>  I notice it spends a lot more time "Waiting for the next frame" when I build a debug version.  Don't know if that's relevant...)
    Thanks!

    There's nothing you can do about "Waiting for next frame" - this is simply the time when Flash Player has finished doing everything it needs to do for the frame, and waiting for the OS to wake it up again. This depends on the framerate you set in your swf - roughly speaking, the waiting time is the budget (1/framerate), minus the time Flash Player spends doing actual work.
    You can find more information here, about understanding how the data you see in Scout relates to how Flash Player works:
    http://www.adobe.com/devnet/scout/articles/understanding-flashplayer-with-scout.html
    btw, you shouldn't look at performance in a debug swf - you'll get wildly misleading results.

Maybe you are looking for

  • Getting error in using the create Reservation API in OM

    Hi All, we want to reserve the item while creating the orders from interface tables. We are using the INV_RESERVATION_PUB.Create_Reservation for creating the reservation based upon the Lot numbers. We have first written the declare block(Anonymous) a

  • Load Balance guest Internet access via two different DMZ zones at two sites

    Hi Sir, My customer has the following unified wireless guest access requirement: - There are 2 internet links and dmz zones at two different locations, Site A and Site B - Data centre is at Site A - WiSM is proposed to be installed at the Cat 6500 in

  • SSF and digital signatures

    Hi Guys! I need to exchange XML documents with third-party. The aproach is to generate it from SAP and then sign it with Digital Signature. I found information, that I could use SSF to achieve it. On help.sap.com I found information, that I could use

  • Migo BADI Based On Company Code

    Hi All, I created custom fields in Migo & updated them to database using MB_Migo_Badi. Now i need to display this tabstrip based on Company code. .I need to hide the subscreen for a Purchase Order Based on Company Code A & display Subscreen for Purch

  • Peak Integration in Diadem

    Hallo I received an evaluation version of Diadem with LabView. Is there any way to let's say integrate certain peaks from a chromatogram ? I saw it can find the maximums in the spectrum but did not see any standard routine to integrate that particula