Changing the background with timer?

Hi,
In my project, the background of the application is black and
red gradient. I want to change it yellow and black and then green
and black after every 30 seconds?
Any idea?
Thanks.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="vertical"
backgroundGradientColors="[#000000, #660707]"
backgroundGradientAlphas="[1.0, 1.0]"
verticalScrollPolicy="off">
<mx:Style>
VBox {
borderColor: #000000;
borderStyle: outset;
border-thickness: 2;
</mx:Style>
<mx:Accordion id="myAccordion" width="600">
<mx:VBox id="ms" label="Microsoft" width="100%"
height="500" horizontalScrollPolicy="off">
<mx:HBox horizontalScrollPolicy="off" width="100%">
<mx:HBox horizontalScrollPolicy="off">
<mx:Image source="assets/microsoft4SBTH.jpg" height="80"
width="80"/>
</mx:HBox>
<mx:HBox horizontalScrollPolicy="off" width="100%">
<mx:Text text="Microsoft is the best in wondows. Yes they
are really good and getting better each and {'\n'}every day. They
have introduce Windows 7 and launcing the exams too."
width="100%"/>
</mx:HBox>
</mx:HBox>
</mx:VBox>
<mx:VBox id="cs" label="Cisco" width="100%" height="500"
horizontalScrollPolicy="off">
<mx:HBox horizontalScrollPolicy="off" width="100%">
<mx:HBox>
<mx:Image source="assets/c.jpg" height="80"
width="80"/>
</mx:HBox>
<mx:HBox horizontalScrollPolicy="off" width="100%">
<mx:Text text="Microsoft is the best in wondows. Yes they
are really good and getting better each and every day. They have
introduce Windows 7 and launcing the exams too." width="100%"/>
</mx:HBox>
</mx:HBox>
</mx:VBox>
<mx:VBox id="st" label="Symantec" width="100%"
height="500" horizontalScrollPolicy="off">
<mx:HBox horizontalScrollPolicy="off" width="100%">
<mx:HBox>
<mx:Image source="assets/Symantec.jpg" height="80"
width="80"/>
</mx:HBox>
<mx:HBox horizontalScrollPolicy="off" width="100%">
<mx:Text text="Microsoft is the best in wondows. Yes they
are really good and getting better each and every day.{'\n'} They
have introduce Windows 7 and launcing the exams too."
width="100%"/>
</mx:HBox>
</mx:HBox>
</mx:VBox>
<mx:VBox id="vm" label="VMWare" width="100%" height="500"
horizontalScrollPolicy="off">
<mx:HBox horizontalScrollPolicy="off" width="100%">
<mx:HBox>
<mx:Image source="assets/vmware4SBTH.jpg" height="80"
width="80"/>
</mx:HBox>
<mx:HBox horizontalScrollPolicy="off" width="100%">
<mx:Text text="Microsoft is the best in wondows. Yes they
are really good and getting better each and every day. {'\n'}They
have introduce Windows 7 and launcing the exams too."
width="100%"/>
</mx:HBox>
</mx:HBox>
</mx:VBox>
<mx:VBox id="ct" label="Citrix" width="100%" height="500"
horizontalScrollPolicy="off">
<mx:HBox horizontalScrollPolicy="off" width="100%">
<mx:HBox>
<mx:Image source="assets/Citrix_Logo.jpg" height="80"
width="80"/>
</mx:HBox>
<mx:HBox horizontalScrollPolicy="off">
<mx:Text text="Microsoft is the best in wondows. Yes they
are really good and getting better each and every day. {'\n'}They
have introduce Windows 7 and launcing the exams too."
width="100%"/>
</mx:HBox>
</mx:HBox>
</mx:VBox>
</mx:Accordion>
</mx:Application>

This works, though if you want three color changes you'll
have to change the if else logic. You also need to change the
colors as desired:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
backgroundGradientColors="[#000000, #660707]"
backgroundGradientAlphas="[1.0, 1.0]"
creationComplete="init()">
<mx:Script>
<![CDATA[
private var tm:Timer = new Timer(30000, 0);
private var cnt:uint = 0;
private function init():void{
tm.addEventListener(TimerEvent.TIMER, onTick);
tm.start();
private function onTick(e:TimerEvent):void{
var arr:Array;
cnt++;
if(cnt % 2 == 0){
arr = [0x000000, 0xccffcc];
setStyle("backgroundGradientColors",arr);
}else {
arr = [0x000000, 0x660707];
setStyle("backgroundGradientColors", arr);
]]>
</mx:Script>
</mx:Application>

Similar Messages

  • Change the background with a bunch of kids? Quirky quick selection tool?

    Main Objective:  How can I change the background behind a bunch of kids? My quick selection tool is quirky! Like the HS kids in the pic….
    The 2nd photo is what I am looking to do.
    When I try the quick selection tool, it's all wonky & quirky now.  I can't select little bits any more! It just basically takes the whole stinkin' page! What did I do?!  Are there defaults?
    On watched video number 85 today, I tried to use my stylus and the bamboo pad. (Good grief; that's another story...it moves & I'm not even touching the pad; what's up with that?! Way too confusing, so I gave up!)
    Anyway..this is what I need.
    What is easier for me to remove the background?  The kids?  Pretend I didn't say yes to help with this project?
    All the video tutorials on how to remove backgrounds is always on a perfect object...not a real life mess of a class.  So... HELP!!!
    Please.
    This is WAY over my head; but I'm trying. Really.
    On a mac with CC membership.

    You may find it easier to select the kids than the background. Instead of copying to new layer, create a mask, then you can add or remove as you like.
    In the top tool bar click the icon in the middle to add to selection. Then use your option key to remove.
    When you are nearing done, you can then refine the mask. If necessary you can use the other selection tool for straight lines, large areas etc. For tight places you may prefer to use the quick mask tool (lowercase q)
    Take your time, you will get it. And like I said, using a mask will let you take a breather. It can help walking away for a bit.

  • Change in background MRP time with EDI scenario for sale order booking

    Hi All,
                  I have a scenario where  Sales orders are booked through EDI. Now because of some reasons duplicate orders are getting booked in SAP. Now users are  manually deleting the duplicate sales orders.
              Now MRP is running at Night with  duplicate orders in background. So users wanted to run MRP after deleting the duplicate SO.( i.e. during office Hrs)
             Should i change MRP timings to suit the user requirement? what will be the pros & cons if change MRP timings.will it throw errors in EDI.
    Thanks & regards,
    dev

    Dear,
    If you change the MRP run time for periodic job in MDBT it would not affect any where only system will create the procrument after MRP run only.
    Please try to find out the reason why  duplicate orders are getting booked?
    Regards,
    R.Brahmankar

  • HT2478 how do you make the setting to change desktop background every time you shut down your mac

    how to make setting to change desktop background every time you close your mac
    because i want to make it if anybody tries to change my dekstop picture i want it to go backto set desktop picture

    Don't let other people access your Mac in admin mode - they might change something a lot more important than the Desktop picture.
    However you can use Automator: create an Application in it, and select 'Set the Desktop Picture' from the Library. Choose the picture you want. Save the application, then go to System Preferences>Accounts>Login Items and select the Automator application you just created. This will then run at startup and set your chosen picture.

  • With green chroma concept, I removed the green background, now the green background is seen black. I don't want to have any other background clip, but I would like to change the background black to white. Please help me.

    With green chroma concept, I removed the green background.  Now the green background is seen black. I don't want to have any other background clip, but I would like to change the background black to white. Same like the advertisement clip in the Apple Website.  Please help me.

    If you want the whole of the project background to be white, you can change the colour in FCP X preferences.
    If you just want white for a section or clip, use a custom Generator from the Generators Library and change it to white in the Inspector.
    Andy

  • Does Safari use up bandwidth if I leave it running in the background with zero tabs open?  Do I have to quit the application each time I am done to avoid exceeding my internet usage/host quota?

    If I leave Safari running in the background with zero tabs open, does it still use up bandwidth?  Do I have to quit the application each time I am done to avoid exceeding my internet usage/host quota?  I'd rather not have to since quitting the application and restarting it when I need to will quickly become tedious, but if that saves me on bandwidth usage, I'll do it.  Thanks!

    iStat pro is another good means of checking your Mac's activity.   Set it up within Dashboard.   It is a free facility.
    iStat pro for Mac - CNET Download.com

  • Can you Change the Background Color of the Book from White.

    When I read in the dark my computer screen is so bright it hurts my eyes.  Is there a way to go to white letters on black or change the background to grey or another color when reading an epub book in ADE.  Some of the reader software I use has a night time option which has the black background and white letters and it is much better.  Thanks for your reply (either yes or no way!)

    Very interesting.   I didn't know that even existed   I haven't tried with a book yet but at least it is a good workaround.   As my eyesight fails it will help also!   Thanks -  Keith   ( I agree that it is lame that they don't have that feature in ADE!)

  • How to change the background color of a sequence?

    I'm using Premiere Pro CS5 on Win7 x64.  I've imported a JPEG that's a different size than my 1920 x 1080 frame.  The background of this JPEG is white, but the background of the sequence is black (by default), so the borders of the JPEG make it stand out.  I want the JPEG to blend into the sequence background by making the sequence background white.  How can I change the sequence background color?  Thanks.

    Jim and Ann are correct. I can see where someone used to After Effects might ask that question though because in AE you can change the background color of the composition. Same with Photoshop.
    However, I think it would confuse things if changing the background color were to be allowed in Premiere Pro. Black tells me something. I suppose white could tell me the same thing, but at this time it is not possible in Premiere Pro.

  • Why can't I change the background color of my UIView in IB?

    I have a rootController which controls several other ***ViewController's and I have been doing the usual thing by changing the background color in IB.  However, for one controller, I cannot change it's background color from the default no matter what I do.
    To be clear, each new controller created has been done in the same manner using the UIViewController subclass with nib file.
    I have cleaned the project and deleted the app from my iPhone countless times and still no change.
    Any suggestions will be greatly appreciated.
    Thanks!

    @ KT
    I'm replying to myself because I cannot see your post ??????
    From my email- KT said:
    "Typically, when a same-only different controller acts up like this, the first thing to do is to rewire - sounds like you've gone down that path tho.
    Can you duplicate one of the cooperative controllers, add it to the mix and see if things change there?"
    I've tried all of that several times.  I have no idea.  Maybe some sleep will help it and me.
    Thanks for your comments and suggestions.
    Edit
    As soon as I posted this - your post appeared.  Again??????

  • Unable to change the background color of a webi report in the infoview

    Hi,
    Can someone please me help me with the below issue.
    Environment Details:
    BusinessObjects XI3.1 SP1SP2SP3                                                                               
    BusinessObjects XIR2 SP5                                                                               
    .Net infoview                                                                               
    IE 7                                                                               
    JRE versions used as;                                                                               
    On BOXI3.1 SP3 Server -1.6.0_03                                                                               
    On BOXIR2 SP5 Server -1.4.2_02                                                                               
    On the client machine   -1.6.0_14      
    Issue Description:
    -Open an existing webi report in the infoview.                                                                               
    -In the report,I am not able to change the background and the font color for the column headings from the properties tab in the left navigation panel.                                                                               
    -I can change the color after hitting the color tab for multiple times.Also the color was getting changed when the color code was manually changed.                                                                               
    -The reports background color was getting changed,but not the font color.                                                                               
    -I tried to create a test report,where I was able to change the color.                                                          
    I have;
    -Installed the Java update 14 on BOXI3.1 server machine,here I was  able to change the background and font color.
    -However on the client machine,with the same Java update 14,the background and the font color for the column headings was not getting changed.
    -Same behaviour is observed on BOE XIR2 SP5 machine.
    Is there any limitations for using Java update 14 or am I required to do any other settings.
    Regards,
    Pankaj

    Hi Pankaj,
    It is a strange behavior. You also stated that when you create a test report it works fine.
    Can you create a copy of this report and then try on the new copy?
    One thing you can do as a test to refresh the universe and then try it. And change some columns - add some column and then save and ten remove and save and make changes like this and trying changing color.
    I think there is a problem with this report this is why it is behaving like this on all machine.
    Regards,
    Bashir Awan

  • How to change the background color of a cell in datagrid using flex3

    i want to change the background color of a cell.....how can i achieve this.....and also i want to know how a spacing cane be done between cells in a datagrid...plzzz help me???

    The only way I can see to do this is to use an item renderer for your cells.  This is really scruffy and would need tyding up, and maybe with a little more time could do better or someone else may have an idea but none the less this works.
    Define a custom component as below;
    This has logic to see what the value of the data is proveided by the dataprovider for the row, and if it matches the conditions in this case is equal to 5 sets the background color.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="88" height="26" dataChange="doColor()" borderColor="#000000" borderStyle="solid"
        backgroundAlpha="1">
        <mx:Script>
            <![CDATA[
                private function doColor():void {
                    if (data.value == 5) {
                        setStyle('backgroundColor', 0xcccccc);
                    } else {
                        setStyle('backgroundColor', 0xffffff);
            ]]>
        </mx:Script>
    </mx:Canvas>
    Now just apply the item renderer in the datagrid and that will do it.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"  xmlns:ns1="*">
        <mx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                [Bindable]
                private var ac:ArrayCollection = new ArrayCollection([
                    {value : 1},
                    {value : 2},
                    {value : 3},
                    {value : 4},
                    {value : 5},
                    {value : 6},
                    {value : 7},
                    {value : 8},
                    {value : 9},
                    {value : 10}
          ]]>
        </mx:Script>
        <mx:DataGrid x="40" y="36" width="408" height="193" dataProvider="{ac}">
            <mx:columns>
                <mx:DataGridColumn headerText="Column 1" dataField="value" itemRenderer="MyComp"/>
                <mx:DataGridColumn headerText="Column 2" dataField="col2"/>
                <mx:DataGridColumn headerText="Column 3" dataField="col3"/>
            </mx:columns>
        </mx:DataGrid>
    </mx:Application>
    I hope this helps
    Andrew

  • How do I change the background color of text in Pages quickly?

    I know that I can highight the words with my cursor, then press the little "a" in the toolbar, then select the color I want. However, I have to hihglight a ton of separate sentences in documents that have a few hundred pages.
    Is there a shortcut for changing the background behind the words to a specific color? Or is there a way to do it with just one click? I don't want to have to carefully select the color I want each time. I just need one color, and I'd like to be able to set it easily.

    Thanks, didn't even know about the styles drawer.
    In summary for others...
    Perform the background change on some text, and put the cursor on the text (click the text).
    Command+Shift+T to bring up style drawer.
    Click and hold the "+" button and click on "Add new Character Style" from selection.
    Click on the arrow beside "Include these character attributes."
    Deselect all of the attributes except for the "Fill."
    Change the name to "Highlight Yellow" or whatever.
    Then whenever you click on it in the styles drawer, it will apply the fill.

  • How to change the background of a Jpanel

    All I want to do is change the background color of my JPanel. I have looked at some of the java tutorials, and I am still having a really hard time figuring it out. Is there a simple way to just change the background color, without messing with overriding the paintComponent() method?

    All I want to do is change the background color of my
    JPanel. I have looked at some of the java tutorials,
    and I am still having a really hard time figuring it
    out. Is there a simple way to just change the
    background color, without messing with overriding the
    paintComponent() method?Simple enough?
    myPanel.setBackground(Color.BLUE);Edit: You'd better learn how to use and search through the API:
    http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JPanel.html
    null

  • Change the background color in a report cell - td bgcolor

    Hi.
    I have a report in which I would like to change the background color of a table cell based on some values in the underlying query
    If Column A > Column B and Column C > 10, I want to color the background green. In my cgi , this was easy, but in apex, even if I write the query to output html, won't everything already be wrapped in the <td></td> tags? Is there any way around this?
    Thanks

    Mike ,
    With the above solution you can conditionally fill the report cell with a particular color and not the entire row set. If you want to highlight entire row, you have to do something different. Take a look at this jQuery function
    Step 1 . Download jquery http://code.jquery.com/jquery-1.4.2.min.js
    Step 2. Upload it to apex image folder using shared component.
    Step 3. In the page header put the following code
    <script src="#WORKSPACE_IMAGES#jquery-1.4.js" type="text/javascript" ></script>
    <script type="text/javascript">
    $(document).ready(function(){
         if ($('.apexir_WORKSHEET_DATA').length > 0) {
              function HighLightRows(){
                                       $("table.apexir_WORKSHEET_DATA tbody td:has(COLOR_GRAY)").siblings().addClass('greentd');
                                       $("table.apexir_WORKSHEET_DATA tbody td:has(COLOR_GRAY)").addClass('greentd');
                                       $("table.apexir_WORKSHEET_DATA tbody td:has(COLOR_GREEN)").siblings().addClass('graytd');
                                       $("table.apexir_WORKSHEET_DATA tbody td:has(COLOR_GREEN)").addClass('graytd');
         // This time out is required since after the report is refreshed via AJAX,
                                  setTimeout(function(){HighLightRows();},1000);
         }//if
    HighLightRows();
    </script>
    <style type="text/css">
    .apexir_WORKSHEET_DATA td.greentd
    background-color: green !important;
    .apexir_WORKSHEET_DATA td.graytd
    background-color: gray !important;
    </style>
    Step 4. Change the SQL Query to
    SELECT
         SALE_DATE
         ,PRODUCT_NAME
         ,PRODUCT_ID
         , CASE WHEN SALE_DATE > ADD_MONTHS(SYSDATE,-2) THEN
                     '<COLOR_GREEN>&#38;nbsp;</COLOR_GREEN>'
              ELSE
                      '<COLOR_GRAY>&#38;nbsp;</COLOR_GRAY>'
         PRODUCT_NAME_COLOR
    FROM SALES;
    Step 5. Make this new column PRODUCT_NAME_COLOR visible and in the column heading u can just put &#38;nbsp;.
    As long as this column will be available for display you will see the conditional highlighting.Thanks,
    Manish

  • How can I change the background of a running webpage on my own. Example Facebook I want to change its backround color from white to black just in my view not for all

    How can I change the background of a running webpage on my own. Example Facebook I want to change its background color from white to black just in my view, not for all. Cause I really hate some site with white background because as I read for an hour it aches my eyes but not on those with darker background color.

    You can use the NoSquint extension to set font sizes (text/page zoom) and text colors on web pages.
    *NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/

Maybe you are looking for