How to exchange one image for another with a click

I am brand new to actionscript, so bear with me! I need to create an interactive web-based system which takes the user through steps to assemble something. One of the pages will have images of the tools needed. I want the user to be able to 'tick' off each tool, so that when they click on the image of a specific tool it is replaced by the image faded out and a big red tick over it. essentially it is replacing one image for another when it is clicked on.
any ideas on the actionscript? Sorry i know this must be basic stuff for you!
thanks!

your tool images should be converted to movieclips and given instance names and you should create a red tick movieclip that you assign a class, say RedTick.  you can then use:
tool1.addEventListener(MouseEvent.CLICK,toolClickF);
function toolClickF(e:MouseEvent):void{
var redtick:RedTick=new RedTick();
addChild(redtick);
redtick.x=e.currentTarget.x;
redtick.y=e.currentTarget.y;
e.currentTarget.alpha=.4;

Similar Messages

  • How to lay one image over another?

    Hi, all:
    I'm trying to draw a square of a given color, and draw a circle of a given thickness and greyscale color. I want to lay the circle over the top of the square. Is that possible given the method below?
        public void draw (SimGraphics g) {
             g.drawBackground(backgroundColor); //background square with given rgb color.
              g.drawOvalBorder(stroke, diskGreyScale); //the overlaid circle with given thickness and greyscale color
        }drawBackground is of course undefined, because I don't exactly know HOW to draw a background for a square like this one. Normally, in my code I'm only calling one draw method. Here, I need to draw two things and put one on top of the other. How would I go about doing that?

    Peter__Lawrey wrote:
    Do you mean like this?
    public void paint(Graphics g) {
    Rectangle bounds = g.getClipBounds();
    g.fillRect(0,0,(int) bounds.getWidth(), (int) bounds.getHeight());
    g.fillOval(0,0,(int) bounds.getWidth(), (int) bounds.getHeight());
    Nope--I need something I can wrap in Graphics2D; the class I'm using (SimGraphics) is a wrapper for Graphics2D. I need (I think--though you can correct me on this) to use the draw methods from Graphics2D. Like this:
    public void makeMyImage (Graphics2D g) {
       g.drawFastRoundRect();
       h.drawOvalBorder();
       Graphics2D myImage = CompositeOrOverlayClassOfSomeFreakingKind(g, h);//g is bottom image; h is top image
    }That looks more like pseudocode, but you get the idea.

  • Exchanging one router for another

     i currently have a working WRT54G2 router and will be swapping it for a e1200 router. Should I disconnect the current router from the modem first before inserting the setup CD for the new router? Thanks for any help on this issue.

    Well, yes if you are using the new E1200 router you have to remove the old Router WRT54G from the network.  For the initial setup, all it requires is a proper physical connectivity between your modem, router and computer.  To setup a new router, it’s always recommended to set the router to factory defaults before you run the CD. Finally run the Cisco connect software that’s bundled with the CD, which handles both your internet setup and wireless setup. For the setup process, you need to perform the following:
           i.    Verify that there is an active Internet connection between the computer and modem
          ii.   Setting up the router using Cisco Connect
    For more information about installing the E1200 router via Cisco Connect. Please refer to the link below.
    http://www6.nohold.net/Cisco2/ukp.aspx?vw=1&docid=e30f926604334d538668529cb50ad174_21463.xml&pid=80&...

  • How to go one jFrame to another JFrame after click on button?

    I am having two frames loginFrame.java and UserinfoFrame.java.
    In loginFrame.java to click on login button i want to goto UserinfoFrame
    (LogInSuccessPanel).
    private void bnLoginActionPerformed(java.awt.event.ActionEvent evt) {                                       
    // TODO add your handling code here:
    int loginCounter=0;
    this.remove(jPanel2);
    LogInSuccessPanel login = new LogInSuccessPanel();
    this.add(login);
    update();
    //if(evt.getSource()=="login")
    // while(loginCounter <= 5)
    if(!login(jTextField1.getText(), new String(jPasswordField1.getPassword()))) {
    loginCounter++;
    System.out.println("UserName : "+jTextField1.getText()) ;
    System.out.println("Password : "+jPasswordField1.getPassword());
    if(loginCounter >= 6) {
    System.out.println("Unable to Login");
    connectToDB();
    if(jTextField1.equals("UserName"))
    //Check Whether username is existing in DB
    private void connectToDB() {
    try{
         Class.forName("com.mysql.jdbc.Driver");
    Connection con= DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","root");
    Statement stmt = con.createStatement();
    ResultSet rset = stmt.executeQuery("SELECT UserName from login table");
    jTextField1.setText("Connected to the Database. Fetching Values from login Tables.\n");
    StringBuffer allRowValues = new StringBuffer();
    int counter=1;
    if (rset.next())
    //allRowValues.append("ROW " + counter + ": Username = " + rset.getString(1) + " & Password = " + rset.getString(2) + "\n");
    //counter++;
    System.out.println(" LOGIN SUCCESSFUL ");
    System.out.println("Username : " + rset.getString("username"));
    System.out.println("Password " + rset.getString("password"));
    System.out.println(" LOGIN SUCCESSFUL ");
    else
    System.out.println(" LOGIN FAILED ");
    // .setText(allRowValues.toString());
    rset.close();
    stmt.close();
    con.close();
    } catch (SQLException ex) {
    System.out.println("Connection Error = " + ex.toString());
    ex.printStackTrace();
    }catch(ClassNotFoundException e){
         System.out.println("Error in loading class" + e);
    private boolean login(String name, String pwd) {
    int count=0;
    if(count<=5)
    count++;
    return true;
    else return false;
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new Login().setVisible(true);
    Thanks and regards

    search results for
    login
    http://onesearch.sun.com/search/onesearch/index.jsp?charset=UTF-8&qt=login&rf=0&rt=1&site=dev&nh=10&cs=0&col=developer-forums&dftab=siteforumid%3Ajava57&chooseCat=javaall&subCat=siteforumid%3Ajava57

  • The float in windows option is grey and not accessable ? How can I copy from one image to another ? Elements 11

    The float all in windows option is grey and not accessible ? How can I copy from one image to another ? Elements 11

    You really are not getting this.
    "I guess I am still completely shocked that as a parent we can't download something for everyone to use."
    Why do you continue to think this although we keep telling you that this is not the case.
    You do NOT have to purchase anything twice.  You can share the music with as many ipods as you like in your household.
    The ipods are designed to sync with your computer regularly.  You should have been syncing these other ipods with your computer all along, thus transferring the purchases to your computer where that music can be synced to as many ipods as you like.
    Take on of the ipods with the music in it.  Open itunes on your computer.  Plug in the ipod.  Do not sync.  Click File>Transfer Purchases  This will transfer the purchases from the ipod to the computer.  Make sure that you have authorized your account on the computer:  here are directions for that. http://support.apple.com/kb/HT1420
    Unplug the ipod.
    Plug in the other ipod with purchased music.  Do not sync.  Click File>Transfer Purchases  This will transfer purchases from the ipod to the computer.
    You can now plug in any of the ipods, select what you want to sync and sync.
    Have a look at the manual for the ipod.  http://manuals.info.apple.com/en_US/iPod_touch_iOS4_User_Guide.pdf

  • How do I copy layers from one image to another?

    I am editing figures for a journal and I need arrows for multiple images.  Is there a standard arrow?  I can only see free hand.  If I use a free hand arrow I then want to copy it to the other images for consistency.  How do I copy or share layers between images?

    There are many arrows in the shape tool, or you can set the line tool to have an arrowhead in the tool options. You can copy/paste layers from one image to another, or drag a layer from the layers panel into the main image window of another image and then use the move tool to position it. You can also drag into the thumbnail in the photo bin, but you'll still need to bring the image up to adjust the positioning.

  • Using the content aware move tool, I want to move an item from one image to another image but it does not seem to work. I think I need two layers on one document so how do I do this

    Using the content aware move tool, I want to move an item from one image to another image but it does not seem to work. I think I need two layers on one document so how do I do this

    Good day!
    A simple Paste does not work for you?
    It should place the clipboard content as a new Layer which you can then move around.
    If there is any chance that the elements need to be scaled, rotated etc. I would prefer to place them as Smart Objects (File > Place …) and do the masking that is specific to the images themselves in those.
    Regards,
    Pfaffenbichler

  • I would like to know how to transfer ebooks from one laptop to another with adobe digital editions both authorized with the same adobe ID.

    I would like to know how to transfer ebooks from one laptop to another with adobe digital editions both authorized with the same adobe ID.

    Stop using the account.
    You need do nothing more.
    You will need to authorize your computer for both accounts as you have purchased from both accounts.

  • How do I swap one clip for another in Final Cut Pro 7?

    How do I sway one clip for another in Final Cut Pro 7? I am doing what it says in a book but it is not working. Thanks.

    You drag the clip from the browser to the clip on the timeline. Wait till the timeline clip goes white. Drop it and pick from the menu that appears the replace option you want.

  • How do i copy music from one ipod to another with 1 cord?

    how do i copy music from one ipod to another with 1 cord?

    You cannot copy content directly from one iPod to another. If the music was purchased from the iTunes Store, you have the following options:
    - sync the iPod to your computer, transfer the content to iTunes, and then connect the other iPod and sync from iTunes
    - use iCloud (which requires iOS 5).
    - download the music from from the iTunes Store to the second iPod. See:
    http://support.apple.com/kb/ht2519
    Regards.
    Message was edited by: varjak paw

  • How do I superimpose one image over another

    How do I super impose one image over another?

    Open image A
    Open image B
    On image B, use one of the selection tools, e.g. selection brush, lasso tool, to select the object which you wish to "superimpose"
    Go to Edit menu>copy to put the object on the clipboard
    Go back to image A
    Go to Edit>paste. The object will be on its own layer
    Get the move tool out of the toolbox, and position the object and resize, if indicated

  • How do I copy one image onto another image?

    How do I copy one image onto another image?

    Lots of ways;  Use the Place command to place a file in another.  Open two files and drag one to the other's window tab, drag an image from bridge onto an open file.  Open an image, press ctrl/cmd-A to select all, the ctrl/com-C to copy the image, the ctrl/cmd-V to paste it into another image.

  • How best to copy keywords from one image to another?

    Hey everyone,
    I can't seem to find a good, obvious way in Bridge CS3 2.1 to copy just the keyword tags from one image to another.
    I realize that one possibility is to create a metadata template for the source image and apply that template to the destination image, but this would be a cumbersome & lame workflow IMHO.
    I also realize that Bridge allows loading and viewing many images simultaneously, and that the same set of keywords can then be applied en masse. I'm sure many users like this workflow, but I'm not one of them. For one thing, this approach is seriously not future-proof. What if the user goes out and takes more photos that fit into those same keyword-categories that were applied to the image group?
    It seems to me that Bridge should allow the user to right-click on the list of applied keywords (at the top of the keywords pane) and see a "copy keywords" command. And then the user should also be able to right-click on an image and see a "paste keywords" command.
    Comments appreciated,
    Thanks,
    Brad

    There are many arrows in the shape tool, or you can set the line tool to have an arrowhead in the tool options. You can copy/paste layers from one image to another, or drag a layer from the layers panel into the main image window of another image and then use the move tool to position it. You can also drag into the thumbnail in the photo bin, but you'll still need to bring the image up to adjust the positioning.

  • How to move the dock from one display to another with multiple monitors?

    Sometimes the dock will switch from one monitor to another just by clicking in the dock area of the second montor. Other times it does not.

    I found out that I have to keep moving downward on my trackpad after the cursor hits the bottom of the screen. It works now.

  • Replacing colour/texture from one image onto another?

    Desperately need some guidance here as this has been driving me nuts....
    I want to use the colour and texture from one photo onto my own design. Now, using the rubber stamp tool I am able only to clone a certain area that moves with the cross hair, but how can I clone a section from one photo and use that as a fill to create another design? In other words, clone a colour from one photo as a colour fill for another design?
    Even using the colour replace tool and selecting source: image I am left with the colour pallette as the destination and cannot use the colour from the image to paint my new image from it.
    Thanks a heap

    If I want to copy a single color from one image to another, here's what I'll do:
    Create a new rectangle in the source image
    With the rectangle selected, use the eyedropper to pick a color from someplace in the source image
    Copy the rectangle and paste it in the destination image
    Select the object I want to color and use the eyedropper tool to select the color from the copied rectangle
    (A layer with rectangles of different colors is sometimes handy for setting up a color scheme and using it consistently.)
    You can also create bitmap patterns to use as fills for vector objects. Fireworks comes with quite a few, but it's easy to add your own. Here are a couple of tutorials
    http://www.entheosweb.com/fireworks/patterns.asp
    http://www.peachpit.com/articles/article.aspx?p=30942&seqNum=4

Maybe you are looking for