Get a button to be visible only after the FLV has loaded?

Hey everybody,

Trying to find a solution to this issue, I found a lot of answers on the provision of a visible button after that a swf file is loaded, but not a flv. I preload an flv, although 20 sec, then it starts to play. But I have a button 'play' on the stage and he's sitting there, tempting people to hit while the bar preloader works its magic the preloading of the flv. I want the button to be visible only after the flv file has been loaded, or at least until it starts to play.
I am a newbie to coding so please be forgiving and spell for me nice and clear. :-)


Thank you.

(BTW no components have been used)


Here is my code;

Stop();

BTN control.
btnPausePlay.onRelease = function() {}
NS.pause ();
}

preload and play flv.

var duration: number = 0;
var ratio: Number = 0;
var idTracking:Number = 0;
var idLoading:Number = 0;

var nc:NetConnection = new NetConnection();
NC. Connect (null);
var ns:NetStream = new NetStream (nc);
my_video.attachVideo (NS);
NS. Play ("presenter.flv");
change this (20) to the amount of seconds to laod before playing th.
ns.setBufferTime (15);

ns.onMetaData = {function(evt:Object):Void}
duration = evt.duration;
ratio = track._width / duration;
idTracking = setInterval (updateKnob, 50);
idLoading = setInterval (updateLoader, 50);
};

ns.onStatus = {function(evt:Object):Void}
If (this.time > 0 & & this.time > = (duration - 0.5)) {}
gotoAndPlay (2)
clearInterval (idTracking);
delete this.onStatus;
}
};

function updateKnob (): Void {}
Knob._x = track._x + ns.time * ratio;
}

knob.onPress = function (): Void {}
clearInterval (idTracking);
NS.pause (true);
this.onMouseMove = function (): Void {}
If (track._xmouse > 0 & & track._xmouse < loader._width) {}
This ._x = track._x + track._xmouse;
}
}
}
knob.onRelease = function (): Void {}
delete this.onMouseMove;
NS. Seek ((cette._x-track._x) / ratio);
NS.pause (false);
idTracking = setInterval (updateKnob, 50);
}
knob.onReleaseOutside = knob.onRelease;

function updateLoader (): Void {}
Loader._xscale = ns.bytesLoaded / ns.bytesTotal * 100;
If (loader._xscale > = 98) {}
Loader._xscale = 100;
clearInterval (idLoading);
}
}

track.onRelease = function (): Void {}
If (this ._xmouse > 0 & & this ._xmouse < loader._width) {}
clearInterval (idTracking);
idTracking = setInterval (updateKnob, 50);
NS. Seek (this ._xmouse/ratio);
}
}

//////////////

That is right.

don't forget to initialize the _visible property is false.

Tags: Adobe Animate

