Starting / stopping FLV's with buttons

Basically all I want to do is have a flv play, then stop...2
buttons come up and depending on which you click on, plays the
associated video. Kind of like a choice thing. Video plays ->
make choice 1 or 2, plays video 1 or 2.
Shoved the video in the timeline on the main layer.
Created a new layer. Put the text button on the last frame
that the video plays on.
Opened Actionscript on the keyframe of the button.
Added in
stop();
mybutton.onPress = function() {
gotoAndPlay(710);
710 is the frame on which i had the other video start, on a
seperate layer might I add.
However the result is .... movie plays .... briefly see
button flash....next video plays without me clicking the button :(
How do I go about making this happen?
Thanks,
- GoOsE

onPress is not a function in as3. Also, you need to add the
script to a frame on the timeline. you need to add an event
listener to your button that calls upon a function to execute your
code.
mybutton.addEventListener(MouseEvent.CLICK, doSomething);
function doSomething(e:MouseEvent):void{
gotoAndPlay(710);
};

Similar Messages

  • Start/stop user programs with laptop-mode

    Hi,
    i am trying to place some scripts in /etc/laptop-mode/*start[stop] to kill and start some programs when on battery or ac.
    I tried with the following script, but the process is just a zombie and dropbox will not appear: any ideas?
    #!/bin/bash
    case "$1" in
    start)
    su pschw -c
    /opt/dropbox/dropbox &
    stop)
    killall dropbox
    echo failed!
    esac

    Hi,
    i am trying to place some scripts in /etc/laptop-mode/*start[stop] to kill and start some programs when on battery or ac.
    I tried with the following script, but the process is just a zombie and dropbox will not appear: any ideas?
    #!/bin/bash
    case "$1" in
    start)
    su pschw -c
    /opt/dropbox/dropbox &
    stop)
    killall dropbox
    echo failed!
    esac

  • Start/Stop Web Modules with JMX

    Does anyone know if there is a possibility in OC4J to start/stop/reload web applications via JMX?
    When I navigate with the System MBean Browser to a WebModule MBean, e.g. oc4j:j2eeType=WebModule,name=defaultWebApp,J2EEApplication=default,J2EEServer=standalone , the stateManageable attribute says false, and there are no start() and stop() operations available.
    Is there any other way to do that, besides starting and stopping the parent J2EEApplication MBean, perhaps with some non-JSR77 MBean?
    Best regards,
    Volker

    Does anyone know if there is a possibility in OC4J to start/stop/reload web applications via JMX?
    When I navigate with the System MBean Browser to a WebModule MBean, e.g. oc4j:j2eeType=WebModule,name=defaultWebApp,J2EEApplication=default,J2EEServer=standalone , the stateManageable attribute says false, and there are no start() and stop() operations available.
    Is there any other way to do that, besides starting and stopping the parent J2EEApplication MBean, perhaps with some non-JSR77 MBean?
    Best regards,
    Volker

  • Starting/Stopping 9iAS Infrastructures with batch files

    I created the following two batch files to start and stop my iAS Infrastructure. I found that if I used the services settings of automatic, all did not go well.
    start.bat:
    @ECHO OFF
    cls
    ECHO About to start the listener
    net start Oracle9ias_InfraTNSListener
    ECHO About to start the database
    net start OracleServiceIASDB
    ECHO About to start the OID monitor
    e:\ora9iasinfra\bin\oidmon start
    ECHO About to start the OID server
    e:\ora9iasinfra\bin\oidctl server=oidldapd configset=0 instance=1 start
    ECHO About to start the website
    net start Oracle9ias_infraEMWebsite
    ECHO About to start opmn and OC4j
    e:\ora9iasinfra\dcm\bin\dcmctl start -ct ohs
    e:\ora9iasinfra\dcm\bin\dcmctl start -co OC4J_DAS
    stop.bat:
    @echo off
    cls
    ECHO About to stop the website
    net stop Oracle9ias_infraEMWebsite
    ECHO About to stop opmn and OC4j
    e:\ora9iasinfra\dcm\bin\dcmctl shutdown
    ECHO About to stop the OID server
    e:\ora9iasinfra\bin\oidctl server=oidldapd configset=0 instance=1 stop
    ECHO About to stop the OID monitor
    e:\ora9iasinfra\bin\oidmon stop
    ECHO About to stop the database
    net stop OracleServiceIASDB
    ECHO About to stop the listener
    net stop Oracle9ias_InfraTNSListener
    When I execute the batch files sometimes they work and sometimes they don't, for example after starting, occasionally the Apache process has not been created, and sometimes processes won't stop.
    However if I enter each command seperatly all works OK. Can anyone suggest a reason for this, maybe ordering is significant or a time delay may be required between certain actions?. Also after starting the website manager the process managers for both the infra and ias instances are started (I have installed both the iAS and the Infrastucture on the same machine - this all works fine when started as a series of individual commands but not when through batch files).
    Also If I try to use:
    SQLPLUS /NOLOG
    SQL>CONNECT sys/password@iasdb as sysdba
    SQL>Start
    I also get an 'unable to create a dedicated server' error. I can start/stop the database through the enterprise manager in either standalone or management server configuration without any errors. Can anyone shed any light on this?. I have set both TNS_ADMIN and ORACLE_SID correctly.
    Terry Bennett

    Thanks, I had read that and it was very informative. I did however solve my problem using a few other threads that have been posted about the runtime.runtime().exec commands. Thanks for you help.

  • Control FLV playback with button on different timeline

    I have an FLVPlayback instance on my stage within a movie
    clip within a movie clip eg.
    _root.showreel_mc.showreelHolder.showreel (where showreel is
    the instance name given to the FLV component itself)
    I already have a button that fades out showreel_mc in order
    to fade other content in but I also need it to pause the FLV so it
    doesn't keep playing in the background. I've tried this...
    _root.showreel_mc.showreelHolder.showreel.pause()
    But it doesn't work - anyone got any ideas? I'm using
    Actionscript 2.0.
    Cheers!

    I found the option to sync with rest of project under the options tab and this solved my problem.

  • Start stop while loop with tab control

    I want to be able to start and stop a while loop by entering and leaving a tab.  I am using an event structure to do so but it doesn't seem elegant or the right way to do this.  The only way I was able to get it to kind of work is by unchecking the lock front panel box in the event structure.  I have attached a sample vi of what I have so far.
    Solved!
    Go to Solution.
    Attachments:
    Loop test.vi ‏16 KB

    The problem is that you can't even stop the program by hitting the stop button until you leave the tab, which is not a friendly user interface.
    Event structures should just handle basic user events.  Any given event case should not take a long time to run.  While you are in the diagnostics tab, your code is stuck in that while loop.  Although fixing the lock front panel allows you to do other things, the LabVIEW is just queuing up all of those other UI events (like Stop button value change) and can't handle them until the inner while loop stops and allows the outer while loop to iterate again.
    You should have a parallel while loop to handle the waveform graph.  You can use notifiers or queues or an action engine FGV (see Ben's Action Engine Nugget) to pass the starting or stopping of the waveform graph update to the parallel while loop.

  • Start, stop, restart WebLogic with WLST

    Hi,
    does Oracle have any example WLST scipts to start/restart WebLogic server? Please point me to them, 'cos I haven't found any.
    Thanks in advance.

    Hi,
    http://download.oracle.com/docs/cd/E13222_01/wls/docs90/config_scripting/manage_servers.html#start_managed_server
    You can record all that you doing in admin console and automatically you will get .py script for that operations.
    Regards

  • Start/Stop Buttons and infinite loop exit

    I am trying to make a GUI with a Start/Stop and an Exit button. Initially the button will have the label "Start". When i push it, its label should become "Stop" and an infinite loop function will begin. I want the loop to run until i press the Stop or Exit button.
    The problem is that when the loop starts i can't press neither of the buttons. The "Start" button changes its label into "Stop" only if i make the loop finite and it ends.
    Here is the source:
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    public class StartStopButtons extends JFrame{
        Component visualComponent = null;
        JPanel panel = null;
        JLabel statusBar = null;
         public StartStopButtons() {
              setSize(160, 70);
              getContentPane().setLayout(new BorderLayout());
            panel = new JPanel();
            panel.setLayout(new BorderLayout());
            getContentPane().add(panel, BorderLayout.CENTER);
            final JPanel panel_1 = new JPanel();
            panel.add(panel_1, BorderLayout.CENTER);
            final JButton startButton = new JButton();
            startButton.addActionListener(new ActionListener() {
                 public void actionPerformed(final ActionEvent e) {
                    String action = e.getActionCommand();
                    if (action.equals("Start")) {
                         System.out.println("Start Loop");
                         startButton.setText("Stop");
                         myLoop ();
                    if (action.equals("Stop")) {
                         System.out.println("Stop Loop");
                         System.exit(0);
            startButton.setText("Start");
            panel_1.add(startButton);
            final JButton exitButton = new JButton();
            exitButton.addActionListener(new ActionListener() {
                 public void actionPerformed(final ActionEvent e) {
                    String action = e.getActionCommand();
                    if (action.equals("Exit")) {
                        System.exit(0);
            panel_1.add(exitButton);
            exitButton.setText("Exit");
         public void myLoop() {
              for (int i = 0; ; i++)
                   System.out.println(i);
         public static void main(String[] args) {
              StartStopButtons ssB = new StartStopButtons();
              ssB.setVisible(true);
    }

    I works just fine. Here is the source and thanks for the help.
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.UIManager;
    public class StartStopButtons extends JFrame implements ActionListener, Runnable{
        Component visualComponent = null;
        JPanel panel = null;
        JLabel statusBar = null;
        Thread thread;
        JButton startButton;
         public StartStopButtons() {
            try {
                UIManager.setLookAndFeel(
                    UIManager.getSystemLookAndFeelClassName());
            } catch(Exception e) {}
              setSize(160, 70);
              getContentPane().setLayout(new BorderLayout());
            panel = new JPanel();
            panel.setLayout(new BorderLayout());
            getContentPane().add(panel, BorderLayout.CENTER);
            final JPanel panel_1 = new JPanel();
            panel.add(panel_1, BorderLayout.CENTER);
            startButton = new JButton();
            startButton.addActionListener(this);
            startButton.setText("Start");
            panel_1.add(startButton);
            final JButton exitButton = new JButton();
            exitButton.addActionListener(new ActionListener() {
                 public void actionPerformed(final ActionEvent e) {
                    String action = e.getActionCommand();
                    if (action.equals("Exit")) {
                        System.exit(0);
            panel_1.add(exitButton);
            exitButton.setText("Exit");
         public void actionPerformed(ActionEvent e) {
              String action = e.getActionCommand();
              if (action.equals("Start")) {
                   startButton.setText("Stop");
                   thread = new Thread( this );
                   thread.start();
              if (action.equals("Stop")) {
                System.exit(0);
         public void run() {
              myLoop();
         public void myLoop() {
              for (int i = 0; ; i++)
                   System.out.println(i);
         public static void main(String[] args) {
              StartStopButtons ssB = new StartStopButtons();
              ssB.setVisible(true);
    }

  • ConnectException after a few times of start/stop

    I've made a serverUI where I want to start/stop my server. It works to start it, stop it and start it again. But when I then want to stop it I get a ConnectionException. Any ideas?
    Here's some code.. (I'm using 1.1.8)
    I do this once at startup:
    try
         Runtime.getRuntime().exec("rmiregistry");
    catch(Exception pException)
         System.out.println(pException);
         pException.printStackTrace();
    I do this to start the server:
    try
         Runtime.getRuntime().exec("java -classpath .;C:\\jdk1.1.8\\lib\\classes.zip;\\jdk1.1.8\\lib\\comm.jar -Djava.rmi.server.codebase=http://"+InetAddress.getLocalHost().getHostAddress()+":8080 -Djava.security.policy=policy bentrix.solarPower.server.SunControlImpl");
         mServer = (SunControl)Naming.lookup("//"+InetAddress.getLocalHost().getHostAddress()+"/SunControlServer");
    catch(Exception pException)
         System.out.println(pException);
         pException.printStackTrace();
    I do this to stop the server (with a delay and then System.exit in the server):
    try
         mServer.terminate();
    catch(Exception pException)
         System.out.println(pException);
         pException.printStackTrace();
    I end up with this exception... I've tried putting in delays but that didn't help. I've watched the processes and the first time mServer.terminate() really removes the server. And it works to start the server again. But when a new try to stop the server is made it fails! It does works to connect from the "real" client even now so nothing is wrong with the last start of the server.
    java.rmi.ConnectException: Connection refused to host: [212.214.64.210:4134]; nested exception is:
    java.net.ConnectException: Connection refused
    java.rmi.ConnectException: Connection refused to host: [212.214.64.210:4134]; nested exception is:
    java.net.ConnectException: Connection refused
    at sun.rmi.transport.tcp.TCPChannel.openSocket(TCPChannel.java:276)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:143)
    at sun.rmi.transport.tcp.TCPChannel.newConnection(Compiled Code)
    at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:60)
    at bentrix.solarPower.server.SunControlImpl_Stub.terminate(SunControlImpl_Stub.java:845)
    at bentrix.solarPower.serverUi.SunControlServerUI.stopServer(Compiled Code)
    at bentrix.solarPower.serverUi.SunControlServerUI.actionPerformed(SunControlServerUI.java:211)
    at java.awt.Button.processActionEvent(Button.java:249)
    at java.awt.Button.processEvent(Button.java:222)
    at java.awt.Component.dispatchEventImpl(Compiled Code)
    at java.awt.Component.dispatchEvent(Compiled Code)
    at java.awt.EventDispatchThread.run(Compiled Code)
    Any better way to start/stop the server please let me know!

    Oops! I fixed this by doing Naming.unbind() in the server when I shut it down. But I still have to watch very careful in the task manager when I do the start/stop by pressing a button in the serverUI because if I do start before the server has been killed I get the same exception! Is there a good way to know that the process has terminated or do I just have to disable the button for a little while?

  • 24pA - Captured timecode and DV Start/Stop

    Hello - I've got what I hope will be an easy one - though I haven't found the answers lurking around here. I'm capturing footage shot on my DVX-100A in 24p Advanced mode. I'm capturing it from my DSR-11 deck using the Advanced Pulldown Removal in FCP 5.0.3 on my Dual 1G G4 tower running OS 10.4.3. My tapes should all be Non-Dropframe I believe.
    I'm having an issue with DV Start/Stop Detect. It's putting markers where there is no start/stop between clips, and NOT finding any of the start/stop locations on the tape at all. This led me to examine my timecode more closely. I found that clips have timecode that increments like this (in the frames category):
    01, 02, 04, 05, 06, 07, 09, 10, 11, 12, 14, 15, 16, 17, 19, 20, 21, 22, 24, 25, 26, 27, 29, 00
    It plays fine in sequences set to 23.98, and even displays fine on an NTSC television I've hooked up to my DSR-11. This from the clip itself in the viewer, or from the canvas in the sequence.
    Should my timecode be incrementing that way so that it can re-reference the 29.97 timecode on my original tapes, or do I have a problem? Does anybody know why my Start/Stop Detect feature won't work? Incidentally, it works just fine for 24p normal footage captured at 29.97.
    Thanks for your help.
    Zac

    Zebulun -
    I did what you suggested. I was able to capture a few clips just fine at 29.97. I also was able to use the dv start/stop detect feature with success.
    However, using the "remove advanced pulldown" from the tools menu yielded the same odd results. It appeared to work just fine, and the info window for the clip says that the frame rate is 23.98 (with lower field dominance), but my time code still reads as it did from the above posting. Up to 29 frames, skipping frames to make it count only 24 times.
    It still seems to play fine. Any thoughts on why my timecode is doing this?

  • While in email today, the computer began flashing. I had to turn off with button. When I turned it back on, I got the apple icon and the moving loading wheel. It would turn for about 60 seconds and then stop. I turned off again. I now have a black screen.

    while in email today, the computer began flashing. I had to turn off with button. When I turned it back on, I got the apple icon and the moving loading wheel. It would turn for about 60 seconds and then stop. I turned off again. I now have a black screen.

    Hi wiesenruth,
    If you are having issues starting up or booting your computer, you may find the following articles helpful:
    Troubleshooting: My computer won't turn on
    http://support.apple.com/kb/TS1367
    Mac OS X: Gray screen appears during startup
    http://support.apple.com/kb/ts2570
    Regards,
    - Brenden

  • Stop a progress with a button

    Hi all,
    I would like to know can I program a start / stop action with a buttion. That means I start a process with a button and I can terminate with an other button.
    Many thx

    It depends what do you mean by "process" you may be able to stop a query while running by setting the Forms' "Interaction Mode" property to "Non-Blocking" and you can stop a query.
    For other processes you may have different logic depending on your requirements.
    Tony

  • Start Stop and Run button.

    hello,
    I have one question, I want one button which can be run/start/stop button. I can't compile the program with "Run when open", because I need the user enter a string and a configuration, however after the user enter a configuration, I want that a START button, and when the user want press the same button to STOP all the program. All without pressing the "Run button (white arrow)". So the sequence it will be:
    1- open the ".exe"
    2- configure the variables such as: file name, file path, comments.....
    3- press START button, and the system will start acquisition.
    4- press STOP button and the program stopped and save all the data in a file.
    It is that possible? Could anyone help me with it? Or send me and example?
    Best regards,
    Anna.  

    Hi,
    You can do something like this.
    Compile it with "Run when open".
    Best regards
    Matej
    CLAD using LV 8.2, 2010 and 2012
    R&D Laboratories
    Domel d.o.o.
    www.domel.com
    Attachments:
    StartStopAndRun.vi ‏13 KB

  • Music Start/Stop Times with iTunes Match causes iOS Music App to glitch

    I set Start Time and Stop Time values for my music in iTunes to crop off non-music parts of tracks, but the Start/Stop Times cause the iOS Music app to glitch out when the track streams via iTunes Match. If a track has a Start Time set, the track will get stuck, and repeat the first fraction of a second of the track over and over, seemingly for the amount of the Start Time. And if the Stop Time is set, the NEXT track will glitch out. For example, if a track has a Start Time of 0:10, the track will glitch out for at least 10 seconds before the track actually starts playing. Sometimes the track never stops advances beyond 0:00.
    I think the problem caused by the fact that iTunes Match is streaming the entire track so the Music app just freaks out for the duration of the Start/Stop Times.
    Has anybody else experienced this? Is there a workaround?
    For now, I've just been searching my 22,000 song library for tracks with Start/Stop Times and exporting new hard-cropped files, but this is tedious, takes up hard drive space, and degrades the audio with lossy-to-lossy double-compression.

    I'm having the exact same problem and from my research I believe that the old process of being able to turn ITM off, sync your music to your iPad, and then turn ITM back on no longer work.  You are correct that going through this process wipes out your music.  It's only on IOS 6.0 on my Gen 3 ipad because on my gen 1 iPad, I can't upgrade to IOS 6.0 and the old process still works fine under IOS 5.0. 
    In order to get around this I created a massive playlist (a superset of all my other playists) that I downloaded by using the download button in order to get local copies of my music on my ipad 3.0. 
    It seems to be working for now but I can't force my ipad to keep all that music local anymore.  If I download other music or movies in the future (and become low on space) Apple makes the decision about what to remove from my local copy in order to fit the new content on the device. 

  • I there, my question is quite simple, I would like to know if the "apple remote control" can be used with a mac mini and , if so, it can be used to control also the "logic pro" functions (e.g. record, start, stop etc). Thks a lot, Danilo

    I there, my question is quite simple, I would like to know if the "apple remote control" can be used with a mac mini and , if so, it can be used to control also the "logic pro" functions (e.g. record, start, stop etc). Thks a lot, Danilo

    Good work, thanks for the report.

Maybe you are looking for

  • My iPhone 4S screen is black, only siri works. What's with that? What can I do?

    Hey, I have an iphone 4S. Like a billion years ago the power button stopped working. Havent had problems with it until now, where it suddenly went black while I was using it. Siri still works when I hold down the home button but listening to siri's v

  • Support for bi-directional GIOP any time?

    One thing I was wondering about while preparing for a presentation was why bidirectional GIOP isn't supported in the 1.5 version of the ORB? The default uni-directional nature of IIOP is the achilles heel with CORBA in terms of the firewall penetrati

  • I have 7 tvs how many apple tvs do i need

    i have 7 tvs how many apple tvs do i need

  • How Rounding Off condition works?

    Hi My client has 2 pricing procedures for different sales organizations. In one pricing procedure, rounding off is taking place successfully, where as for other it is not working. At first place, I want to understand how this condition works, and do

  • Macromedia application server is unreachable

    Hi, we are running a virtual server (p2v) copy of our production and dev CF6MX sites. The virtual copy of the dev server, works fine. However, in production we are getting the dreaded "Macromedia application server is unreachable or it does not have