Need help on countdown timer!

Could someone please guide me in the direction as to how to make a countdown timer?  I created a timer that counts down to a certain date, but I just want the timer to countdown 24 hours, not to a certain date.  I also want to have a button below the timer so that when you click it, it adds 30 seconds to the timer.  Can anyone help me with this?

Hi,
I hope it will be use full for u....
var timelong=2000;
var mytimer:Timer=new Timer(timelong,1);
mytimer.addEventListener(TimerEvent.TIMER_COMPLETE,myfunc);
mytimer.start();
function myfunc(event:TimerEvent)
    trace("hi it's working");
mybut.addEventListener(MouseEvent.CLICK,addtime);
function addtime(event:MouseEvent)
    timelong+=3000;
Thanks,
K Swamy Vishnubhatla,

Similar Messages

  • Making a Quiz in Flash. Need help with input time

    Hi Flash Community,
    I'm making currently a quiz using Flash Pro CS5. What I want to implent is a time bar which will load once the bar is loaded it will go to the next frame.
    So what I need is first a timer which will start immediately when the user sees the question and I need a time bar which will indicate how far the timing is. So let's say you have 30 seconds to answer the quiz. When the timer is at 15 seconds the bar will be at half.
    Something like this http://www.google.nl/imgres?imgurl=http://theportablegamer.com/wp-content/uploads/2009/10/ question.jpg&imgrefurl=http://theportablegamer.com/tag/quizquizquiz/&usg=__xsykgRnehmB9P97 gg3W9tAx2Dfg=&h=320&w=480&sz=57&hl=nl&start=0&sig2=tdKlW2Iv6zHo3THsHwdVpQ&zoom=1&tbnid=ToM bL22o-D7BOM:&tbnh=107&tbnw=160&ei=aiz7TcGONI2gOpic0b4E&prev=/search%3Fq%3Dquiz%2Binterface %26um%3D1%26hl%3Dnl%26sa%3DN%26biw%3D1902%26bih%3D909%26tbm%3Disch&um=1&itbs=1&iact=rc&dur =317&page=1&ndsp=68&ved=1t:429,r:13,s:0&tx=100&ty=47
    Could anyone help me with this? How do I need to do this?
    Thanks!

    Create a movieclip with tween about 30 frames and actions stop() in the first frame
    AS3 code:
    import flash.utils.Timer;
    var timer:Timer=new Timer(1000);
    timer.addEventListener(TimerEvent.TIMER,fn);
    timer.start();
    function fn(e:TimerEvent):void{
        trace(mc.currentFrame);
        if (mc.currentFrame==30){
            timer.removeEventListener(TimerEvent.TIMER,fn);
        mc.gotoAndStop(mc.currentFrame+1);
    AS2 code:
    var n=setInterval(mcfn,1000);
    function mcfn(){
        trace(mc._currentframe);
        if (mc._currentframe==30){
            clearInterval();
        mc.gotoAndStop(mc._currentframe+1);

  • Need help with new Time Capsule/Airport express setup!

    I just hooked up a 500g time capsule to replace an airport extreme, and now my airport utility on my MacbookPro Retina no longer recognizes the airport expresses I had on my network for airplay purposes.  Can anyone help with this issue?

    Instead of a switch you need a wireless router, because your modem will only assign one public ip address to the switch and that ip address will be forwarded to any one computer at a given time...You should replace the switch with a wireless router and it should resolve your concern...

  • Re: Need help with a time time lag.

    I am a relative novice to labview and have a problem.
    I have two waveforms being aquired; one from a flow sensor the other
    form a gas analyser. There is a small delay between the flow signal
    relative to the analyser (due to the transit time of the gas to the
    analyser). What I want to do is compensate for this lime lag and then
    plot the corrected waveform to plot an XY graph. This is essentialy a
    phase delay that needs to be compensated for.
    Can anyone help me solve my problem.
    Cheers
    Virgil.

    Here is a possible solution. The idea is to use the Get Waveform Subset funciton on the longer of the two functions. This way you return the exact subset that matches.
    Attachments:
    Untitled.vi ‏54 KB

  • Need Help controlling the time my program stays connected to a network

    Hi,
    Every time I open a Thread to listen to client connections, ou to send data to a server, i need to control how long the other side takes to respond.
    This is to fulfill two objectives:
    1) if the client or the server takes to long to respond the connection is terminated.
    2) if, for example, 30 seconds have passed, the server could send a packet with information that tells the client to wait a little more.
    Any help is appreciated, thanks.

    BigDaddyLoveHandles wrote:
    Before you read, remember the timestamp:
    timestamp = System.currentTimeMillis(); When you want to calculate how much time remains:
    long soTimeout = socket.getSoTimeout();
    if (soTimeout == 0) {
    //handle no timeout case
    } else {
    long now = System.currentTimeMillis();
    long timeLeft = soTimeout - (now - timestamp);
    //use timeLeft somehow
    Great, that works.
    i think i will also try to use the classes Timer and Calendar to create a scheduler, and see which option if better for what i need.
    Thanks for your help.
    regards.

  • Need Help! First tim

    This is my first time getting a PCI sound card, because I was very curious how different the quality would be.
    I saw an ad on a site marked "X-Fi sound card", and I got it for $80. They knew nothing about it, it was their son's, so I had to do research on which one it was beacause there was no box or driver CD. After seeing all the pictures I could, I'm guessing its the SB X-Fi Fataity XtremeGamer, because its big, black, and has the little black X-Fi box on the corner. (I'll post up pictures upon request to make sure with you guys)
    I had to find the drivers for it, so I did...but it wasnt the "Xtreme" version, because there were none on that page, just Applications. So I got the regular Fataity ones, thinking it was the same - well, they work. (Is there anywhere I can find the XtremeGamer ones?)
    I install the card, download the drivers, reboot to disable my onboard, and my speakers are working, but my Microphone isn't.
    Did I have to download anything else to get it working? I only downloaded the drivers from the download site. I only have the "Audio Console".
    Also...is that little red light on the card normal? Is it a warning?
    Please help! Thanks!
    - MattMessage Edited by hafaznmatt on 04-3-200708:34 PM

    This is my first time here too, and I was just reading your message and thought I could help...
    With the Creative?Software AutoUpdate Downloading System, I don't think you need to know what kind of card it is to get started. In order to find it, all you need to do is to?go to Creative's homepage and click on the Support tab and then choose, "[url="http://us.creative.com/support/downloads/softwareupdate.asp?nSUFlag=&sDestUrl=http://us.creative.com/support/downloads/&hdAllProduct=&LangID=033&hdDspLangID=033">Softwar e AutoUpdate[/url]". It will then inspect your computer to see which Creative product(s) is (are) plugged in and then it will give you a list of drivers and a list of application software that you need to download. It will also tell you what the name of your soundcard is.
    After you have made your downloads, now that you will have the name of your soundcard, go back to the Support tab and this time, choose [url="http://us.creative.com/support/downloads/">Downloads[/url] and check to see if there is anything that hasn't been downloaded. I just did mine a few minutes ago, and found that there?was one download that didn't get downloaded under the AutoUpdate process.
    How do you know what downloads you have already made? By default, the downloads are downloaded to the folder at C:\Program Files\Creative\Software Update\cache. The names of the folders will be the same as the names of the downloads on the Creative website. My advice is that you install all of the application software as well as the drivers. I know some people who didn't want to bother, so they just installed the driver and then quit at that. The driver just makes the soundcard work, but the application software is what makes it functional with all the "goodies" that makes it what you pay for. They have a graphic equalizer, a Karaoke function, a speed-up or slow-down function, a media player, and many others (and yes, you can even play a song backwards!)?but you don't get these programs unless you install the applications too.
    When you are finished with your installations, you can go back to the homepage and this time, click on the Product tab and choose "[url="http://us.creative.com/products/_featured.html">SoundBlaster[/url]", and then click on the name of your product to see what it cost when it was new and what was supposed to come with it. This page will give you all the technical information and advertising?about your soundcard. If you did get the X-fi Fatalty, then you should also have gotten a control console and a remote control along with the soundcard, so I hope you got everything for your money.
    I hope this hel
    ps.

  • I need Help setting up time capsule

    Today I took my brand new 2tb time capsule out of the box and attempted to set it up. The information on the apple site makes it sound easy peasy to set up, but I am having SO many problems and I have reset it over 7 times now, and I am frustrated thinking I have bought a dud. I want to use the TC as back up with Time Capsule and also to network my ipad, printer etc.
    I connect it to my modem via an ethernet cable and to my computer via an ethernet cable and switch it on. Then I open airport. Sometimes airport keeps searching and tells me it is unable to find airport devices and tells me to rescan and this process repeats in an endless loop.
    Sometimes it seems to go though the motions and tells me it's all set up and the TC will restart, but it never does.
    I have even tried doing all of the above wirelessly. No luck.
    I hope someone can help me. I am ready to !
    All I want are some step by step instructions, and after everything else apple I have bought I am surprised by how difficult  this product is.
    Thanks in anticipation.

    This is networking which is very hard as apple don't (as yet) control it..!!
    Are you connected to an adsl modem?
    Which one? I am in Australia so you won't scare me with bigpond brands.
    If the modem is working as a router this messes things up, and you will need to choose which device to bridge, the modem or the router ie the TC.
    So before we go further, tell me the modem or type of broadband service you have.

  • Need help for storing time along with the date

    Hi,
    I have one procedure as follows, In last_update_column of the table job_data having date and time.But after execution of this procedure only date is inserting into the job_master.
    If I queires the table job_master with to_char(Last_Update_Date, 'DD-MM-YYYY HH24:MI:SS') , then it is showing time as 12:00:00.
    I tried to insert date with to_char,to_date format but it is not working.
    Please provide me the solution.
    Thanks in advance.
    create or replace
    PROCEDURE         SP_LOAD_JOB
    IS
    CURSOR CUR_DATA  IS
            SELECT   PARENT_ITEM,
         `               CHILD_ITEM_ID,
                   LAST_UPDATE_DATE
      FROM job_data,
    BEGIN
      For Cursor_job In CUR_DATA
                 Loop
                 Exit When CUR_DATA%Notfound;           
        Insert Into job_master(parent_Code,
                                       child_code,
                                       last_update_date)
    values(
                             Cursor_job.PARENT_ITEM,
                             Cursor_job.CHILD_ITEM_ID, ,
                             Cursor_job.Assembly_Item_Id,
                              Cursor_Bom.LAST_UPDATE_DATE)
    commit;
    end loop;
    END;

    Hi,
    I don't believe you
    First to input time to job_master from job_data table first you have to store time in job_data.
    execute 
    select LAST_UPDATE_DATE from job_data
    and show result.
    Second remark : your procedure will not compile success Because
        Insert Into job_master(parent_Code,
                                       child_code,
                                       last_update_date)  ---3columns
       values(
                             Cursor_job.PARENT_ITEM,
                             Cursor_job.CHILD_ITEM_ID, ,
                             Cursor_job.Assembly_Item_Id,
                              Cursor_Bom.LAST_UPDATE_DATE) ----4columns
    Third remark : why to insert into table from other you wrote procedure???! you need only type insert stmt like this
        Insert Into job_master(parent_Code,
                                       child_code,
                                       last_update_date)
        select .... from  job_data
    Ramin Hashimzade

  • Need Help on a Time Capsule setup

    I want to install a new 2TB Airport Time Capsule to replace my older Time Capsule.  I would like to continue to use my original Airport Extreme for my network and have the new Airport Time Capsule serve as an extension of that network. I have referred to the following article http://support.apple.com/kb/ht5096 but then started having issues of understanding what needs to be done. 
    While there is obviously wireless capabilities for the new Time Capsule, I was thinking that to initially copy the old Time Machine to the new that I would use an ethernet cable. (The old Time Machine is USB to an external drive).  Once the copy is made I'd like to remove the ethernet and position the new time machine for wireless connectivity.  I'm not sure how to connect everything together.  My modem is connected to my iMac 27 by ethernet (that's faster, right?) and so I don't have any ethernet ports available on the modem. (one is input, one is output to the airport extreme, and one is output to my computer.)
    How do I connect things for the initial copy and then for the wireless in the future?  The set up book talks about Connecting Ethernet cable connected to the cable modem to the Ethernet WAN port.  Then it talks about Ethernet cable from any Ethernet device to any of the Ethernet LAN ports. I don't understand any of that - what I have or what I want. Is there any connection from the 2TB to the iMac?
    Then a window pops up about the 2TB and asks for a password. What's that? Then it asks what is primary (well, I thought I wanted the older Airport Extreme to be dominant and the 2TB to connect as an extender. I don't see that option.)
    Anyway, confused about connectivity.  In the end, I'd like to copy the old Time Machine to the new Time Machine and I think the above article will get me there. But I'm troubled about what wires go where.  Any suggestions? 

    Time Machine is the backup software on your computer.. it has no relationship to any particular hardware.
    Time Capsule is an apple router with a hard disk inside. It is not related in any way to Time Machine.. !!
    BUT it is used mostly as the target for a Time Machine backup.. Apple naming is very messy.
    1. It's the small white device that gives me a wireless service in my house. It has no drive just serves to provide wireless.
    It could be an extreme or express but you state later on it is extreme.
    I was thinking to use the time capsule as my Time Machine drive but use the wireless capability as a network extender of the original AirPort Extreme.
    Generally it would be better to use the TC plugged into the main ISP modem / router. And you can then use the Extreme to extend the network.. it does depend on locations.. you want the least number of wireless hops or the best chance of running ethernet to the clients. Either setup will work but think which is fastest. Whenever a backup has to go.. computer--extreme--TC. with both connections by wireless it will go at half the speed of
    computer--TC.
    And if you can plug the computer--TC by ethernet it will go about 3-6 times the speed of wireless.
    2. I was wondering what is the best way to get the old Time Machine data onto the new 2TB Time Capsule to be used as a Time Machine.
    I recommend you start over with a fresh clean backup. The issue is the local backup and the network backup are handled differently by Time Machine and it is not easy to do what you want.
    See Q18 here if you want to see what is involved.
    http://pondini.org/TM/FAQ.html
    Specifically this one. http://pondini.org/TM/18.html#id18
    3. Yes.. but think if it isn't better to move the extreme instead.
    4) my modem connects via Ethernet to my desktop because I thought wired was faster than wireless. My modem also connects to the AirPort Extreme to broadcast a wireless network for my iPhone and iPad. I could have my desktop connect wirelessly but just thought wired was faster. OK I see what you say about plugging the desktop in to the wireless router instead.
    This is wrong.. You should have the computer plugged into the airport router.. and the airport router plugged into the modem.. not both connected to the modem. It will do backups much faster with a direct wired connection to the TC.. but not if it goes via a slow (10/100 port) on the router the ISP supplies.
    5. Sparsebundle is how the TM packages the backup on network drives.
    Read the info in Pondini to understand.
    http://pondini.org/TM/Works.html
    In particular the part about network backups.
    http://pondini.org/TM/Works3.html
    So you're saying that the New Time Capsule is receiving the copied file via network? No cables used in the copying to the new Time Capsule/Time Machine?
    Backup runs over either wireless (slow) or ethernet (fast) to network drive.. or you can use a local disk as you have been doing.. and that is the fastest.

  • Need help on Implementing timer based JTable update events

    greetings,
    i am writing a trap receiver that placed the entries in a jtable, and i am having a problem where the entires can arrive so fast they swamp the event thread. the solution i believe is to write a custom model that calls the table update events on timer based intervals. i have made an attempt at this, but cannot get it to work. has anyone done this, or possibly tell me where i have gon off the tracks?
    thanks in advance,
    here is my class:
    import javax.swing.event.TableModelEvent;
    import javax.swing.table.DefaultTableModel;
    public class TimerUpdateTableModel extends DefaultTableModel implements Runnable{
         Thread runner;
           int rowCtr = 0;
         public TimerUpdateTableModel(int initialDelay) {
             Thread runner = new Thread(this);
             runner.start();
         public void fireTableDataChanged(){
              //super.fireTableDataChanged();
         public void fireTableStructureChanged(){
              //super.fireTableStructureChanged();
         public void fireTableRowsInserted2(int firstRow,
                int lastRow){
              //super.fireTableRowsInserted(firstRow, lastRow);
         public void fireTableRowsInserted(int firstRow,
                int lastRow){
              //super.fireTableRowsInserted(firstRow, lastRow);
         public void fireTableRowsUpdated(int firstRow,
                int lastRow){
              //super.fireTableRowsUpdated(firstRow, lastRow);
         public void fireTableRowsDeleted(int firstRow,
                int lastRow){
              //super.fireTableRowsDeleted(firstRow, lastRow);
         public void fireTableCellUpdated(int row,
                int column){
              //super.fireTableCellUpdated(row, column);
         public void fireTableChanged(TableModelEvent e){
              //super.fireTableChanged(e);
         public void run() {
              while (true) {
                   try{
                        rowCtr = TimerUpdateTableModel.this.getRowCount();
                        System.out.println(rowCtr + "    " + (TimerUpdateTableModel.this.getRowCount() - 1));
                        //super.fireTableRowsInserted(0, TimerUpdateTableModel.this.getRowCount() - 1);
                        //super.fireTableDataChanged();
                        int nRowCount = getRowCount();
                        super.fireTableChanged (new TableModelEvent (TimerUpdateTableModel.this, 0,
                            nRowCount - 1,
                            TableModelEvent.ALL_COLUMNS,
                            TableModelEvent.UPDATE));
                   }catch(Exception e){
                        e.printStackTrace();
                   try {
                        Thread.sleep(5000);
                   } catch (InterruptedException ie) {
                   }catch(Exception e){
                        e.printStackTrace();
                   System.out.println("done");
    }

    i am having a problem where the entires can arrive so fast they swamp the event thread
    super.fireTableChanged Well, if you are using the above code every time you receive an update, then I suspect you would be having problems. The fireTableChange() event is an expensive method. It means you need to recreate the TableColumnModel and repaint the entire table every time.
    You should simply be using method like model.addRow(...), model.setValueAt(...) to make updates to the table.

  • I need help with java Time Zone Updater for Venezuela Time Zone

    Hi,
    I've run the latest Time Zone Updater (1.3.5) on JRE 1.4.2. It is supposed to support the time zone changes for Venezuela. The problem is that when I set my Windows time zone and run java.util.TimeZone.getDefault() it says that I am on GMT instead of GMT-04:30.
    Am I doing something wrong?
    Thanks in advance for your help.

    I have found the solution for cases in which you cannot update your JRE to anything further than 1.5. You will have to create an extra entry in the Java tzmappings file as follows:
    Venezuela Standard Time:90,90::America/Caracas:After doing this, you will have to create a new String Value in your Windows registry for the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Venezuela Standard Time Key as follows:
    Name: MapID
    Value: 90,90
    Best regards.

  • Need help fixing stop times of Live365 stations

    I have some Live365 stations in my music library. When I upgraded to iTunes 11, the stations no longer say Continuous. They now have stop times and are grayed out. How do I fix that.

    Okay, so the problem you're having is likely due to your Airport Extreme ignoring stuff (as a security measure) that Xbox Live is sending the Xbox. While there are a few ways to deal with this, I've generally found the easiest is to ensure your Xbox is given the same IP address by the AE every time it connects, and to set the AE to then not block anything sent to that IP address.
    First we need to get the Xbox's wireless MAC address, which you can find on your Xbox by going to Settings, System Settings, Network Settings, selecting your wireless network from the ones that appear, Configure Network, Additional Settings (push the left thumbstick to the right), and finally Advanced Settings, then the MAC address should be displayed.
    Just to be clear, a MAC address has nothing to do with Apple's computers. It actually stands for Media Access Control and is a quasi-unique code that nearly every network adapter has. We're using it here so your Airport Extreme can easily recognise the Xbox.
    Now you've got the MAC address for the Xbox, open AirPort Utility, select your Airport Extreme and click Edit, then the Network tab. Click the plus button under the DHCP Reservations box, type Xbox 360 (or whatever you want) as the description, type the Xbox's MAC address into the MAC Address box, then click the IPv4 box, change the last number after the . from 2 to 35, and click Save.
    Now we have the Xbox getting the same IP from the AE every time, we need to tell to stop filtering stuff that's sent to that IP.
    On the same Network tab in Airport Utility as before, click the Network Options button, tick "Enable default host at:" and enter 35 as the last two digits (so it matches up with the full IP address in the IPv4 box earlier). Finally, click Update, and when your Airport Extreme has finished restarting, try the connection test on the Xbox again and (hopefully) bask in the glow of a nice open NAT setting.

  • I need help with this Time Capsule and External HD problem!

    my time capsule is working perfectly and i decided to hook up a seagate 500 external hd thru the usb on the back of the time capsule!
    well i can see both drives on my macbook and i can transfer files from my mac to both hd with a breeze
    one major problem i cannot extract files from my external hd only put files in! i tried checking the setting and everything but with no avail! anyone have this problem and how did they fix it? thank you!
    Message was edited by: aphextwin007

    Try connecting another USB storage device to the TC - HDD or memory stick. Format the device while it's connected to the TC, then try writing and reading to it.
    It does seem very odd that you can write to the HDD but not read from it. Presumably when you copy files to it they appear in Finder - you can see them OK? Do they appear to be the right size ("get info", or click in "columns" view). What exactly happens if you try to drag them back to the desktop?
    I can only think that you may have a hardware or formatting problem, hence trying a different, freshly formatted, drive.

  • Need Help with 1st time Wireless setup

    I installed my first router today (WRT54GS v.6) and everything went smoothly. But then I encountered a (small?) problem when trying to add my laptop to my network. When my laptop establishes a connection with my router, I receive the following message:
    Windows - System Error
    A duplicate name exists on the network.
    Does anyone know why this is happening and also know how to fix this problem and stop the message from appearing?
    Thanks in advanced.
    BTW, even though the message appears, I am still able to connect to the internet with my laptop.

    You probably have 2 or more computers using the same computer name, such as "MyComputer".
    Right click on "My Computer", and click on "Properties".
    Click on the "Computer Name" tab.
    Here you will see the computer name.
    Do this on all your computers.
    To change the computer name, click the "Change" button.
    While you are here, make sure all computers are set to the same unique "Workgroup".

Maybe you are looking for

  • Display Image in htm file of KM document

    Hello experts, I embeded one image in my KM document but when I check-in the document and view it on the portal it says image not found. I needed to know how to embed an image in KM document (htm) which can be visible on the page when published on po

  • Media being played is of unsupported format

    Hello all, i am getting the error " media being played is of unsupported formart". This is my new BB with OS version 7. I am extremly unhappy with this BB for all the problems and issues i have with this. Someome please help me play the video media[

  • Trace Files and Deadlocks

    Hi, I've gotten a bunch of deadlocks in 8.1.7 and I'd like to be able to make use of the trace files, but the files are really cryptic and I can't find any documentation anywhere that explains how to read them. Moreover, I can't find any software tha

  • SSL Certificate problem in the Oracle http server

    Hi, I have setup the oracle http server (OHS 11g) in linux machine and we created a virtual directory to access a web application. In NON SSL connection it is working fine but when we try use the SSL connection we are not able to access the web appli

  • Won't connect to preferred network automatically

    In the last week, my Macbook suddenly doesn't connect to my preferred network (top of the list) automatically. Rather I sometimes I have to turn airport on and off once or twice and it usually connects to another network first. Suggestions?