Newbie needs help with Images

Hi, I'm a newbie to flex and I have a question very quick and basic images. I try to have a simple image and when clicked on it, it turns into to another image, and if you click it again it goes back to the original.  To my knowledge, the first part of the MXML code works as:

< mx:Image id = source = "Old.jpg"MyImage"" click = "myImage.source ='New.jpg" "/ >"

So the first part works, but how can I do so that when I click on the new image the source goes back to the original image?  Thanks in advance.

Use a function and a global var like this in a script block:

private var bSwap:Boolean;

private function imgClick():void{
     if (bSwap){
          myImage.source="Old.jpg";
          bSwap=false;
}else
{
     myImage.source="New.jpg"
     bSwap=true;

}

}

Tags: Flex

Similar Questions

  • Need help with image fusion

    Hello

    Before I get to my question, I want to give you a glimpse of the project I'm working on and the aspects that I need help. For a school project, a customer, 94Fifty asked us to create an advertisement that depicts their basketball and could be used in advertising online and in magazines. The 94Fifty of basketball is the world's first "smart ball." It can count how many times you dribbling, the arc of your shot, release time it takes for you shoot, etc. To use the ball, you need an Apple product that can download the application 94Fifty on the App Store, so that this project is done as a collaboration with the company 94Fifty and Apple.

    For my ad, to really capture the idea of being the first smart ball, 94Fifty ball I wanted to mix an image of the texture of the ball of 94Fifty, with the shape and details of a brain, with the slogan being, "A ball that is as smart as you." I have my design buried on, but I'm not sure how to combine the image of the brain with ball should I use layers? How can I remove the pink color of the brain and replace it with the ball while keeping the shape of the brain and the lines creased the brain? Any help and technical that you can give would be greatly appreciated.

    Here are two pictures that I'm trying to mix.

    8376271918_cf0b1b5c4f_o.jpg94fifty ball.png

    I would also try and keep the logo of 94Fifty which is on the ball in the mixed picture.

    Please do not confuse this for to ask me someone to do it for me, it's the exact opposite of what I want, I just need help with what to do.

    Here is a fairly simple method:

    First of all, level of basketball for the type to be horizontal. (Also correct the values of white light - burn at the top left and bottom top right.)

    Mask on white background of the brain and turn the image to 0% of saturation.

    Put the brain on basketball on its own layer. Make the overlay blend mode.

    Using free transform, reshape the brain is greater (rounder), like the basketball, with a visible margin around the edge of the ball.

    -Now, you have a brain in a basketball, but the brain is a bit too subtle.

    Duplicate the layer of brain as many times as you need to get the good contrast (I've duped the layer of brain three times, for a total of four layers of brain).

    You will probably find that you need to use the levels adjustment layers or curves on each layer of the brain, for finer value adjustments. Make sure that each adjustment layer affects only the layer directly below.

  • Newbie needs help with cookie cutter in PSE8

    I'm new to PSE8, the cookie cutter tool and work with layers, what I need help with to accomplish what I want to do.

    I want to use one form of cookie cutter to make several 'holes' in an image, leaving a solid color background layer to show through. (Or another path, use the form of Cutter of biscuit as a solid 'rubber stamp' color to stop shape on the image in several places)?

    I opened my image in the editor and create a solid color fill layer, and then I select the shape of Cutter of biscuit that I want to use, for example a sheet.  Then I select the color fill layer, click and drag to create the sheet randomly somewhere in it.  When I release the mouse button, the window returns to the image and there is the leaf, locked in a box, in the color I want, on the image. I drag the box (leaves) to where I want it and click the green checkmark to accept. So far so good.  Here's the problem: in order to create another sheet on the image, I have to create another layer of fill and repeat the whole process.  If I try to use the same fill layer to a second sheet, the first sheet disappears.  I must be missing something very simple, but I can't figure out how to get out several sheets of a filling layer.  Also, I use a version without the constraint of the sheet because I would create several sheets of different sizes out of the fill layer as well.

    I would be grateful for any help or suggestion!

    Try the following:

    1. File > new > empty file - white
    2. Create a new layer, fill it red
    3. Create a new layer, fill it out of blue
    4. Access the marquee tool, drag the rectangle to the blue layer. You should see "ants in market". Press DELETE on the keyboard.  You should see red in the rectangular hole.
    5. Access to the custom shape (U) tool. In the form of culture library, select the heart shape black all and hang out on the blue layer. Press CTRL + left click the thumbnail of the layer of the capping layer for "mobile dotted." Hit delete on keyboard twice, and you should see red in the heart shaped hole.
    6. Continue with other forms.

  • PS Newb needs help with resizing the image and print several sheet

    Hi, I am using PS CS3 to resize an image, I have so I can print to use as a map for a miniatures game.  I have no problem of scaling of the image to the appropriate size, but I can't understand how to print multiple image 8.5 x 11 sheets.  I thought I saw an option for such a procedure before, but maybe it was in another editing program.  If anyone has any ideas on how I could do this I would really appreciate hearing about them.  Thank you!

    Illustrator and InDesign are tiled printing, like CorelDraw. Photoshop, this title is not, but may be a few script for this. In your case, the simplest solution would be to save the file in PDF format and have Acrobat print a tiled (Page scaling of parameter in Acro print dialog box). You just need to make sure that your page corresponds to several pages. Unliek AI and ID, Acro chop only stuff based on standard paper sizes...

    Mylenium

  • Newb needs help with vectorization

    I use PS and AI CS5

    It is a newb here so keep it civil please!

    I want to take my scanned sketches HAVE so I can use the "live trace" function to smooth out them and vectorizes them.  I used to do that all the time that a couple of years ago, but I forgot the process, anyone know?  It went something like this:

    I think that I would first scan, > put in photoshop > can do something, > change the file format and > put somehow GOT.

    From there on, I remember you need to > select white background and > it separate lines.  Then > I would like to use the function "vectorization.

    I meet problems that HAVE her does not seem to recognize the saved PS file formats in (except pdf) and I can't cut and paste that I get an error "cannot export Clipboard because it is too big" and when I I don't remember how to select things and even less how to separate the line of the background art - I don't see even the "function of vectorization.  It's like forgetting how to ride a bike.

    Anyone able to help?  It would be much appreciated!

    Thank you, Monika, I think I found the problem.  My seems to be damaged and will not play many file formats, it turns out that when I reinstalled my CS5 collection a year or two ago I have not activated the have correctly.  God knows why just illustrator would be like this, but for all of you who have this problem, I'm fairly certain that it is because the AI is somehow passed to the 'unlimited trial' mode.  Seems to be easy to fix, just with a reinstall.  Maybe there is an easier way, but it should work.

    Congratulations to all for your help!

  • Newbie needs help with old concert photos

    I'm just getting started with PS > was my main reason for getting the program to edit hundreds of photos together, I took in the 1970s on 35 mm film and was developed by post in enterprises (don't forget Clark, anyone?)  Most of the pictures are ugly, but they have great sentimental value and it's time for me to try to resurrect them.  Like most beginners, I find PS overwhelming but want to dive in.  Can someone give me some guidance on the necessary basic to begin steps to improve these photos, which are among the worst of them, because in addition to poor exposure, developers cut the negative through the image, and then recorded back together and printed the photo I scanned recently.  I need some basic first steps to improve the overall image and then get rid of the line.  I want to do it myself, I'm not asking anyone to do it for me.  Any help would be appreciated.  Thank you very much.11132015_0010.aJPG.JPG11132015_0036a.JPG

    Just for fun, I spent a few minutes. Yes, I did:

    1 levels. To make things dark concert. I cut the bottom of range.

    2 auto-ton, Auto color, auto contrast

    3 painted a quick mask fuzzy brush on the Cup

    4 use content-aware fill. (for the record, it is really sloppy and could do much better).

    5 adjusted levels once again, but adjusted the darker Middle slider. To taste.

    6 saved.

  • Need help with Image Processor

    Hello

    I have a lot of pictures, that I need to resize to a Web site. These images are all different sizes, 250 x 400 (h) to 200 x 800 (h). I need it to fit in a Web of 246 x 327, in their original proportions, regardless of white space.

    Does anyone know if this is possible? So far all my results have failed and image processor seems to just resize proportionally up to a maximum of 246 x 327, so nothing is that the EXACT size, but all the images will be adapted now integrate 246 x 327. I don't know what to do now.

    Any help is greatly appreciated.

    -Tim

    You can do this with a script.

    Save the code in the settings presets/scripts as filename.jsx, then you can include the script in action. Use "Insert Menu Item' in the menu drop-down action palette and select file - Scripts - select the script.

    function main(){
    if(!documents.length) return;
    var doc = activeDocument;
    var White = new SolidColor();
    White.rgb.hexValue = 'ffffff';
    // target size =  246x327
    FitImage(240, 321 ); //width - height change to suit
    app.backgroundColor = White;
    doc.resizeCanvas(new UnitValue(246,"px"), new UnitValue(327,"px"), AnchorPosition.MIDDLECENTER);
    }
    main();
    function FitImage( inWidth, inHeight ) {
     var desc = new ActionDescriptor();
     var unitPixels = charIDToTypeID( '#Pxl' );
     desc.putUnitDouble( charIDToTypeID( 'Wdth' ), unitPixels, inWidth );
     desc.putUnitDouble( charIDToTypeID( 'Hght' ), unitPixels, inHeight );
     var runtimeEventID = stringIDToTypeID( "3caa3434-cb67-11d1-bc43-0060b0a13dc4" );
     executeAction( runtimeEventID, desc, DialogModes.NO );
    };
    

    Edit: -.

    You need not even the script! as the size is not dependent on the direction, so after the Image ride you can use Image - size canvas in your action.

  • Newbie need help with AS2.0 slideshow in loop

    Hello

    I am a newbie with flash. I just create a slideshow of 3 image by using the following action in AS2 code:

    Stop();
    Loop = setInterval (SuivantePhoto, 2000);
    function SuivantePhoto () {}
    nextFrame ();
    }

    She goes through the 3 images then stops on the last. How can I do so once she stops she goes back to the first image and start again?

    Thanks for your help!

    use:

    Layer 1 (action script)

    Stop ();

    clearInterval (loop);
    Loop = setInterval (SuivantePhoto, 2500);
    function SuivantePhoto () {}
    play ();
    }

    Layer 2 (which has 3 picture frames)

    where every image has a "stop" action script ();

  • Newb needs help with dynamic text

    Hello world

    I'm not a newb - but that's how...

    I am trying to create a multi-page form that allows uses to register the products.
    The first page asks you name etc., and on the second page, I want to say "Welcome"+ username "!" -This kind of thing...
    The problem is that I can't seem to keep the values of dynamic text through the pages.

    I can get it to repeat the entry on the first page with this code:

    _root.firstname_txt. OnChanged = function() {}
    _root.firstname_repeat. Text = "Hello"+ _root.firstname_txt.text; "
    };

    However when I call on the second page it is not defined:

    second_repeat. Text = "Hello"+ _root.firstnamt_txt.text; "
    trace (_root.second_repeat.text);

    I'm sure it's something simple and I am just a dunce of programming...
    Any help is appreciated.

    your

    If your textfield (_root.firstname_repeat) does not exist on the 2nd frame, its text property will be indefinite.

    to remedy, or extend the existence of your textfield in frameworks or use a variable to store its text property (in your manager onChanged) and use this variable to retrieve the value you need.

  • Need help with Image map

    Hey everyone I hope that someone can help me here. What I'm trying to do is create a card flipping immage, if possible. Essentially, I have a card with different routes Charter on it, and I would like to be able to move the mouse on a single track, highlight it in red and then be able to click it and a link to another page. How is this achieved? There are several roads, and they are not distributed between sectors that I could crop and use as individual images. If it doesn't, maybe if someone could explain to me how having a side buttons together to highlight the road and allow me to click and a link to another page. I understand how to work the images hover and such, but multiple transfers on a single image is confusing to me. If someone could answer this, I would be EXTREMELY grateful. Thanks in advance and ask if you need any clarification with my problem to help solve it.

    Genii

    Sorry... He answered myself

  • Newbie need help with string concatenation function.

    I'm totally new to LabView and am trying to work on a project that someone worked in the past.  I came to a string function concatenated on one of the existing provisions and only seen on some entries of the string function has an order of 'rel' and 'g '.  I don't know if it's a common command or what it is.  This is VI is that it requires a user to enter a base dimension (x-axis starting point and end point) and executes the steps in the sample desired within the "point of departure" and "end point".  "a3" is the name of the x-axis.  but I'm not sure of the meaning 'rel' and 'g '.  I posted part of the diagram.  Any help would be appreciated.  Thank you!

    This isn't a question of LabVIEW, but very specific to the device connected to the other end of the serial port. Do you have any documentation for it?

    Basically, the program needs form a consiting of command of a delimiter character, value and end of key word, etc. for example.

    Who wrote this program. It seems too complex and convoluted. Under certain conditions, it seems to send two commands at the same time, and there is no way to determine the order in which they run. Maybe it doesn't matter, but maybe it does. Most likely, what you need is a single structure dealing with a case for each condition and a unique series in the end writing. You can reach the actual program? There are also a lot of duplicate code. What is the purpose of the operations 1 x? Is this a Subvi?

  • Newbie need help with the old graphics card Dell Dimension 2400

    Hi all

    Happy to discover this community and I hope I can get some answers here. Is there ANY video there card that would allow me to see the images that was shot in 1080 p on my old Dell Dimension 2400? Your help is very much appreciated here.

    Thank you.

    Nicolas

    Hi NICOLAS,.

    Motherboard Dell Dimension 2400 does not come with AGP slot or slot PCIex16. You will have to look out for PCI video cards, but most of the cards are low profile cards. You won't get a FHD 1080 p resolution.

  • Newbie need help with clusters of find in my VI

    I have a good question and it crosses my VCenter and returns with Virtual and shared physical SCSI controllers, but I for the life of me can't seem to show me what VM, it belongs to.

    I guess I need a kind of step forward IF statement. Help a noob.

    $Guests = get-VM-Server "mycenter.

    ForEach ($VM to $Guests)

    {

    Get - VM $VM | Get-SCSI controller. where {$_.} BusSharingMode - don't "NoSharing"} | Select BusSharingMode

    }

    He returned with only 'virtual' or 'Physical', but what computer virtual tied :-(

    Can't just select name GEt - VM, as get SCSI controller also has a name field, by EXAMPLE of LSI.

    In the object returned by the cmdlet Get-controller SCSI, the Parent property contains the name of the virtual machine. You can use a property calculated for the Parent property and rename VM and show it to the output of the script.

    $Guests = get-VM-Server "mycenter.

    ForEach ($VM to $Guests)

    {

    Get - VM $VM | Get-SCSI controller. where {$_.} BusSharingMode - don't "NoSharing"} | Select @{Name = "VM"; Expression = {$_.} Parent}}, BusSharingMode

    }

  • Need help with image slideshow quality full-screen

    I'm looking to display pictures with slide show full-screen. The images I add are very large, more than 5000 wide. When I write the site images maintain their quality while others lose it look like shit. Why would this be and how can I solve this problem. I tried to resize the 2560 x 1707 muse done and then add them. This does not change the final result of poor quality.

    Go to the components Panel and locate the image you want to use in the original format. Right-click on the image and chose 'largest import size. "

    See if that helps to maintain the quality of this image, as Muse does not resize/interpolate this image for you.

    See you soon,.

    Vikas

  • Need help with Images associated with berries

    `

    I'm not sure if this is possible, as I am not a common programmer, but I have a question.

    I have a table that generates a random word in a text box, then a second table that generates another word at random in a different text box. What I want is for when a certain word off number one table is generated, a certain image is displayed with it. Here is the code:

    var FirstChoice:Array = ['this', 'Do'];

    var SecondOption:Array = ["during this operation', 'while doing this'];

    generate_btn.addEventListener (MouseEvent.CLICK, getTask);

    function getTask(event:MouseEvent):void {}

    var randomChoice:Number = Math.floor (Math.random () * firstChoice.length);

    var randomTask:Number = Math.floor (Math.random () * secondOption.length);

    First_Thing.text = exerciseChoice [randomChoice];

    Second_Thing.text = homeTask [randomTask];

    }

    For example, when I click the button and the first table generates "Do this", I want a chart specific to appear with him. Similarly, if 'this' generates, I want a different graphic to appear specifically associated with this variable.


    I hope that this is possible :/ I'm puzzled! I asked for help on StackOverflow; However, their advice did not work. Of course, I only got a response, so I hope that people here can help me out!

    var FirstChoice:Array = ['this', 'Do'];

    var SecondOption:Array = ["during this operation', 'while doing this'];

    var imageA:Array = (mc1, mc2);

    var currentImage:MovieClip

    function getTask(event:MouseEvent):void {}

    var randomChoice:Number = Math.floor (Math.random () * firstChoice.length);

    var randomTask:Number = Math.floor (Math.random () * secondOption.length);

    First_Thing.text = exerciseChoice [randomChoice];

    Second_Thing.text = homeTask [randomTask];

    {if (currentImage)}

    currentImage.visible = false;

    }

    currentImage = UIImage [randomChoice];

    currentImage.visible = true;

    }

Maybe you are looking for

  • Beats wireless keep disconnecting from my iPhone

    Update my iPhone to 9.2.1 and when I use my wireless of beats, they keep disconnecting from my iPhone! I've already updated my beats and reset them, but it still happens. Any way difficult?

  • First Vista installation failed: what to do now?

    I bought a Satellite L300-19F Notebook with preinstalled Vista Home Premium. Without the backup DVD, which Toshiba does not provide. I started the computer, still had to make choices to complete the installation and then power went. If the Vista inst

  • Dell Optiplex GX 270 lost driver sound

    Hello I lost the driver for my card of his legacy. Anyone know where I can download the driver without having to buy software such as registry cleaners, Driver Detective, etc.. I was looking for yesterday evening and it is impossible to find a site t

  • How to remove the network profile

    Original title: Double Internet access I have reproduced the internet access points. My network is one, it is not named or protected, and the other is called another network without any protection. Other users in households show only one when they go

  • Download the Plugin Query IR

    I'm trying to use the Plugin to "Get IR Query" of https://apex.oracle.com/pls/apex/f?p=43045:1 and most of the time that it seems to work and returning valid code but I seem to have problems with concatenated columns and regular expressions.If I use