Help with images and buttons

I was wondering if anyone could recommend a tutorial or point me in the right direction. I've been trying to figure out how to use buttons to add images (been using png from photoshop with alphachannel) to a canvas. I don't have any problems skinning the buttons nor putting in a single image, nor text. As far as getting the images to layer when the buttons are clicked then I'm pretty lost. Not sure if an array is best or if adding and removing them as children in another container would be any easier..

I've been using flash builder beta 2. I was planning on embedding the images. I'm not sure if the help files and examples I am reading are not compatible or if I just have the syntax wrong. I haven't been able to find any examples that use embedded images and toggle visibility. I've used spark components. In design mode it puts the code in for a button when drag-dropped, then recommends using spark component instead. It seems that the only time that the images really do anything is when there's a spark component.
I've never used flex before would it be easier to use wordpad and try compiling it with something other than flash builder?

Similar Messages

  • Help with booleans and Buttons

    Hi,
    while ( repeat ) {
        tempValue = compMove.getRandomNumber();
        if ( nought.getUsedSquare(tempValue) ) {
            repeat = true;
        else if ( crosses.getUsedSquare(tempValue) ) {
            repeat = true;
        else {
            playButton[tempValue].setLabel("O");
            playButton[tempValue].setEnabled(false);
            nought.setSquareUsed(tempValue);
            repeat = false;
    }getUsedSquare(tempValue) - Should return true if button is used
    This code gets a random number in the range 0 to 8, and then uses this random number to check if a button has already been clicked and had its label changed using the getSquareUsed method. If the button has not been clicked then the label should be changed. Basically it is a Tic-Tac-Toe game.
    The problem is that sometimes the code will change the label on a button that has already been clicked.
    Why is this?
    Thanks for any help you can give.

    Alright:
    if ( event.getSource() == playButton[0] ) {
        playButton[0].setLabel("X");
        crosses.setSquareUsed(0);
        if ( crosses.checkForWin() )
            System.out.println("Crosses Win!");
        while ( repeat ) {
            tempValue = compMove.getRandomNumber();
            if ( nought.getUsedSquare(tempValue) )
                repeat = true;
            else if ( crosses.getUsedSquare(tempValue) )
                repeat = true;
            else {
                playButton[tempValue].setLabel("O");
                playButton[tempValue].setEnabled(false);
                nought.setSquareUsed(tempValue);
                repeat = false;
        repeat = true;
        if ( nought.checkForWin() )
            System.out.println("Noughts Win!");
        playButton[0].setEnabled(false);
    }That is the code i have for when the human player clicks on a button, the computer will make a random move, nothing intelligent about it (bit like me).
    I changed my coding for the getSquareUsed method to:
    public boolean getUsedSquare( int a ) {
       return squareUsed[a];
    }I know that the button is set as being used in the setSquareUsed method, but still the computer player will overwrite an already used square.
    Any ideas from this, or should i start again with something different?

  • Need help with Flash CS4 buttons/can't get buttons to control anything

    Hello,
    I need help with Flash CS4. I am making a banner with an animation (Image change into movie clip "3D Spiral") and added buttons but I cannot get the buttons to control the animation. Please help I am frustrated! If someone could help I would be most appreciated.

    Thank you.
    Regards,
    Michael J. Sheehan  allelois
    Date: Mon, 17 Aug 2009 18:48:09 -0600
    From: [email protected]
    To: [email protected]
    Subject: Need help with Flash CS4 buttons/can't get buttons to control anything
    Hi there
    I'm not sure how you wound up where you did. But you wound up in the Adobe Captivate forums. Please stand by as I move your thread to the Flash forums.
    Cheers... Rick
    >

  • Online banking site now shows login page as text-only; on different computer it still shows page with images and clickables -- is there a fix?

    Previously when I logged in to my INGdirect online bank account, the login window came up showing images and clickable hotspots. Recently, the login window changed to a text-only version. On two different computers running Firefox, the login comes up in the previous version, with images and clickable hotspots. I'm unaware of having done anything to change my settings either in Firefox or on the banking website. Because it seems to be localized on this computer, I've tried downloading latest version of Firefox, but got no change, login still comes up in text-only format.

    Try clearing your browser cache.
    Tools > Clear Recent History... - hit Details and make sure only Cache is selected, then select Everything and hit the Clear Now button.

  • HTML content with images and links blocked

    Hello,
    I very much need some help here because my company needs to send out newsletters to our clients in HTML format soon and so far the email with HTML content is being blocked as spam while text content works fine. Specifically, whenever I add a link or an image in HTML content, the email doesn't go through. I tried sending in multipart format but it is also not sending HTML with images and links. Here is my attempt:
                                    props.setProperty("mail.transport.protocol", "smtp");
                                     props.setProperty("mail.host", "mail.server.com");
                                     props.setProperty("mail.user", "joeuser");
                                     Session mailSession = Session.getDefaultInstance(props, null);
                                     mailSession.setDebug(true);
                                     Transport transport = mailSession.getTransport();
                                     MimeMultipart mp = new MimeMultipart("alternative");
                                     MimeBodyPart htmlPart = new MimeBodyPart();
                                     MimeBodyPart textPart = new MimeBodyPart();
                                     textPart.setText("Just to make it multipart");
                                     htmlPart.setHeader("MIME-Version", "1.0");
                                     htmlPart.setHeader("Content-Type", htmlPart.getContentType());
                                     htmlPart.setContent(strHtmlMessage, "text/html");
                                     mp.addBodyPart(textPart);
                                     mp.addBodyPart(htmlPart);
                                     MimeMessage message = new MimeMessage(mailSession);
                                     message.setHeader("MIME-Version", "1.0");
                                     message.setHeader("Content-Type", mp.getContentType());
                                     message.setHeader("X-Mailer", "Recommend-It Mailer V2.03c02");
                                     message.setContent(mp);
                                     message.setSubject(strSubject);
                                     message.setFrom(new InternetAddress("[email protected]"));
                                     message.addRecipient(Message.RecipientType.TO,
                                             new InternetAddress("[email protected]"));
                                             transport.connect();
                                             transport.sendMessage(message,
                                             message.getRecipients(Message.RecipientType.TO));
                                     transport.close();This code is one of my numerous attempts to make HTML send images and links. Please, let me know if there is a workaround way to make JavaMail send HTML with links and images in the message body. Your help will be greatly appreciated.

    The JavaMail FAQ has information on creating HTML messages, including
    messages with both plain text and HTML. Did you find it?
    BTW, your code has many unnecessary statements, such as setting
    the Mime-Version header, which JavaMail will do for you, and setting
    the Content-Type header, which JavaMail does as a side-effect of the
    setContent or setText calls.
    Other than that, it looks like your code should be correctly creating a
    multipart/alternative message. If the recipient is still rejecting it you
    need to figure out what it is about the message that makes the recipient
    think it's spam. Can you send a similar message using another mailer?
    Can you send the message to a different recipient?

  • Help with image ready on ps3 extended

    I am pretty new to photo shop and have cs3 extended.
    I have a Yorkie website where I cut out my Yorkies and paste them to differnet backgrounds.... a lady that does the ANIMATED pictures  HAS DID A COUPLE FOR ME ....BUT I NEED TO LEARN TO DO THIS MYSELF.  She will not tell folks how to do:)
    The problem is once you work with a pic that is animated already then try to  add a dog.....by pasting....it removes the animation in the background pic.... and the picture no longer moves once the dog is added ?....She said she puts thru IMAGE READY...which I do not see anywhere on CS3 extended.  I will try to insert a pic she did for me and any help would be greatly appreciated....as I can do but then the picture is no longer animated once altered in my photoshop but she is doing somehow.....so has to be poss ?  If I were to do this pic it would stop moving once the dogs were added....plus not as good as her but practicing........could it be the fact she is doing in layers and I am doing copy and paste...I do know she puts thru Image ready and I do not know where this is located on cs3 extended or how to do?
    am

    well...........l when I try to open Gif with the import and chose the video frames to layers...am getting a message saying I need Quicktime 7.1 to be able to do??? and when selecting import that is the only option I have to open my animated picture?...YOU HAVE BEEN SO MUCH HELP!   THANK YOU SO MUCH...! 
       BLUE MONDAY EXCLUSIVES   
    Date: Sat, 17 Apr 2010 20:23:27 -0600
    From: [email protected]
    To: [email protected]
    Subject: Re: Help with image ready on ps3 extended
    I'm not sure anyone mentioned this but if not to open GIFs using the import you have to enter the GIF name as GIF isn't listed as one of the options.
    It sounds like you are viewing the images in a maximized screen mode. To view more than one document, press F to cycle through the screen modes. FYI, only the contents of the currently selected document can be viewed in the layers palette.
    I'll just talk about copy/paste so as not to confuse...
    If you are going to copy/paste, click the frame around the dog document to target it. Your layers palette will now contain the contents of the dog document. Click on the layer in the layers palette with the selected dog over transparency. With that layer highlighted in your layers palette, press Ctrl A; then Ctrl C. (Select<Select All; Edit<copy if you prefer using the menu.) This will copy that layer into your clipboard.
    Next, click the frame of the document containing the animation. Click the topmost layer in the layers palette because we want you dog to be in the top layer. Press Ctrl + V. (Edit<Paste if you prefer using the menu).
    Your dog is most likely going to be too big. Use Edit<Free Transform to size and move the dog to the desired location.
    At this point, your dog should be showing in each frame in the animation palette.
    Example:
    http://forums.adobe.com/servlet/JiveServlet/downloadImage/25315/with-palettes-open.jpg
    I'm using the older Image Ready me method. The highlighted place in the palette is where you switch methods between the old method and the new timeline. Notice, I have the layers and animation palette both in the workspace...and I'm not in a maximized mode. The red arrow shows the correlation between the frame and the layer represented by it in the layers palette.
    Image:second-image.jpg
    Here I have a second image to slip into my animation. I have the creature selected and on it's own layer with transparency around it. Notice that the the layer with the isolated creature is highlighted. At this stage, I'll press Ctrl + A; then Ctrl + C to select and save this image to my clipboard.
    Image:creature-added.jpg
    Here, I've pasted (Ctrl + V or Edit<Paste) in my creature and resized it (Ctrl + T or Edit<free transform) so he can be jumped. I also added a shadow under my creature which I added to a layer under my creature. Notice that when Frame on is selected in the animation palette that the eye is on both the creature and the shadow. If I click the eye to turn them (creature and shadow layer) off, they disappear from the entire animation. I can make them appear at any frame by clicking the desired frame in the animation then turning on the eye icon for the creature and shadow layer in the layers palette. I can also adjust opacity if desired.
    You could even more than the one image if you want the dog to appear to move. Use the eyeball visibility to determine which pose will be used for that frame.
    Example:
    Image:jump-creature-gif.gif
    Here, I used transform warp to adjust the pose of the creature for a few frames as he's jumping the creature...just for fun.
    >

  • Working with XML and Button

    Hi,
    How are all of you. Well I am new to Flex. But I have started
    building simple applications. One of the top most problem I am
    facing is working with XML and Button. Can you please assist me in
    this. I am explaining my problem:
    I have an external XML file like this:
    <Menu>
    <button>
    <idnt>0</idnt>
    <label>General Health</label>
    <text>General Health pages is currently under
    construction</text>
    </button>
    <button>
    <idnt>1</idnt>
    <label>Mental Health</label>
    <text>Mental Health pages is currently under
    construction</text>
    </button>
    </Menu>
    Now I want to generate Buttons Dynamically from this XML. And
    the second thing which is the most problematic is that how I code
    it so that when I press the Button labled "General Health", it will
    show the same text as in the XML tag coresponding to tag
    "<label>General Health</label>" ?
    I badly need this. I am realy confused on this. Kindly help
    me.
    Regards
    ..::DeX

    Let's assume that variable "node" contains one element of the
    XML. For example,
    <button>
    <idnt>0</idnt>
    <label>General Health</label>
    <text>General Health pages is currently under
    construction</text>
    </button>
    such that node.label would be "General Health", node.idnt
    would be 0, etc.
    You can build a Button like this:
    var b:Button = new Button();
    b.label = node.label;
    b.data = node; // more on this later
    b.width = 60;
    b.height = 26;
    addChild(b); // critical - adds the button to the display
    list so you can see it
    b.addEventHandler( MouseEvent.CLICK, handleClick );
    You must set the button's width and height unless the button
    will be in a container that will size its own children (like Tile).
    Every Flex component has a data property. You can set it to
    whatever you like. For your needs it makes sense to set each
    Button's data property to the node it relates to.
    Now suppose that code above is in a function, createButton:
    private function createButton( node:XML ) : void {
    // code from above
    Here's how to make all the buttons where "menu" is a variable
    that contains your XML:
    for(var k:int=0; k < menu.button; k++) { // menu.button is
    an XMLList
    createButton( menu.button[k] );
    Now to handle the event:
    private function handleEvent( event:MouseEvent ) : void
    var b:Button = event.currentTarget as Button;
    trace( b.data.text);
    When a button is picked, the description element will print
    in the debug console. Replace the trace with whatever code you
    need.

  • I have created two related books in Lightroom 5 (Volumes 1 and 2) but my balance of page numbers is off. So I'd like to take some pages out of one book (complete with images) and paste them into the other. Is this possible?

    I have created two related Blurb books in Lightroom 5 (Volumes 1 and 2) but my balance of page numbers is off. So I'd like to take some pages out of one book (complete with images) and paste them into the other. Is this possible?

    Can you zip up a few of your GoPro images, upload them to dropbox.com and post a share link, here, so others can experiment with them, or do you mean this issue is global to all camera models?

  • Help with writing and retrieving data from a table field with type "LCHR"

    Hi Experts,
    I need help with writing and reading data from a database table field which has a type of "LCHR". I have given an example of the original code but don't know what to change it to in order to fix it and still read in the original data that's stored in the LCHR field.
    Basically we have two Function modules, one that saves list data to a database table and one that reads in this data. Both Function modules have an identicle table which has an array of fields from type INT4, CHAR, and type P. The INT4 field is the first one.
    Incidentally this worked in the 4.7 non-unicode system but is now dumping in the new ECC6 Unicode system.
    Thanks in advance,
    C
    SAVING THE LIST DATA TO DB
    DATA: L_WA(800).
    LOOP AT T_TAB into L_WA.
    ZDBTAB-DATALEN = STRLEN( L_WA ).
    MOVE: L_WA to ZDBTAB-RAWDATA.
    ZDBTAB-LINENUM = SY-TABIX.
    INSERT ZDBTAB.
    READING THE DATA FROM DB
    DATA: BEGIN OF T_DATA,
                 SEQNR type ZDBTAB-LINENUM,
                 DATA type ZDBTAB-RAWDATA,
               END OF T_TAB.
    Select the data.
    SELECT linenum rawdata from ZDBTAB into table T_DATA
         WHERE repid = w_repname
         AND rundate = w_rundate
         ORDER BY linenum.
    Populate calling Internal Table.
    LOOP AT T-DATA.
    APPEND T_DATA to T_TAB.
    ENDLOOP.

    Hi Anuj,
    The unicode flag is active.
    When I run our report and then to try and save the list data a dump is happening at the following point
    LOOP AT T_TAB into L_WA.
    As I say, T_TAB consists of different fields and field types whereas L_WA is CHAR 800. The dump mentions UC_OBJECTS_NOT_CONVERTIBLE
    When I try to load a saved list the dump is happening at the following point
    APPEND T_DATA-RAWDATA to T_TAB.
    T_DATA-RAWDATA is type LCHR and T_TAB consists of different fields and field types.
    In both examples the dumps mention UC_OBJECTS_NOT_CONVERTIBLE
    Regards
    C

  • Create Window with Textbox and Button For getting Input Value

    Hi All,
    I have create plugin application but i want to take input from user. Therefore i want to create window with textbox and button.
    please may i get solution...

    Or if that's all you need to do, just use JavaScript or a form.

  • How do i send an html file exported from muse as email blast with images and live links?

    My question it:
    How do i send an html file exported from muse as email blast with images and live links?
    I have designed a "website" in adobe muse and exported it as an html file. I am not sure how to send my .html file in an email!
    Best,
    Nicole

    Unfortunately, the answer is, you don't. The requirements for HTML displayed in an e-mail reader are very different than those for HTML displayed in a browser. The output of Muse won't work as an HTML e-mail. You could upload the Muse site as a website and provide a link to it in an e-mail, but the HTML generated by Muse is not suitable for direct display by an e-mail program.

  • Is it possible to tell me how i can make program in labview that take pixels of black and withe image and give coordinate of black or white pixels back to me.

    hello everybody
    is it possible to tell me how i can make program in labview that take pixels of black and withe image and give coordinate of black or white pixels back to me.
    Solved!
    Go to Solution.

    Here's a slightly simpler version.
    (Depending how you want to process the output, you might not need to traspose and/or reverse. Boolean to 0,1 works directly on the 2D array if needed )
    amkamyab wrote:
    it is good. i could enter 1bit image in and show it in array. now i want to take pixels coordinates. i meen i want to have (x,y) of each pixel to send it pixel coordinate to another program i wrote for steppers motor.
    Can you be a bit more specific on how the output is supposed to look like? Initially you wrote "black or white", and since all pixels are either black or white, do you want to send all pixels? In what format? In what order? Please clarify?
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    BW-Pix.png ‏8 KB

  • Help with count and sum query

    Hi I am using oracle 10g. Trying to aggregate duplicate count records. I have so far:
    SELECT 'ST' LEDGER,
    CASE
    WHEN c.Category = 'E' THEN 'Headcount Exempt'
    ELSE 'Headcount Non-Exempt'
    END
    ACCOUNTS,
    CASE WHEN a.COMPANY = 'ZEE' THEN 'OH' ELSE 'NA' END MARKET,
    'MARCH_12' AS PERIOD,
    COUNT (a.empl_id) head_count
    FROM essbase.employee_pubinfo a
    LEFT OUTER JOIN MMS_DIST_COPY b
    ON a.cost_ctr = TRIM (b.bu)
    INNER JOIN MMS_GL_PAY_GROUPS c
    ON a.pay_group = c.group_code
    WHERE a.employee_status IN ('A', 'L', 'P', 'S')
    AND FISCAL_YEAR = '2012'
    AND FISCAL_MONTH = 'MARCH'
    GROUP BY a.company,
    b.district,
    a.cost_ctr,
    c.category,
    a.fiscal_month,
    a.fiscal_year;
    which gives me same rows with different head_counts. I am trying to combine the same rows as a total (one record). Do I use a subquery?

    Hi,
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    user610131 wrote:
    ... which gives me same rows with different head_counts.If they have different head_counts, then the rows are not the same.
    I am trying to combine the same rows as a total (one record). Do I use a subquery?Maybe. It's more likely that you need a different GROUP BY clause, since the GROUP BY clause determines how many rows of output there will be. I'll be able to say more after you post the sample data, results, and explanation.
    You may want both a sub-query and a different GROUP BY clause. For example:
    WITH    got_group_by_columns     AS
         SELECT  a.empl_id
         ,     CASE
                        WHEN  c.category = 'E'
                  THEN  'Headcount Exempt'
                        ELSE  'Headcount Non-Exempt'
                END          AS accounts
         ,       CASE
                        WHEN a.company = 'ZEE'
                        THEN 'OH'
                        ELSE 'NA'
                END          AS market
         FROM              essbase.employee_pubinfo a
         LEFT OUTER JOIN  mms_dist_copy             b  ON   a.cost_ctr     = TRIM (b.bu)
         INNER JOIN       mms_gl_pay_groups        c  ON   a.pay_group      = c.group_code
         WHERE     a.employee_status     IN ('A', 'L', 'P', 'S')
         AND        fiscal_year           = '2012'
         AND        fiscal_month          = 'MARCH'
    SELECT    'ST'               AS ledger
    ,       accounts
    ,       market
    ,       'MARCH_12'          AS period
    ,       COUNT (empl_id)       AS head_count
    FROM       got_group_by_columns
    GROUP BY  accounts
    ,            market
    ;But that's just a wild guess.
    You said you wanted "Help with count and sum". I see the COUNT, but what do you want with SUM? No doubt this will be clearer after you post the sample data and results.
    Edited by: Frank Kulash on Apr 4, 2012 5:31 PM

  • CSS Rollover Menu with Images and Current Page Indicator

    Hello.
    I have found a very interesting video here: http://www.youtube.com/watch?v=vv8cRYGCvIY about creating a CSS Rollover Menu with Images and Current Page Indicator (I tested it and it is working fine).
    I have a web site with 15 pages based on a template and I want to use that video sample to do the same thing on my web site.
    Please tell me if I can use the sample from the link above to do that.
    What should I change in the css file (what new class should I make) to make this work on a web site based on a template  ?
    Thank You !

    I don't know about that video tutorial but a sitewide persistent menu indicator ('you are here' highlighting) is very simple to do with CSS classes.
    Details and code examples below:
    http://alt-web.com/Articles/Persistent-Page-Indicator.shtml
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • MOVED: [Athlon64] Need Help with X64 and Promise 20378

    This topic has been moved to Operating Systems.
    [Athlon64] Need Help with X64 and Promise 20378

    I'm moving this the the Administration Forum.  It seems more apporpiate there.

Maybe you are looking for

  • How do I change my password on the outgoing mail server?

    Getting a "Cannot Send Mail.  The user name or password for "SMTP:[email protected]@smtp.aol.com" is incorrect" and I can not send any mail messages.  The Outgoing mail server data is greyed out so I can not make changes.  What do I do?

  • How do I pin my bookmarks to the left side of the screen

    When I used Firefox in Windows XP, I had my bookmark toolbar pinned to the left hand side of the screen. I upgraded to Windows 7 and installed the latest version of Firefox, and now I can't figure out how to get the same configuration.

  • Depreciation in Local Currency 2

    Experts, We had missing exchange rates which we added into OB08. However, there were depreciation runs posted prior to adding these missing exchange rates and therefore the depreciation runs were posting depreciation amounts in local currency 2 using

  • Future of Oracle DBA

    Hello Experts I am seeking for your guidance regarding to future of the Oracle DBA(Core). I have following questions: 1. What areas in Oracle we need to strong(e.g RAC, dataguard,...etc.) 2. How much OS level skills are required (e.g. basic, middle,

  • Silverlight Help! Please I beg of you!

    I just bought a brand new mac book pro yesterday, I am currently running os x 10.8.3 and when I go to download silverlight it will not install because it is from an unidentified source :[ this is killing me because it is not allowing me to watch netf