How to automate two images in a continual loop

I'm a newbie to Flex and would like to take two images that I have and basically display them in the same spot one after another in a continuous loop (cheap automation?).  I looked into different effects like Fade, but am stumped how to do something like this in continuous loop.  Most samples show different effects as a result of clicking a button or mousing over an image ...  thanks!

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="init();"
layout="absolute">
<mx:Script>
<![CDATA[
import mx.core.UIComponent;
[Bindable]
private var vs:int = 0;
private function init():void
var timer:Timer = new Timer(3000);
timer.addEventListener(TimerEvent.TIMER, onTimerStart);
timer.start();
private function onTimerStart(event:TimerEvent):void
if(vs == 0)
vs = 1;
else
vs = 0;
]]>
</mx:Script>
<mx:ViewStack width="100%" height="100%" selectedIndex="{vs}">
<mx:VBox width="100%" height="100%" showEffect="Fade">
<mx:Image source="1.jpg" />
</mx:VBox>
<mx:VBox width="100%" height="100%" showEffect="Fade">
<mx:Image source="2.jpg" />
</mx:VBox>
</mx:ViewStack>
</mx:Application>
Hope this helps..
BaBo,

Similar Messages

  • How to compare two images through golden Template analysis?

    hi,
       How to compare two images through golden Template analysis?
    Regards
    Dibya 

    Hi Dibya,
    you can skip the pattern matching part if it's not interesting to you. Only look at the "GoldenTemplate"-part.
    I can't (and will not) look at the example in more detail, but generally such examples are given with block diagram...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to combine two images in preview onto one page

    Sorry if this topic doesn't go here - there wasn't a "preview" category.
    I have two images that i want to print out on the same page and right now they are each on a separate page in the same file in preview. Does anyone know how I can combine them onto one page?
    Thanks
    Message was edited by: p-rock

    Hi -
    I load two images in Preview and select them.
    !http://www.spotsbeforeyoureyes.com/Preview1.jpg!
    Then I select Print Selected Images:
    !http://www.spotsbeforeyoureyes.com/Preview2.jpg!
    When the print dialog box opens, I select Images per Page:2
    !http://www.spotsbeforeyoureyes.com/Preview3.jpg!
    Hope this helps.
    MtD

  • How To place two images in a obiee 11g Report Page header

    Hi ,
    Greetings for the day!.
    I want to place two images (one at top left and another at top right ) above the table view . I am not sure how it is called as. i think it is page header . Can anyone let me know how to accomplish this ?
    Kind Regards
    Sudarshan

    Hi,
    Will you pls let me know the best pixel size can be given for both images ?
    Also how can i make the images left and right aligned .Formatting option is not allowing to move the images left or right.
    Pdf output of the report header should display images one at extreme left and extreme right.
    Will you pls let me know whether i can try in single view(title/static/narrative) with html code like below :
    <img src="smiley.gif" alt="Smiley face" align="middle" />
    If so pls provide the details.

  • How to compare two images

    hey frens..i m building a motion detector in java....the problem is this, i have two bufferedimages from webcam...these are consecutive images taken from webcam...i need to compare these two images to check for any changes....i have no idea how to do this...i m trying getRGB() method for this purpose but i think i m not correctly applying it....
    so if anyone have any idea how to do this..plzz reply...

    Take the RGB value from the second image and subtract it from the first.
    If the values are the same, the result will be 0 (or black). If the values are different the result will be 0 < x < 255 and the result will be closer to white.
    This works really well for black and white images.

  • Re: How to Join two images

    Do you want to side by side the images so one is on the left and the other on the right? If so just make them the appropriate size and copy them to the correct locations.
    If you want to overlay on onto the other then xor them.

    i have tried following code but it gives me image of 2 strips
    public static void joinImage()throws Exception{
              //loads two images with ImageIO
              //for testing purpose both header and content image are same
              BufferedImage imageHeader=ImageIO.read(new File("/home/g.pol/images/DSC04249.JPG"));
              System.out.println(""+imageHeader.getHeight()+" "+imageHeader.getWidth());
         BufferedImage imageContent=ImageIO.read(new File("/home/g.pol/images/DSC04249.JPG"));
         //create new BufferedImage instance of same width and height as that of merging images
         BufferedImage resultantImage=new BufferedImage(imageHeader.getWidth(),imageHeader.getHeight()*2,BufferedImage.TYPE_INT_ARGB);
         //get graphichs of resultant image
         Graphics resultantGraphics=resultantImage.getGraphics();
         //draw image on graphics with width is same as that of test images but height 1/2 of test image
         resultantGraphics.drawImage(imageHeader,0,0,null);
         resultantGraphics.drawImage(imageContent,0,50,null);
         ImageIO.write(resultantImage,"jpg",new File("/home/g.pol/images/result.JPG"));
         System.out.println("success");
         }

  • How to superpose two image with transparency color

    Hi,
    I like to superpose two image with a transparency color. I know it is possible but i do not know on which API i can find it.
    thanks

    http://developer.java.sun.com/developer/JDCTechTips/2002/tt0618.html
    http://java.sun.com/products/jfc/tsc/articles/swing2d/
    Try these they discuss transparent images.
    rykk

  • How to compare two images and display the difference on Front Panel

    HI..
    I have attached two images.
    I want to compare these two images and subtract the differenc from these two images and display the difference(the mouse) on the front panel
    Anyone can help me?
    Really thanks
    Attachments:
    IMG_2117.JPG ‏1677 KB
    IMG_2118.JPG ‏1650 KB

    The missing thing. You have to keep in mind that what you see is not the same as the camera sees.
    So when using IMAQ Substract it gives you the difference of the value of every single pixel!
    In order to find the mouse as only difference you have to manage that every other pixel value stays the same, e.g. with a proper lightening.
    At the other hand you can combine different filters or alogorithms to get the object, e.g. if the object is darker or brighter then everything else in the image you could use a threshold and then use morphologic operations to get the objects size and position.
    Christian

  • How to automatically scale images to screen resolution?

    Hello
    I need a bit of help automatically scaling my image to the viewers resolution.
    I have done so with a table and it works fine:
    <table width="100%" border="0">
      <tr>
        <td align="center" bgcolor="#66CCFF"><h1 style="font-size: 30px; text-align: center;"><em>Table Title</em></h1></td>
      </tr>
    </table>
    But I have no clue how to do so for the image.
    When I use normal view the image looks alright, but when I go into mobile view it sticks out of the page while the table has a proper resolution.
    How do I fix this?

    Don't use tables for layouts.  They are completely ill suited to modern web design and in particular, responsive web design.
    Use CSS layouts with division widths in %.
    Example:
    CSS Code:
         body {width: 100%;}
         img { max-width:100%}
    HTML Code:
         <img src="http://placehold.it/500x350">
    Preview in browser & resize your viewport to see what happens to the image.
    Nancy O.

  • How to open two images for blending or layering them?

    I know this will be a very stupid questions for hundreds of Photoshop users, but I have watched numerous video tutorials and read manuals and I still cannot open two photos into Photoshop to blend them. Specifically, when I go to File>Open and select the file, no problem. The image opens and is in the workspace; however, when I go to File>Open and select the second image, problem!  The second image simply replaces the first opened image in th workspace. I also see how other simply slide one image over to another image to combine them; I simply cannot do that! What am I doing wrong, or what do I need to do to simply be able to combine the two photos for blending or layering. 
    I greatly appreciate your experience and help, and I am eager to get your answers!! Thank you!!
    Dean

    THANK YOU!  Your answer was the correct answer. Like an idiot though, I clicked on "Answer Helpful" instead of "Correct Answer!"
    I have already tried your suggestions, and everything worked perfectly the first time through.  Thanks again for your help, as always!!
    Dean

  • How to automatically crop images in Image Capture for import into iPhoto?

    On my PowerBook G4 / Mac OS X 10.4.2, I'm using the Image Capture 3.0.3 application to capture images coming from scanning photographs with a CanoScan 8400F.
    Can I get the Image Capture application to automatically set the crop frame on the overview? Other applications do that, but with Image Capture it seems that after I do the Overview (preview), I have to manually set the crop frame by clicking and dragging, before I can click the Scan button to do the scan?
    P.S. It seems that iPhoto does not handle scanning, and you do have to use a different application to scan photos before importing them into iPhoto.
    PowerBook G4   Mac OS X (10.4.2)  

    If you hide the details pane Image Capture will scan immediately to a specified folder. Other way is to open printers and faxing from the system preferences , select the scanning tab of your printer and click Open scanner. It will start scanning immediately without opening Image Capture. To set other software as default you should open Image Capture, select your printer/scanner and click the scanner buttons. It will then let you chose which program should be launched when you scan a document.

  • Don't know how to combine two images

    I've brought two separate images together but the problem is I'm trying to get the first image of a person inside the bird cage which is the second image. please help!

    Since you don't seem to want to supply your images I'll try to simulate what you have. You basically have two layers. A background layer an image of a sky with a floating cage. Your second layer above it is a cutout girl
    Step 1 turn off visibility of the girl and use Photoshop selection tools to select the cage. Magic wand or color range maybe pen tool whatever works best for you.
    Step 2 turn on the visibility of the girl layer target that layer, invert the selection and click on the add layer mask icon in the layers palette to add it ask a layer mask.
    Step 4 the layer mask is the current target. Select white paint and a small hard brush paint white to bring the girl back.
    step 5 if you paint too much of the girl back in and wipe out some bars switch to black paint and paint the bars back in. Its very easy to paint straight lines. Click once on the top of the bar with black paint move the mouse pointer to the bottom of the bar press shift and click. A straight line will be drawn.

  • How-to automatically center images in the Editor View at opening?

    Hello all,
    Every time I open a pic in the Editor (using CTRL+I) from a pic in the Organizer, the pic is in a separate window aligned on the left of the Editor workspace.
    I have to drag the pic up to the center where I get the blue lines around it so that it occupies the center of the workspace.
    It seems to me that this behaviour has started with PE 8, I recall (maybe wrongly) not having this behaviour in PE 7.
    Does anybondy know how to configure the whole shemabang so that a pic that is opened occupies the fill Editor workspace and is centered?
    Thanks in advance,
    Cheers,

    PSE8 introduced file browsing in tabs; similar to CS4.
    This is progress!

  • How to merge two images together

    hi,
    I sell mobile phone cases and want to produce my own images. I have taken images of the case and have taken the background off. I have found an image on the internet of the phone and want the phone to be merged into the case.
    could someone please help me to do this.
    thanks

    In Editor, go to the expert tab.
    Open picture B, the one you wish to select something from to add to another picture.
    Use one of the selection tools, e.g. selection brush, lasso tool, to select the object. You will see an outline ("marching ants") once the selection is complete
    Go to Edit menu>copy to copy the selection to the clipboard
    Open picture A, then go to Edit>paste
    Use the move tool to position object from picture B.
    In the layers palette you should see picture A as the background layer, and object B on a separate layer.

  • How to Automate two functions in the Arranger to happen one after the other

    Could Logic, or a combination of Logic + Automator be used to conduct both "Detect Transient Markers on AudioFile" AND "Convert to New Sampler Track" with one-click/one-shortcut?
    I think that would be beyond amazing.
    Is there some resource I could visit and survey in order to find information about what Automator can do with Logic?

    Okay, I'm back and it's time to get this working.
    I'm guessing that AppleScript will be the way for me to shoot the required shortcuts into Logic and get it to work
         tell application "Logic Pro" to activate -- if Logic is open, activate. If not, forget this whole script
         tell application "System Events"
             tell process "Logic Pro" to keystroke "y" using command down -- CMD-Y is configured as "Open Sample Editor"
             tell process "Logic Pro" to keystroke "t" using command down -- CMD-T is configured as "Detect Transients of Audio File"
             tell process "Logic Pro" to keystroke "1" using command down -- CMD-1 is configured as "Arrange"
             tell process "Logic Pro" to keystroke "u" using command down -- CMD-U is configured as "Convert Regions to New Sampler Track"
             --    tell process "Logic Pro" to key code 36 -- this is the return/enter key - I've commented this away because there might be some
             --  things that one wants to do in the "Convert Regions to New Sampler Track" Dialogue window.
         end tell

Maybe you are looking for

  • Can i play my phone calls over my car speakers?

    For some reason after installing my bluetooth I can hear my game sounds over my car stereo speakers. I've always wanted to be able to hear my phone calls over my speakers. Does anyone know if I can do this and if so, how do you set it up? Thanks.

  • FlexBuilder 3 not stopping at Break Points

    Hi , when i am putting BreakPoints on to FlexBuilder on to DebugPerspective , its not stopping at Break Points , please let me know what do i need to install for this to stop at Break Points ?? Please find the screenshot attached of the related error

  • How do you create a program in Labview that can be run as a Windows Service?

    I would like to create a Labview program that can be run as a Windows service.  I have read the following Knowlegebase articles and have done what they say.  Creating a Windows NT Service Using LabVIEW http://www.ni.com/white-paper/3185/en  Running a

  • Report Design

    Greetings fellow developers, new and old.  I am a new developer and even newer to CR.  I need help setting up CR XI for my company. Here is my question.  In general, is CR installed on the local developer's machines for report development and then pu

  • How to trigger attribute change run manaully

    Hi all, i need to update a master data object with new data. i have the flat file. i scheduled info package and exected DTP (datasource - >Master data object). now I need to trigger attibute change run manually. How would i do that? Pls help Please s