Background change linked to time

I've got this far, but can't get my background to change for every minute not between 7am and 7pm.
imageHolder currently contains an image in frame 1 and an a different image in frame two. Imageholder is currently the instance name of my movie on the stage. Any ideas?
var myText:String;
var myDate:Date;
setInterval(myFunction, 1000);
//myFunction(); //Call this immediately, so that the code loads, otherwise it will only do the function after a second
function myFunction(){
myDate = new Date();
myText= myDate+"";
//trace (myText);
showText.text=(myText.substring(10,19));
//myDate.hours gives us the hour part of a 24hour clock, so a number from 0 to 23...
if(myDate.hours > 7 && myDate.hours < 20){ //Between 7 pm and 7 pm, show image1...
  imageHolder_mc.gotoAndStop(1);
}else{ //Show image2...
  imageHolder_mc.gotoAndStop(2);

Your first sentence doesn't explain very well what you are after so it will help if you can make that clearer.  If you are expecting something to change every minute, it doesn't even attempt to do anything like that.  As shown, if the hour is between 8 AM and 7 PM, inclusive, then image1 will be displayed.  Otherwise image2 is displayed.
Your second sentence offers two possible names for the movie you mention and the code targets yet another, so it is not clear what the instance name of the movieclip is.  You might want to check that and be consistent in the code and how you explain it.

Similar Messages

  • Every time I turn my mac off, the desktop background changes. It always returns to the same picture, which was the second or third thing I changed my desktop to after getting my mac.

    Every time I turn my mac off, the desktop background changes. It always returns to the same picture, which was the second or third thing I changed my desktop to after getting my mac. I have background switching unchecked in my preferences, and I have never selected it as an option. Also, when I go to my preferences, it will show the icon of the picture I changed it to, even though the desktop itself has switched back.

    I would start with some basic troubleshooting.
    REPAIRING DISK PERMISSIONS -
    NOTE: refer to article "About Disk Utility's Repair Disk Permissions feature" found here http://support.apple.com/kb/ht1452 - for the actual apple article on these step. ----
    - click finder in the bottom dock, and in the window that opens, select applications in the left column - scroll through until you see the 'Utilities' folder and double click to open it.  Then double click on 'Disk Utility'
    - When prompted to select a disk volume or image, select the 'Macintosh HD' in the left column
    - ensure the the "first aid" tab is highlighted blue in the middle of the screen
    - click the button at the bottom that says 'Repair Disk Permissions'
    - this process will take a few minutes to run.  It will indicate it's done, by scrolling to the bottom of the "details area" displaying 'Permissions repair complete'
    Dan Frankes has written an excellent article for Macworld on "Permissions" and the need to repair them - see - http://www.macworld.com/article/52220/2006/08/repairpermissions.html.    Another good web site is - http://www.thexlab.com/faqs/durepairfns.html.
    REPAIRING DISK - About OS X Recovery - http://support.apple.com/kb/HT4718.
    - restart your computer hold down command + R keys on the keyboard to boot you into Lion / Mountain Lion Recovery mode
    - select english as your main language then the continue arrow
    - select "Disk Utility" on the resulting screen then 'Disk Utility' ---
    - When prompted to select a disk volume or image, select the 'Macintosh HD' in the left column
    - ensure the the "first aid" tab is highlighted blue in the middle of the screen
    - click the button at the bottom that says 'REPAIR DISK' .......NOT "Repair disk permissions"
    - this process will take a few minutes to run.  It will indicate it's done, by scrolling to the bottom of the "details area" displaying "The Macintosh HD appears OK"
    If you get any other message OTHER than "The Macintosh HD appears OK", like "the Macintosh HD was repaired successfully" run the "Disk Repair" again, until it displays  "The Macintosh HD appears OK".
    Once done, restart the computer as normal

  • Background changes for every button?

    Hello, I am using encore 5.1 and I was wondering if it's possible to have the background change every time I go from one button to the next withtout actually changing menus?
    I would like to do something like in the video I'm linking (watch only the first 10 seconds to get an idea of what I'm talking about).  Granted, in the video, what's running is a program and not a dvd menu, but is something similar possible in encore?
    http://www.youtube.com/watch?v=JKMu-bybpI0
    I know I can make it so I go on a button, click enter, this brings me to a new menu with a new background, but I want to cut on the amount of menus.  I like the idea of the background changing automatically without having to go to a new menu.
    Thanks for your time and help!

    When using dupe Menus and Auto Activate, I strongly recommend that one sketch out the flowchart first, and also think about using Button and Menu names, that relate directly to where they need to Link. With a bunch of Buttons, it can get involved pretty quickly. With a bit of planning, things will be much easier. I usually will layout my flowchart in Adobe Illustrator, and use the images of my Menus, in that image. It really helps me plan things. However, using AI might be overkill for some Projects, and a pencil and paper would do the job.
    Good luck, and remember, if played on a computer, the effect will not be so fluid, as the user must click on the "original" Menu to get to the "dupe" Menu with the different background - just a limitation of Auto Activate on a computer. In a DVD player, it will be pretty seamless, and can look beautiful. I use this general technique to create what appear to be Sub-picture Highlights, that are really graphics.
    Hunt

  • Background change

    Hello everybody!
    I've a problem with background and frame.
    If I would change the background of a frame at the same time
    that the main frame's background change...how I can do that?
    The background of the main frame change on mouse click on a
    link on a left frame. I would the background of left frame change
    at the same of the main frame one.
    I'm sorry for my english but I'm Italian. Thanks to all. Good
    night! Laura

    sniper8752 wrote:
    i went to my pictures, and selected an image, then Set as Home Screen Image.  i do not want that anymore.  how do i remove it?
    Put another picture that you DO like there... same process--select the image > Set as Wallpaper.
    Or use the default theme wallpaper on the same menu.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Changing job schedule time

    Hi,
    I have scheduled a job to execute at a specific time daily.
    But now I want to change the execution time, job will execute daily.
    How to do that ?
    Regards,
    Amit R.

    hi,
    Specifying Job Start Conditions
    Use
    When scheduling a background job (either from Transaction SM36, Define Background Job or CCMS ® Jobs ® Definition), you must specify conditions that will trigger the job to start.
    Procedure
    Choose the Start condition button at the top of the Define Background Job screen.
    Choose the button at the top of the Start Time screen for the type of start condition you want to use (Immediate, Date/Time, After job, After event, or At operation mode) and complete the start time definition in the screen that appears.
    For the job to repeat, check the Periodic job box at the bottom of the Start Time screen and choose the Period values button below it to define the frequency of repetition (hourly, daily, weekly, monthly, or another specific time-related period). Then choose the Save button in the Period values screen to accept the periodicity and return to the Start Time screen.
    Once you’ve completed specifying the job start conditions, choose the Save button at the bottom of the Start Time screen to return to the Define Background Job screen.
    No job can be started until it is released, including jobs scheduled to start immediately. Since releasing jobs can be done only by a system administrator from the job management screen (Transaction SM37) or by other users who have been granted the appropriate Authorizations for Background Processing, no unauthorized user can start a job without explicit permission.
    i got this from link,
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/6a56389f64246fe10000009b38f889/frameset.htm
    Regards,
    Arunsri

  • Desktop Background changes on it's own after login

    Hi everyone!
    Ok I have a small but annoying issue with my iMac.
    First thing's first, I am using OS X Leopard 10.5.6. I have also enabled "Enable fast user switching"
    in System Preferences under the User Accounts menu.
    I have my desktop background set to "Change picture every 5mins" & that is working perfectly fine,
    however I notice that when I go to the Login window by clicking the "fast user switching" icon on
    the top right-hand menu, then logging in back to my account, my desktop background changes to
    a default picture that my computer selects each time I log back in. This picture is not even in the
    folder of pictures that I use for my "Change picture every 5mins" setting. By the way this picture is one of the pre-loaded ones from Apple; it's from the nature series, the one seen in the latest 17" Macbook Pro ad, anyone seen it? Here's the link: http://www.apple.com/macbookpro/#ad
    Is anyone else having the same issue? I would appreciate any help anyone can provide!
    Thanks!
    zwan

    Hi lewisspindlove,
    Thanks for your input,
    it doesn't happen when i have my desktop in a "single picture" mode, and,
    it doesn't happen on other accounts, because besides mine(Admin), there is only
    the Guest account and this does not occur on that account.
    I tried your method of removing the wallpapers folder from Libary, then I
    noticed that the computer will select ANY image which I last used when in
    "single picture" mode, not "Change picture every 5mins" mode.
    For example, let's say I have a picture which I saved in the Documents folder,
    and I use that in "single picture" mode; after which I revert back to the folder which contains the pictures I want for "Change picture every 5mins" mode (which is stored somewhere else).
    If i go to the Login window & log back in again, the computer selects the picture
    I last used (the one in the Documents folder) as my background, BUT, after 5mins the picture changes to the ones I'm using for "Change picture every 5mins".
    I hope I'm not confusing everyone!
    This is a complicated & weird but ANNOYING problem!
    Any ideas if an Archive & Install would help? Does that erase all of my stored data on my HDD?

  • How to change the default time?

    when you finish the action of dialing ,the CCM system recognize your finish after 10s .How to change the default time in Service Parameters ,which is the detail Parameters ?

    Please see the following link for information on configuring the interdigit timeout.
    http://www.cisco.com/en/US/products/sw/voicesw/ps556/products_tech_note09186a00800dab26.shtml
    Hope this helps. If so, please rate the post.
    Brandon

  • Background Change Picture Feature Not Working

    I have had my macbook pro for about 6 months now and my change background feature worked fine when I first got it. I could add folders of pictures and tell it change ever 5 seconds and it worked. Over time, I messed with my dock settings and background settings with other third party programs and stuff and decided I didn't like them so I would just go back to the features built into Leopard. I tried to do a random, change every 5 seconds background change folder deal the other day and it never would change. I tried doing it on the default folders like the apple images and the nature ones and stuff but it would never change. I can still add folders. I can click the option of random order and change every x times. When I close out my system preferences, it resets what I did. I go back to my background panel and they are unchecked. How can I fix this and is anyone else having this problem?

    delete the file com.apple.desktop.plist from homedirectory/Library/Preferences and log out/in. You background settings should be set to defaults and you should be able to change them as you like.

  • Title 3D Background Changes

    When working with Boris Title 3D, how does on change the background color? Also, is there a way to see the changes in real time?
    Thank you,
    Lyman

    Use a color matte and put it on the layer underneath the title.
    Only in the Tile 3D window, not over the video until you press the apply button. Geometry controls are in real-time and will update in the Canvas as you do them.

  • Query Question - Linking in Time Span Data to Point-in-Time References

    I am trying to pull historical data from a time-span table of records, using another point-in-time reference. I have been unsuccessful.
    I've thrown some sample tables and data together to illustrate what I am seeking:
    Create Table EmployeeInfo (
           id Number(10,0),               -- Employee ID Number
           Name VarChar2(32 Byte),        -- Employee Name
           CurrentShift VarChar2(2 Byte)  -- Current Employee Shift
    Create Table ShiftChanges (
           id Number(10,0),               -- Employee ID that this shift change record is for
           ChangeDate Date,               -- Date that this Change Took Place
           OldShift VarChar2(2 Byte),
           NewShift VarChar2(2 Byte)
    Create Table TimeCard(
           id Number(10,0),               -- Employee ID Number for this Timecard
           WorkDay Date,                  -- What Day is this Timecard for?
           Hours Float(63)                -- Number of Hours worked.
    COMMIT;
    INSERT INTO EmployeeInfo VALUES (100,'John Doe','Days')
    INSERT INTO EmployeeInfo VALUES (101,'Jane Doe','Days');
    INSERT INTO TimeCard VALUES (100, to_date('01012010','ddmmyyyy'), 10.5);
    INSERT INTO TimeCard VALUES (101, to_date('01012010','ddmmyyyy'), 10);
    INSERT INTO TimeCard VALUES (100, to_date('02012010','ddmmyyyy'), 9);
    INSERT INTO TimeCard VALUES (101, to_date('02012010','ddmmyyyy'), 10.5);
    INSERT INTO TimeCard VALUES (100, to_date('03012010','ddmmyyyy'), 8);
    INSERT INTO TimeCard VALUES (101, to_date('03012010','ddmmyyyy'), 7);
    INSERT INTO ShiftChanges VALUES (100, to_date('02012010','ddmmyyyy'), 'Nights', 'Days');
    COMMIT;I could do a query such as:
    SELECT TC.id,
           EM.Name,
           TC.Workday,
           EM.CurrentShift AS Shift
    FROM   TimeCard TC,
           EmployeeInfo EM
    WHERE  (TC.ID=EM.ID(+));But it will not give me the historical shift, only the current. Since John Doe changed shifts on Jan 2 from Nights to Days, the above query would not reflect it.
    I have attempted to join the historical table using a less-than operator. This doesn't work since more than one row can be returned.
    SELECT TC.id,
           EM.Name,
           TC.Workday,
           SC.NewShift AS Shift
    FROM   TimeCard TC,
           EmployeeInfo EM,
           ShiftChanges SC
    WHERE  (TC.ID=EM.ID(+)) AND
           (TC.ID=SC.ID(+) AND TC.WORKDAY<=SC.WORKDAY(+));The problem stems from the fact that you need to examine multiple records in one table in order to obtain the correct historical data for the other.
    The following SQL script {color:green}does work{color} - if the values are defined ahead of time.
    DEFINE EMPID=101;
    DEFINE CHGDATE=to_date('01/01/2010','dd/mm/yyyy');
    SELECT SQ.Shift
    FROM   (SELECT  ShiftChanges.NewShift AS Shift,
                    RANK() OVER (ORDER BY ShiftChanges.ChangeDate DESC) R
            FROM    ShiftChanges
            WHERE   ShiftChanges.id = &EMPID AND
                    ShiftChanges.ChangeDate <= &CHGDATE
            ) SQ
    WHERE R = 1However, I have been unsuccessful in adapting it to the example tables I provided. If I insert the query as an inline subquery* in the select statement, it won't work, since the criteria is nested two levels down, and I can only get parent values within the first level.
    I haven't thought of a way I can do this using a nested subquery - I keep running into that problem - how do you link in Time-Span data with a point-in-time reference.
    Any ideas / enlightening thoughts?
    Thank You
    {size:8}_SELECT * FROM V$VERSION information:_
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
    PL/SQL Release 9.2.0.8.0 - Production
    "CORE     9.2.0.8.0     Production"
    TNS for 32-bit Windows: Version 9.2.0.8.0 - Production
    NLSRTL Version 9.2.0.8.0 - Production
    {size}
    user10879184 re-wrote the original post on 29-Mar-2010 1:21 PM to reflect suggestions made by poster.

    I changed the tables to hold VARCHAR2(6) shift information and your query to reference the ChangeDate column.
    I also assume you meant to link a TimeCard entry with the most previous ShiftChange entry rather than one that occurs after the time worked (TC.WORKDAY>=SC.CHANGEDATE(+) rather than TC.WORKDAY<=SC.CHANGEDATE(+)):
    Another issue you don't take into account the case where there has been no shift change. In that event you need the current shift from the EmployeeInfo table which is taken care of with the NVL function.
    You correctly note that multiple shift change records will result in duplicate TimeCard records though your test data fails to check for that condition. I added this row:
    SQL> INSERT INTO ShiftChanges VALUES (100, to_date('03012010','ddmmyyyy'), 'Days', 'Nights'); Now it is apparent
    SQL> SELECT TC.id,
      2         EM.Name,
      3         TC.Workday,
      4         NVL(SC.NewShift,EM.CurrentShift) AS Shift
      5  FROM   TimeCard TC,
      6         EmployeeInfo EM,
      7         ShiftChanges SC
      8  WHERE  TC.ID=EM.ID(+) AND
      9         TC.ID=SC.ID(+) AND TC.WORKDAY>=SC.CHANGEDATE(+);
            ID NAME                             WORKDAY   SHIFT
           100 John Doe                         01-JAN-10 Days
           100 John Doe                         02-JAN-10 Days
           100 John Doe                         03-JAN-10 Days
           100 John Doe                         03-JAN-10 Nights
           101 Jane Doe                         01-JAN-10 Days
           101 Jane Doe                         02-JAN-10 Days
           101 Jane Doe                         03-JAN-10 Days
    7 rows selected.The reason for the duplicate Jan3 time is the two shift change records. We are matching both ShiftChange records that occured before the 3rd.
    We also see that your test data has John starting out on Days and then shifting from Nights to Days on the 2nd for no real change. Fixing that:
    SQL> DELETE from ShiftChanges where ID = 100;
    2 rows deleted.
    SQL> INSERT INTO ShiftChanges VALUES (100, to_date('02012010','ddmmyyyy'), 'Days', 'Nights');
    1 row created.
    SQL> INSERT INTO ShiftChanges VALUES (100, to_date('03012010','ddmmyyyy'), 'Nights', 'Days');
    1 row created.Then:
    SQL> SELECT TC.id,
      2         EM.Name,
      3         TC.Workday,
      4         NVL(SC.NewShift,EM.CurrentShift) AS Shift
      5  FROM   TimeCard TC,
      6         EmployeeInfo EM,
      7         (SELECT ID, Workday, ChangeDate, NewShift
      8          FROM
      9                 (SELECT TC2.ID, TC2.Workday, SC2.ChangeDate, SC2.Newshift,
    10                         MAX (SC2.ChangeDate) KEEP (DENSE_RANK LAST ORDER BY SC2.ChangeDate)
    11                                              OVER (PARTITION BY SC2.ID, TC2.Workday) AS Max_ChangeDate
    12                  FROM   ShiftChanges SC2,
    13                         TimeCard TC2
    14                  WHERE  TC2.Workday >= SC2.ChangeDate
    15                  AND    TC2.ID = SC2.ID
    16                  )
    17          WHERE   ChangeDate = Max_ChangeDate
    18          ) SC
    19  WHERE  TC.ID=EM.ID(+) AND
    20         TC.ID=SC.ID(+) AND
    21         TC.Workday=SC.ChangeDate(+) AND
    22         TC.Workday = SC.Workday(+);
            ID NAME                             WORKDAY   SHIFT
           100 John Doe                         01-JAN-10 Days
           100 John Doe                         02-JAN-10 Nights
           100 John Doe                         03-JAN-10 Days
           101 Jane Doe                         01-JAN-10 Days
           101 Jane Doe                         02-JAN-10 Days
           101 Jane Doe                         03-JAN-10 Days
    6 rows selected.The inline view finds the greatest ChangeDate less than the TimeCard Workday for each Workday.

  • Why does my launchpad background change automatically??

    i just fingered my launchpad background chagnes automatically. and also i found out that people say if u wanna change your background of laucnpad, you can just press option+command+control+b, i tried it several times and it works. but when the launchpad background changes itself, i cannot change it back!!i pressed those keys and they did not work....why??

    I am a new to macs and I am having the same problem. After downloading gogle chrome then installed I decided I did not want to use it. My mistake I decided to uninstall but simply dragged tha app from the finder widow to the trash. After that launch pad started to do the same as above.
    Plaese can anyone help?

  • Changing Appointment STOP Time From One Hour to Half-Hour.

    On my desktop and on my Centro, appointment "stop" times always default to one hour from the "start" time. I would like to change this so the default is to a half-hour interval. However, I cannot find a setting for this, either on my desktop or on the mobile device.
    I'm changing the "stop" time manually for each entry, which is inconvenient. Is there any way to make it automatic?
    -Paul-
    Post relates to: Centro (Sprint)

    Have you tried this procedure to enter an end time?
    Using the keyboard, enter a starting hour and minute for the event. (For example,
    enter 545 for 5:45.)Select the End Time box, and then select the ending hour and minute for the event. 
    Click on the following link for the support page for your device on the kb.palm.com webpage.
    http://www.palm.com/us/support/centro/centro_sprint/
    There are links on the page to the user guide, troubleshooting, how to's, downloads, etc.
    Post relates to: Palm i705

  • User clicking same Browser link multiple times

    Hi,
    We have a really weird issue on user clicking a link multiple times from browser, and that request sent to server multiple times, which is resulting into other DB errors.
    We are using JSF "commandLink" component.
    How do I transale user duplicate request into one.
    thanks

    Kiros,
    That's really a big change for me. I have 30 JSF pages, and an average 2 links per page. So, I'm touching more than 60 places to implement this change.
    I know for sure that Java Script solution will not work.
    thanks,
    Amit

  • Java Thread.sleep(timeout) is influenced by changes to System time on Linux

    Java Thread.sleep(timeout) is influenced by changes to System time on Linux
    bugId : 6311057
    I encountered this problem in redhat6/ jdk 1.6

    890651 wrote:
    Java Thread.sleep(timeout) is influenced by changes to System time on Linux
    bugId : 6311057
    I encountered this problem in redhat6/ jdk 1.6At least half the time I use it, I'd want it to be, the other half I wouldn't care.
    What are you doing with it where this might be a problem?
    Changing the system clock abruptly can cause all kinds of problems with your system anyway, because various background activities etc. often depend on file dates. Wherever possible use the "skew" method to adjust your system clock, rather than just plonking in a new value, especially if you are setting the clock backwards.

  • Help help please...Photoshop CS, on a Windows XP machine.   After re-booting the machine after an unexpected power failure I have been told that the "Configuration appears to have changed since the time this product was activated. To continue using this p

    Help help please... I'm running Photoshop CS, on a Windows XP machine.   After re-booting the machine after an unexpected power failure I have been told that the "Configuration appears to have changed since the time this product was activated. To continue using this product I must re-activate it".  BUT the activation link informs me that they no longer support the product (neither online nor telephonically).  So how can I re-activate this software?

    Hello Helios & Eb29075,
    +1. Please check log file for error message.+
    +2. Check status of EM.+
    +3. Please see:+
    +How To Drop, Create And Recreate DB Control In A 10g Database [ID 278100.1]+
    +Problem - emctl start dbconsole Fails with Error OC4J Configuration issue OC4J_DBConsole__ not found [ID 555218.1]).+
    As you said above, yes, I did find OC4J config issue & EM Config issue and resolved them. But still I couldn't get my DBConsole started.
    Yes, I was able to drop DBConsole<sid> service using 'emca' repository drop. But, when I started recreating repository for DBConsole service, I wasn't able to do it. I tried several times but in vain.
    Thanks,
    A.P.

Maybe you are looking for