Image stacking (z-index) flex 3.5

Hi
This is probably a really simple question, well I hope so, but I cant figure out how to have an image over top of another.
The senario is Im making a banner. I want the left image to be layered over top of the right image.
Thanks for any advice.

So now I am using the following, but the images are not being positioned left and right. One completely obsurecs the other (on the left) and there is nothing on the right.
What am I doing wrong?
<mx:ViewStack id="viewstack1" >
<mx:Canvas label="View 1" width="100%" height="100%">
<mx:Image id="rightImg" source="
com/esri/solutions/flexviewer/assets/images/bgTopRight.png" maintainAspectRatio="
true" horizontalAlign="
right" verticalAlign="
top" visible="
true" includeInLayout="
true" autoLoad="true" />
<mx:Image id="imgLogo" source="
com/esri/solutions/flexviewer/assets/images/Commission-Eurostat-GISCO-gradient.png" maintainAspectRatio="
true" horizontalAlign="
left" verticalAlign="
top" visible="
true" includeInLayout="
true" autoLoad="true" />
</mx:Canvas>
</mx:ViewStack>

Similar Messages

  • How to load and display a byte array (jpeg) image file dynamically in Flex?

    My web service client (servlet) received a binary jpeg data from an Image Server. The Flex application invokes the
    servlet via HttpService and receives the binary jpeg data as byte array.  How could it be displayed dynamically
    without writing the byte array to a jpeg file?  Please help (some sample code is very much appreciated).

    JPEGEncoder is only useful for converting BitmapData to ByteArray, not the other way around.
    By the way JPEGEncoder and PNGEncoder are part of the Flex SDK now, so no need to use AS3Lib (alltough it's a good library to have around).
    To display/use a ByteArray as image, use a Loader instance with the loadBytes method.
        Loader.loadBytes(bytes:ByteArray, context:LoaderContext = null);
    Listen for the complete event on the Loader.contentLoaderInfo and get the BitmapData in the event handler.
    private function loadJpeg():void {
        var loader:Loader = new Loader();
        loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaderCompleteHandler);
        //jpgBA is the ByteArray loaded from webservice
        loader.loadBytes(jpgBA);
    private function loaderCompleteHandler(evt:Event):void {
        var t:LoaderInfo = evt.currentTarget as LoaderInfo;
        // display the jpeg in an Image component
        img.source = t.content;
    <mx:Image id="img" scaleContent="false" />

  • I have CS2 and would like to do Image Stacking.    I understand CS3 allows this.  correct?     Am I wiser to purchase CS3 upgrade.  Am I going to run into issues with install?

    I have CS2 and would like to do Image Stacking.    I understand CS3 allows this.  correct?     Am I wiser to purchase CS3 upgrade.  Am I going to run into issues with install?

    Well, I refuse to sign up to pay Adobe a monthly tribute for life too, but that doesn't mean we are limited to CS3.
    I'm staying with CS6.
    Adobe still sells a perpetual-license to Photoshop CS6 without the subscription model, but it's $700 for the Standard version and a cool $1,000 for the Extended version.
    You haven't mentioned your platform, Macintosh or Windows, so make sure CS3 or any other obsolete version you buy actually runs on a modern operating system.
    Good luck.

  • Drag-and-drop for image stacks

    I'd like to be able to drag and drop image stacks from one folder to the next. Currently, when I drag and drop it just grabs one of the images from the stack and leaves the others behind.
    I can expand the stack and then drag and drop all of them, but the stack itself is lost--I have to go to the destination directory and re-stack the images.
    Bart

    I've discovered (and its nowhere in the documentation as far as I can see) that if you select the bottom slide in a stack .. ie the bottom left hand corner of the "reperesenation of the lower slides" you can drag and drop the stack(s) in to another folder.
    Unfortunately they don't remain stacked ..Here's another vote for persistent stacks.
    Pete Roberts

  • Draw image in a indexed bufferedimage

    When i draw a image in a indexed bufferedimage the destination image is distorted. As source image i use a 256 color gif image. But when i use a TYPE_INT_RGB bufferedimage it's all good. I don't get it. Here's a is the simple code i'm using.
    Image image = new ImageIcon("E:/Java/MapEdJava/MapEditor/pics/"+ImageName).getImage());
    BufferedImage bi = new BufferedImage(image.getWidth(this),image.getHeight(this) , BufferedImage.TYPE_BYTE_INDEXED);
    Graphics2D g2d = bi.createGraphics();
    g2d.drawImage(image, 0, 0, this);

    First, a plea to all posters: if you write "why does my code do this..." either include a brief program that recreates the problem, or give the url to such code. On one hand, posting a long listing doesn't encourage assistence from the forum -- you should be motivated enough to recreate your problem "in the small". On the other hand, not posting enough information doesn't help either: for example, if a particular image is giving you grief, include its url, or find an image with a publicly-reachable url. [Getting off soapbox :-]
    Here's some quick&dirty code that, perhaps, demonstrates the poster's problem. It features a certain bald, chunky guy (no, not me!)
    import java.awt.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class ImageTest extends JComponent {
         public static void main(String[] args) throws java.io.IOException {
              java.net.URL url = new java.net.URL(
    "http://java.sun.com/people/jag/JagWithDukeSmall.gif");
              JFrame frame = new JFrame(url.toString());
              Image image1 = new ImageIcon(url).getImage();
              BufferedImage image2 = javax.imageio.ImageIO.read(url);
              BufferedImage image3 = new BufferedImage(image2.getWidth(),image2.getHeight() ,
                   BufferedImage.TYPE_BYTE_INDEXED);
              System.out.println("image2 colormodel="+image2.getColorModel().getClass().getName());
              System.out.println("image3 colormodel="+image3.getColorModel().getClass().getName());
              Graphics2D g2 = image3.createGraphics();
              g2.drawImage(image1, 0, 0, null);
              frame.getContentPane().add(new ImageTest(image1, image2, image3));
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.pack();
              frame.show();
         Image im1, im2, im3;
         ImageTest(Image im1, Image im2, Image im3) { //assume loaded into memory
              this.im1 = im1; this.im2 = im2; this.im3 = im3;
         public Dimension getPreferredSize() {
              return new Dimension(3*im1.getWidth(null), im1.getHeight(null));
         protected void paintComponent(Graphics g) {
              g.drawImage(im1, 0, 0, null);
              g.drawImage(im2, im1.getWidth(null), 0, null);
              g.drawImage(im3, 2*im1.getWidth(null), 0, null);
    }Why is the third image grainy? I tried adjusting g2's rendering hints, specifically KEY_COLOR_RENDERING and KEY_DITHERING, but I couldn't see any difference. Perhaps the graininess is because image3 is constructed with (I assume) a generic half-tone(?) IndexColorModel. If you know your image has lots of blues, you could construct an ICM with more blue-tones and pass it to constructor:
    BufferedImage(int width, int height, int imageType, IndexColorModel cm)On the other hand, image2 has an ICM and it looks OK -- why not load images using java.imageio.ImageIO.read()?
    --Paul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Image of dicom and flex

    Hi
    I want to display image of dicom by flex, can i do it ?
    would you tell me how to do ?

    Hi
    Dany
    I want to use the browser on dicom images, so I want to know, I will flex can realize the effect.
    Will i design c++ + java +flex ?
    Could you tell me how to do?
    Thank you very much

  • Does Lightroom 5.7 do focus or image stacking.

    Does Lightroom 5.7 do focus or image stacking.

    No.  Use an external editor for that - e.g. Photoshop, Elements, GIMP...

  • O.T.  Image Stacker

    Shareware but free trial. Windows only.
    Image Stacker combines multiple images into a single image. It can be used to overcome one of the last remaining limitations of digital cameras compared to their film counterparts: their inability to take very long exposures. Image Stacker can also be used to reduce the appearance of "digital noise" in images created by digital cameras or scanners, and create "synthesized long-exposures" without overexposure.
    http://www.tawbaware.com/imgstack.htm

    Malcolm....
    I came across this a while back but somehow I just can't seem to take Microsoft seriously when it comes to Digital Imaging - sure they'd like to rule the world but they're coming from behind.
    In my opinion the market in Digital Cameras is going to peak soon and these are the major drivers behind Microsofts playing in the Digital Imaging world. So which camera maker is going to introduce a new format and convince people to buy it when it doesn't do anything better than the one they already have.
    Colin

  • Image re-use in flex

    Hi,
    I am trying out FlexBuilder 3 and seeing if I can put together a first project.
    The layout is in module format, whereby the main application SWF loads modules as necessary.
    The problem I have is that I am trying to find a tidy way to re-use embedded images.
    So far, I have found the following website :
    http://stackoverflow.com/questions/87557/in-flex-as3-how-do-i-get-a-class-definition-of-an -embedded-asset-with-getdefinit
    However I've tried implementing both methods and cannot get the image to load.
    In my last implementation attempt, I've tried the following.
    (1) A class called SVImages
    package com.test.serviceview
        import flash.display.Bitmap;
        [Bindable]
        public class SVImages
            [Embed(source="assets/images/1938022_small.jpg")] private static var WelcomeImage:Class;
            private var _image:Bitmap;
            public function SVImages(name:String)
                //_image = new this[name]() as Bitmap;
                var classDef:Class = SVImages[name] as Class;
                _image = new classDef() as Bitmap;   
    (2) Within one of my modules
        <mx:Script>
            <![CDATA[
                import com.test.serviceview.SVImages;
                [Bindable]
                public var Handshake:SVImages = new SVImages("WelcomeImage");
            ]]>
        </mx:Script>
    <mx:Image id="welcomeimg" source="{ WelcomeImage}" height="174" width="231" y="-2" horizontalCenter="-115.5"/>
    All this compiles fine and there are no problems notified in Flex Builder.  The text label elements of my module show up fine in the application, but the image just does not appear.  I have tried changing the image source to reflect both the relative directory compared to the main application, and the relative directory compared to the module.  Neither option worked.  The image definitley exists because I can browse to it.
    The problem is, I am both a Flex newbie and an ActionScript newbie.... so I don't know where to start looking for what's wrong !
    Thanks for your help

    Before anyone comments,
    public var Handshake:SVImages = new
    is actually
    public var WelcomeImage:SVImages = new
    I'm not that silly

  • How to insert a background image in VGroup in Flex Mobile

    I want to insert a background image for this VGroup. Help me out. I'm new to Flex !!
    I'm using this code in Flex Mobile Application
    <s:VGroup height="100%" width="100%"
              paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">   
        <s:List id="homeList" height="100%"
                labelField="title"
                dataProvider="{homeNews}">
            <s:layout>
                <s:TileLayout requestedColumnCount="1"
                              verticalGap="5"/>
            </s:layout>
            <s:itemRenderer>
                <fx:Component>
                    <s:ItemRenderer>
                        <s:VGroup>
                            <s:BitmapImage source="{data.source}"/>
                            <s:Label text="{data.title}" />
                        </s:VGroup>
                    </s:ItemRenderer>
                </fx:Component>
            </s:itemRenderer>
        </s:List>
    </s:VGroup>

    I don't think you can add a background image to a VGroup directly, nor can VGroup be skinned.
    As far as I am aware there are probably 2 solutions
    1) use a SkinnableContainer instead skin the container to have a background image and set its layout to VerticalLayout
    2) enclose the VGroup in a Group with a BasicLayout. you can then add a background image to the Group and overlay the VGroup

  • Some images not loaded in flex Image Control.

    Hi,
        Can anybody help me. I am loading friends album image in flex Image control. Its strange that some image do not load even the path is fine and I can open in browser.  I think there is time out issue.
    Thanks in advance.

    Hi premkant81,
    Try to register the following event Listeners and try to trace out the problem...
    I hope you are using either Loader or URLLoader to load the images...Try to register the below  eventListeners for the Loader..and check
    HTTPStatusEvent.HTTP_STATUS
    SecurityErrorEvent.SECURITY_ERROR
    IOErrorEvent.IO_ERROR
    What is the size of the Image files you are loading...???
    Thanks,
    Bhasker Chari

  • Automatic image stacking in Bridge CC by filename.

    Hi,
    I work at a CGI Studio and we use Bridge to acess and manage our library of textures etc.
    Now textures usually consist of several seperate image files, let's say three (_DIFFUSE, _BUMP, _SPECULAR)
    The filename of these three files, say they're from a wood material, would always be like "Wood-"+counter+"_DIFFUSE", example: "Wood-003_DIFFUSE.jpg", "Wood-003_BUMP.jpg" and "Wood-003_SPECULAR.jpg"
    Now I manually grouped the three seperate image files together so I have a stack of three. The thing is we got hundreds of those 3-file-images.
    Basically I need a way to automatically stack all the images which have the same beginning/pattern
    Related: I did this once manually but for some reason Bridge messed up after a few days and got them all half-*** together and jumbled them around resulting in all files still being there but not properly stacked anymore...
    Now I know my way around proprietary scripting languages and am familiar with stuff in general. Do I need to do scripting here or is there a better way to do so?
    How would I start? Where? Has anyone links to a solution for this (I think common) problem?

    Here is one solution.
    #target bridge 
       if( BridgeTalk.appName == "bridge" ) { 
    woodStack = MenuElement.create("command", "Wood Stack", "at the end of submenu/Stack");
    woodStack.onSelect = function () {
    var fileList = Folder(app.document.presentationPath).getFiles("*diffuse*");
    for(var a in fileList){
        var firstFile = decodeURI(fileList[a].name.match(/[^_]*/));
        var filesToStack = Folder(app.document.presentationPath).getFiles("*"+firstFile+"*");
        if(filesToStack.length == 3) {
            app.document.deselectAll();
            for(var s in filesToStack){
            app.document.select(new Thumbnail(filesToStack[s]));
        app.document.chooseMenuItem("StackGroup");
    Copy and paste the script into ExtendScript Toolkit or a PLAIN TEXT editor.
    Then save it out as filename.jsx
    The correct folder to save the script can be found by opening Bridge, going to the preferences - Startup Scripts and clicking on the "Reveal my startup scripts" button.
    Once saved close and re-start Bridge.
    To use, selected the folder you want to stack the groups of files and select Stacks - Wood Stack

  • Default image in Albums index

    I was given this HTML snippet by Cyclosaurus to add to my "Ablums" template index page since I didn't want the first picture as the default in each of the pages:
    <script type='text/javascript'>
    var albumIndex = 0;
    var imageIndex = 5;
    function setGridImage(albumIndex, imageIndex) {
    try {
    mediaDiv = parent.document.getElementById('gridEntry' + albumIndex);
    slideDiv = mediaDiv.widget.getElementById('slideshow_placeholder');
    mediaDiv.widget.p_scrub(slideDiv,imageIndex);
    mediaDiv.addEventListener('mouseout', function() {this.widget.p_scrub(slideDiv,imageIndex);})
    clearInterval(chkGridEntry);
    } catch (e) {}
    chkGridEntry = setInterval('setGridImage(albumIndex, imageIndex)', 500);
    </script>
    Unfortunately, it doesn't seem to work. For example, if I choose albumIndex "0" as the first album and "24" as the imageIndex, the default picture is set to image 38. It doesn't even work for the first two or three pictures. What am I missing?
    http://web.mac.com/douglasm/2009/January/January.html
    -Doug

    ..in case you like to know, the imageIndex you looking for is 15
    He he! I'm sure there's a solution. It's just not clear to me right now why the images don't seem to line up with the numbers from the beginning. I'm assuming the numbers start with 0 and go up from there in order that they appear on the page. Since I have a three-up layout, the first picture would be "0" and the picture under it would be "3". Since Sylvia is the hostess of the evening, I thought it would be appropriate that her picture was the default image. I'm having fun in San Francisco for Macworld, no hurry right now.
    -Doug

  • "ImageList1.Images.Item(#) = ImageList2.Images.Item(#)" produces "index" error. Help.

    I have two ListViews, displaying the contents of two ImageLists ("ImageList1" & "ImageList2"):
    (mockup)
    The goal: User checks a box on the left AND a box on the right, replacing the right-checked image with the one on the left.
    My code:
    ImageList1.Images.Item(intLeftChecked) = ImageList2.Images.Item(intRightChecked)
    But when I do this, I get the following runtime error:
    InvalidArgument=Value of '0' is not valid for 'index'.
    The index is not the problem though because:
    ImageList1.Images.Item(1) = ImageList2.Images.Item(1)
    ...gives me: InvalidArgument=Value of '1' is not valid for 'index'.
    This is my first time using the "ImageList" control, so I'm not too familiar with its eccentricities. :(
    Help. Thx.

    You are saying you want to change the image displayed in the listview, but the line
    ImageList1.Images.Item(intLeftChecked) = ImageList2.Images.Item(intRightChecked)
    changes the Imagelist. I would just load the images in the imagelist(s) once, then only change the ImageIndex property of the list item that you want to change.
    In addition, the statement assigns from right to left, not from left to right as you've described.
    How did you add the images to the Imagelists? Did you use the Form designer?
    What do the lines
    debug.print(ImageList1.Images.count)
    debug.print(ImageList2.Images.count)
    output in the output window?
    I'm not even sure whether you need two Imagelists.
    The mockup I used isn't exactly what I'm doing (which is a bit more complex). I was trying to simplify the issue and may have simplified it too much. The "Left = Right" mistake is just my bumbling fingers. :)
    What my app really does is show a fixed number of imageboxes on top (for example: playing cards) and a ListView below showing more images from a different folder (for example: the remaining cards). Both lists load their images directly from the
    computer:
    img = Image.FromFile(strPath & "Save\Card" & Format(intCnt, "00") & ".png")
    Dim myBitmap As New Bitmap(img)
    myThumbnail = myBitmap.GetThumbnailImage(32, 32, myCallback, IntPtr.Zero)
    (I believe you supplied me with that code.)
    The user can then replace one of the checked images above with one of the checked images below.
    This portion of the program works just fine:
    Thumbnails(intChecked).Image = Image.FromFile(strPath & "\Card" & Format(strCheckedItems(intCnt), "00") & ".png")
    ...but that's not enough. If I change the displayed thumbnail, I need to also need to update the "ImageList" so what's stored matches what's displayed on screen.
    ImageList1.Images.count = 80
    ImageList2.Images.count = 1   (correct, I only have one item loaded/displayed in the ListView.)
    I have two ImageLists because users can load in different icons into the "Inactive" window while leaving the "Active" list unchanged. This involves clearing ImageList2 between loads.
    Any idea what I'm doing wrong? Thx.

  • Image swap code and flex -- HELP NEEDED

    Hello Folks,
    I am still new at programming and having a major issue and wondered if anyone know a simple way to do a photogallery by using some code to create an image swap
    Thumbnail ( here )                                             Large image here
    Next Thumbnail (here )                                      Large Image changes
    Next Thumbnail (here )                                      Large Image changes
    Someone suggested I use PHP to load all the images at once but it was over my head... any one got some simple explained solutions... Really trying to learn this...
    Thanks

    Hi 123tron,
    For these type of requests you should post a cookbook recipe request to Adobe's cookbook site: http://cookbooks.adobe.com/flex
    Good luck!

Maybe you are looking for

  • Embedded MPEG-1 Muxed movie in Keynote Export

    Hi! I have a presentation to do and there is a QuickTime file I have to include, and it works fine as a QuickTime embedded file in a Keynote presentation. However, I have to make it into a exported QuickTime Presentation. Unfortunately the mov file i

  • Having issues with multiple devices connecting to AirPort

    Hello All I'm having an issue when people come to visit. It seems my network goes haywire once they get here with their devices. My network consits of an Airport Extreme and two Airport Expresses connected to a cable modem. On the network I have two

  • Reading data from pdfsource of adobe form

    Friends, This error pertains to the retrieving data when executing the WDA application. System details: NetWeaver 2004s. ADS support pack 16. The Adobe Livecycle Designer version: 7.1.3129.1.296948 The Adobe Reader version: 8.1 The SAP GUI version: 7

  • I have a HP Pavilion dv6 that has suddenly stopped playing any kind of audio. How do I fix this?

    I have a HP Pavilion dv6 that suddenly stopped playing any kind of sound.  That's with earphones plugged in or not.  The microphone indicator in sound setup indicates that it is listening to external sound, and when I play system sounds, the speaker

  • BW 3.5 EXPORT\IMPORT

    Hi Gurus, I have a little questions about export\import BW 3.5... I have exporting SAP_ALL system BW production to BW developer and after export and import if I start RSA1 to check data insert, I have the message: "you can only work on the client 400