Similar Questions

  • Satellite L300D begins only after the battery has been drained and recharged

    I have a satellite L300D that has a problem at startup. Last week, it closed but got stuck on the "Disconnect" screen for a long time. Finally I manually turn it off by holding down the power button. Don't think no more of him it happened sometimes with my computers. However, when I went to turn it back on - it was nothing. Power lights came to the front of the computer, but not to screen at all. Could not even access the BIOS. Nothing. It was like that for several days.

    Tried all the common solutions - removed battery, disconnect the power supply and press the power button - still nothing. Tried w/o - just AC, just the battery. Even stripped down to the motherboard to see if I could remove the CMOS battery and reset the CMOS but it is soldered on the motherboard. Put all back together, still nothing.

    Finally, I had to recharge my cell phone using a USB adapter and given that the computer had power I tried the usb port and it worked (for example, I could charge the phone - still no screen on the computer). The computer's battery is dead and I plugged it in. That evening, after the battery was full, I tried the computer and it has perfectly worked. Started correctly, shut it down, restarted and it was fine. Unplugged this night there and reconnected again in the morning and... nothing. Just a black screen. No BIOS.

    Killed the battery again then reloaded and now my computer is working again.

    Any ideas on what could cause this problem?

    Thanks in advance.

    Hey Buddy,

    In my opinion her only the only one you can is update the BIOS like Akuma suggested. This problem is not related software so that s the only option you have I think. You can download the latest version of the BIOS here:
    http://EU.computers.Toshiba-Europe.com > support & downloads > download drivers

    If this is not the case, contact an authorized service provider please. Guys can fix all this hardware related problems can diagnose this problem. Maybe the motherboard or something else must be exchanged.

    Good luck! :)

  • Re-installing Windows XP (OEM - purchased version of njewspaper ad without mentioning it was OEM only) after the installation of the pirate Win Xp (full version). Can I retrieve pirate settings to not reinstall aps (have about 100). __

    Hello
    I'm trying to reinstall Windows XP (OEM - purchased version advertises in newspapers not to mention it was OEM only) after the installation of the pirate Win Xp (full version). Can I retrieve pirate settings to not reinstall aps (have about 100).
    (I guess I have to change registry to eventually replace OEM version with pirate version - it still would make it impossible to activate the automatic updates). Or I can just reinstall registry then replace edition OEM version? (Would still allow the applications to be installed without the re - install?) (A major pain).

    Visit the Genuine Microsoft software and click on Validate Windows.  After that validation fails, look for the Get Genuine button and click on it to find out how to acquire a Kit of WGA. Carey Frisch

  • GetAxisScalingMode is updated only after the graphic update

    Hello

    on a xy chart, I'm traced multiple xy plots and a few vertical lines (2 or 4) to indicate some areas of interest. For the development of these lines, I need to know the value of y minimum and maximum of the graph. That's why I thought using GetAxisScalingMode (autoscaling value), which returns the maximum value without the need to investigate individual data sets (large) of the xy plots ideally.

    In principle, this approach works.

    Now, to avoid flicker, I use the following sequence:

    (1) SetCtrlAttribute (Panel, graph_control, ATTR_REFRESH_GRAPH, FALSE);

    (2) plot new xy plots

    (3) obtain ymin, ymax, using GetAxisScalingMode

    (4) vertical lines using plot plot

    (5) SetCtrlAttribute (Panel, graph_control, ATTR_REFRESH_GRAPH, TRUE);

    Unfortunately, this does not work because the range of a chart axis is updated only after the display of the chart.

    First of all, this behavior seems a bit inconsistent for me because using for example. GetCtrlAttribute (Panel, graph_control, ATTR_NUM_PLOTS, & plot_handles) returns the correct number of plots before updating the chart.

    Second, you need a suggestion of how to achieve the goal of flicker free plot xy plots so many vertical lines, covering the range complete y?

    Thank you!!

    Wolfgang

    OK... Finally!

    Now, I can confirm that this behavior is weird (I would even call it a bug...)

    Here is a workaround:

    The fundamental discovery is that the axis interval is updated if a plot is set, even if the chart is not updated. The procedure is:

    (1) SetCtrlAttribute (Panel, graph_control, ATTR_REFRESH_GRAPH, FALSE);

    (2) plot new xy plots

    3) get ymin, ymax, using GetAxisScalingMode / / doesn't work here because of the CVI BUG

    (4) vertical lines using plot plot

    4A) GetCtrlAttribute (Panel, graph_control, ATTR_NUM_PLOTS, & plot_handles);

    4 (b) SetCtrlAttribute (Panel, graph_control, ATTR_PLOT_ZPLANE_POSITION, plot_handles - 1); These two lines are stupid here because the lines are subsequently demolished, but they update the chart axis range!

    4 c) get ymin, ymax, using GetAxisScalingMode / / now it works

    d 4) remove vertical lines

    4th) vertical plots using plot / / and now the lines have the right length

    (5) SetCtrlAttribute (Panel, graph_control, ATTR_REFRESH_GRAPH, TRUE);

    Wolfgang

  • will be all my files get saved or new that were created after the death of this drive?

    I'm in Windows 8.  I had an external drive that I had put in place to save on file history.   This drive is dead.  I have since bought a new and I'm setting up historical files to copy to the disc.  He asked me if I would like to move files to this player of the former.  Of course, I can't.  He's dead.  I said no and it seemed to go.

    My question is: are all my files get saved or new that were created after the death of this drive?

    If she's not aging files saved on it, how can I get all my files copied?

    Hi Becky,

    Please contact Microsoft Community,

    As you have said that your return to the history of files on external Drive that got crashed, and then you bought a new external drive and set up again for the backup.

    I want to tell you that unfortunately, it will only back up recent files that you created on the new drive. Steps to recover old files is not possible that the backup was created on the external pilot who already got crashed.

    To learn more details of the history files, please see the link:

    https://TechNet.Microsoft.com/en-us/magazine/dn448546.aspx

    Hope this information helps. Feel free to contact us again for assistance.

  • can perform us two actions with a single button in two clicks, one after the other?

    Mr President.

    can perform us two actions with a single button in two clicks, one after the other?

    I want that when I click on the button Add once it add data to the database and when I click again on this button it clears the form data to the empty fields.

    Concerning

    Tanvir

    In the code, it should be easy.

    The following code adds that a button called butman with text 'ADD '.
    It then registers a listener that will be called if the user clicks the button.

    This listener then calls the runAddData method if you clicked butman while it contained the text of "ADD" and it calls the runClearData method otherwise.
    That's why he will swap the functionality of the button between ADD and CLEAR on each click.

    final Button butman = new Button("ADD");
    butman.setOnAction(new EventHandler() {
              @Override
              public void handle(ActionEvent t) {
                        if (butman.getText().equals("ADD")) {
                                  butman.setText("CLEAR");
                                  runAddData();
                        } else {
                                  butman.setText("ADD");
                                  runClearData();
                        } // END IF-THEN
              }});
    

    I hope that's what you wanted.

    Further reflection.
    You might want to run the ADD and CLEAR methods in their own son so that it can run in the background without slowing down your user interface.

    I also reuse rather a single button for several features instead of to apply with hundreds of nodes used only rarely with masses of code to show and hide as needed.

  • Printer works only after the reboot or shutdown

    I use win xp sp3 computer. My only works only after the restart or shutdown. If I reinstall the printer driver, then it will work. I have reinstall win xp but similer happen again. I scanned my system with kaspersky. But no change. I need a permanent solution. Please help me...

    Hi Pierre,.

    1. what exactly happens when you try to use the printer?

    2. you receive messages or error codes?

    3. What is the brand and model of your printer?

    Method 1:

    You can try to start the fixit printer and check if it helps:

    Diagnose and automatically fix problems printing and printer

    Also see the article and check:

    Resources for the resolution of the printer in Windows XP problems

    Method 2:

    You can check the event viewer to learn more about the problem.

    Procedure to view and manage event logs in Event Viewer in Windows XP

  • How to remove only after the passage of the Tween is finished

    I want last removeChild (dropBall1); statement, in this script to be executed only after the move from Tween is completed. How do I do that? right now it is, it is removed immediately.

    function onClick10f1 (e: MouseEvent) {}

    addChild (dropBall1)

    removeChild (bigBall1)

    dropBall1.x = 356.10.

    dropBall1.y = 28;

    var bigBDrop1: Tween = new Tween (dropBall1, "y", Regular.easeIn, 28, 156, 1, true);

    removeChild (dropBall1);

    do not take local interpolation function.  they are likely to be gc had completion and import the tweenevent:

    var bigBDrop1: Tween

    function onClick10f1 (e: MouseEvent) {}

    addChild (dropBall1)

    removeChild (bigBall1)

    dropBall1.x = 356.10.

    dropBall1.y = 28;

    bigBDrop1 = new Tween (dropBall1, "y", Regular.easeIn, 28, 156, 1, true);

    bigBDrop1.addEventListener ( fl.transitions.TweenEvent.MOTION_FINISH , tweenFinishF);

    }

    function tweenFinishF(e:TweenEvent):void {}

    removeChild (dropBall1);

    }

  • How to make a clip visible only when the mouseY theatrical est.25?

    I really need the code to make a movieclip that is visible only if the mouse is near the back of the stage.  Here is the code that I tried to use, but it does not work well, thank you:

    thumb_container. Visible = false;

    stage.addEventListener (MouseEvent.MOUSE_MOVE, show);

    visible (e:MouseEvent) {}

    if(e.localY<stage.stageHeight/4) {}

    thumb_container. Visible = true;

    thumb_container. RemoveEventListener (MouseEvent.MOUSE_MOVE, show);

    thumb_container.addEventListener (MouseEvent.MOUSE_MOVE, hide);

    }

    }

    stage.addEventListener (MouseEvent.MOUSE_MOVE, hide);

    function hide {(e:MouseEvent)}

    if(e.localY>stage.stageHeight/4) {}

    thumb_container. Visible = false;

    thumb_container. RemoveEventListener (MouseEvent.MOUSE_MOVE, Hide);

    thumb_container.addEventListener (MouseEvent.MOUSE_MOVE, show);

    }

    }

    Try:

    stage.addEventListener (MouseEvent.MOUSE_MOVE, showhide);

    function showhide(e:MouseEvent) {}

    {if(e.localY>3*stage.stageHeight/4})

    thumb_container. Visible = true;

    } else {}

    thumb_container. Visible = false;

    }

    }

  • Exception of Tomcat may not call sendError() after the response has been committed

    CF 10 Developer Edition.

    Windows XP SP3

    When you submit a page that worked well in CF 7 on this machine, I get an error that I've never seen elsewhere:

    ==================

    HTTP 500 - STATUS

    Description: the server encountered an internal error () that prevents to satisfy this demand.

    exception:

    javax.servlet.ServletException: ROOT CAUSE: java.lang.IllegalStateException: cannot call sendError() after the response has been committed to org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:451) to javax.servlet.http.HttpServletResponseWrapper.sendError to coldfusion.tagext.io.cache.ehcache.GenericResponseWrapper.sendError (GenericResponseWrappe r.java:91) at coldfusion.filter.FormScope.parseQueryString(FormScope.java:501) (HttpServletResponseWrapper.java:1 20)

    etc., which ends in

    Note Track of the full stack of the root cause is available in the Apache Tomcat/7.0.23 logs.

    ===================

    I can't seem to be able to debug or to locate this error: cfabort placed at strategic locations doesn't help at all, and none of my usual work. Debug information are not displayed when this error occurs (although the server is configured to display debug information, and she normally does).

    Totally puzzled.

    LBPSlava

    Maybe adjust the number Maximum of say 100 to 500 POST request parameters.

    CF10admin > server settings > settings > request size limits > Maximum number of MESSAGE request settings > value

    Not sure, you may have to restart CF10 for change to be applied.

    HTH, Carl.

  • I continued to have this message flashing on the screen "ERROR of LOADING of THE OPERATING SYSTEM" after the restart when loading the software Window XP.

    Original title: someone help please?

    Working on my old computer, a pentium 4, card mother GA81PE1000, I continued to have this message flashing on the screen "ERROR of LOADING of THE OPERATING SYSTEM" after the restart when loading the software Window XP. After so many years, working on the construction of computer & repair, it's new to me.

    So I checked the Microsoft Website for answers from people with the same problem in the past and apply their suggestions, nothing works... hard drive replaced, the changed value in the bios, did everything possible, still nothing works, phenomenal for me, please help me find an answer, thank you?

    Hello

    1. have you made changes on the computer before this problem?
    2 - what you want to say that you receive this error message during the installation of Windows XP?

    Check to see if the following is useful.

    Method 1: Disconnect all devices non-essential connected to the computer and restart. Check to see if it boots normally.

    Method 2: You may need to check the settings of the BIOS (Basic Input\Output System). Check if the hard drive is detected. If this is not the case, check the physical connections. Refer to the manual to check the same.

    Warning of the BIOS:

    BIOS change / semiconductor (CMOS) to complementary metal oxide settings can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the configuration of the BIOS/CMOS settings can be solved. Changes to settings are at your own risk.

    The following article might be useful: "Error loading operating system" Error Message When you restart your computer during installation

  • SQL: how to display the second string of the function in the Jobs table only if the function has more than one string.

    SQL: how to display the second string of the function in the Jobs table only if the function has more than one string.

    Hello

    You can use REGEXP_SUBSTR Oracle/PLSQL: REGEXP_SUBSTR function

    Select the function double REGEXP_SUBSTR('PUBLIC RELATION REPRESENTATIVE ','[^]+',1,2);

    Do you have any value of the column as no 2nd string?

  • How can I prevent the text fields and drop downs changed after the form has been signed using a digital certificate? Thank you.

    Hi all

    How can I prevent the text fields and drop downs changed after the form has been signed using a digital certificate? Thank you.

    There is also a checkbox on the dialog box 'Sign' to lock document after signing.

  • Latitude D610 screen turns off after the Windows XP loading screen

    I'm having a problem with my Latitude D610 where after the Windows XP loading screen, the screen turns off completely. No BSOD, no login screen, just a white screen. This started happening at least a year, however, I bought a new computer if it is passed to the hatch. I tried the system restore when it appeared first without success. The computer starts in Mode safe. Any suggestions?

    If it starts in mode without failure, then its almost certainly a driver and with the blank screen problem, I suspect a display driver.

  • The computer hangs at "Shutting Down... "only after the installation of the updates for Vista Ultimate x 64 Windows

    Hello.  Recently, I have reinstalled the 64 bit version of Windows Vista Ultimate on my computer.  I allow all automatic updates (worth about 450MO) and let it do its thing.  Afterwards, I had to reboot my computer.  He was going smooth until he hit the "Configuring updates... "or something like that.  The circle stopped going around smooth and pauses every second or two.  After about 30 minutes, he went to "Shutting down...". "and I let this go all night.  After 4 p.m., he was still at "Shutting down...". "therefore I kept the button and made a closed hard.  After that I started it up, it would get to the loading screen with the green bars that go everywhere.  It also was not smooth and stopping every second or two.

    After about 10 minutes of this, I restarted my computer again, and it still wouldn't work.  I tried to start in safe mode, but it would also stop during the loading of some drivers and not continue.  So I reinstalled Vista again and, of course, was able to get without updates.  I thought it may have been a one time thing, so I did the windows updates again.  This problem repeated itself.  So I reinstalled Vista and am refraining from doing the updates of windows.

    I restarted my computer without updates, and it goes well.  It is only after updates where it fails to turn it off and save.  No one knows what is the problem and if there is a solution to this?

    Hi JerryR9190

    Thanks for posting on the Microsoft Answers site

    Are you Vista to get Service Pack 1 automatically as well?
    If so, please try to download/install it yourself and see if that has any effect.
    http://www.Microsoft.com/downloads/details.aspx?FamilyId=874A414B-32B2-41CC-BD8B-D71EDA5EC07C&displaylang=en

    Please try and post back if you have more question

    Ken
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for