How to link an image to a button in Flash Builder 4

I am new to Flash Builder 4 and have trouble to link an image to a button in Flash Builder 4.
For example, I want an image of a round green button to replace the default retangle button in Flash Builder 4.
Can anyone help me up?
Thanks

You could also use the mx:Image control and just add a click event handler:
function(){return A.apply(null,[this].concat($A(arguments)))}
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        width="500" height="400">
    <fx:Script>
        <![CDATA[
            import mx.controls.Alert;
            protected function image1_clickHandler(evt:MouseEvent):void {
                Alert.show("You clicked the image");
        ]]>
    </fx:Script>
    <mx:Image source="http://helpexamples.com/flash/images/image1.jpg"
            click="image1_clickHandler(event);" />
</s:Application>

Similar Messages

  • How do I make a completely Transparent Button in Flash Builder

    Hello, I am building an app and need a completely transparent button, Ive tried making one but nothing would happen when you clicked on it.
    Thanks for the help.

    Try this alpha="0.001"
    Also add useHandCursor="true" and buttonMode="true" if you wish to have the hand cursor appear on hover.
    example  x="10" y="10" width="169" height="54" label="Button" alpha="0.001" useHandCursor="true" buttonMode="true" 
    HTH

  • How to link an image file in code view

    I can't seem to figure out how to link the image file in code view. It has to be in code view because the image is hidden in Design View so I can't do it in HTML view. Here's the coded section:
    <!-- TAB #3 CONTENT -->
                    <div id="tab3" class="tabsGeneral">
                      <div class="tabsFeatureImageContainer asyncImgLoad" title="img/index/tabs/tab3/DonateNow-168x112.jpg"></div>
                      <h3 class="tabsHeader">Partner With Us</h3>
                      <p class="tabsDesc">Get involved with all the exciting things God is doing at Provision House. Partner with us to help others find true and lasting freedom from addiction in Christ. <a href="http://provisionhouse.org/giving.html" class="commonLink">Click here</a></p>
    It's' the red jpeg image file I want to link to another page in the site and I don't have enough experience to do this.
    I am thankful for your help.
    Paul

    Thanks, Gramps. Here's the page I want to like to from the image:
    http://provisionhouse.org/giving.html
    Paul
    Here's the whole section where the problem exists:
    <!-- TABS -->
                <div id="tabsContainer">
                    <div id="tabsWrapper">
                        <!-- TAB #1 CONTENT begin -->                
                        <div id="tab1" class="tabsGeneral">
                         <div class="tabsFeatureImageContainer asyncImgLoad" title="img/index/tabs/tab3/WalkingByTheSpirit-168x112.jpg"></div>
                        <h3 class="tabsHeader">Session 5 of the Breaking the Chains Seminar Completed</h3>
                            <p class="tabsDesc">Visit the <a href="videos.html" class="commonLink">Videos page</a> to watch clips of Session 5, <span class="Italic">Walking by the Spirit</span></a></p>   
                        </div> <!-- tab1 -->
                        <!-- TAB #2 CONTENT begin -->                       
                      <div id="tab2" class="tabsGeneral">
                            <div class="tabsFeatureImageContainer asyncImgLoad" title="img/index/tabs/tab2/FreedomFromAddiction168x112.jpg"></div>
                            <h3 class="tabsHeader">Session 2, Freedom from Addiction</h3>
                            <p class="tabsDesc">Is it possible for the Christian to find true and lasting freedom from addiction? This session explains how all addictions are also sin, and it is sin that Jesus has set us free from. Anticipated release: November, 2011. <span class="commonLink"><a href="curriculum.html">Read about Session 2</a></span>
    <!--HIDDEN SECTION<<div class="tabsThumbsContainer">
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab2/1.jpg">
                                    <img src="img/index/tabs/tab2/thumb1.jpg" alt="" />
                                    <span class="desc displayNone">Dubai</span>
                                </a> 
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab2/2.jpg">
                                    <img src="img/index/tabs/tab2/thumb2.jpg" alt="" />
                                    <span class="desc displayNone">Dubai</span>                           
                                </a>
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab2/3.jpg">
                                    <img src="img/index/tabs/tab2/thumb3.jpg" alt="" />
                                    <span class="desc displayNone">Dubai</span>                               
                                </a> 
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab2/4.jpg">
                                    <img src="img/index/tabs/tab2/thumb4.jpg" alt="" />
                                    <span class="desc displayNone">Dubai</span>
                                </a>
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab2/5.jpg">
                                    <img src="img/index/tabs/tab2/thumb5.jpg" alt="" />
                                    <span class="desc displayNone">Dubai</span>                           
                                </a> 
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab2/6.jpg">
                                    <img src="img/index/tabs/tab2/thumb6.jpg" alt="" />
                                    <span class="desc displayNone">Dubai</span>                           
                                </a>                   
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab2/7.jpg">
                                    <img src="img/index/tabs/tab2/thumb7.jpg" alt="" />
                                    <span class="desc isplayNone">Dubai</span>                           
                                </a> 
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab2/8.jpg">
                                    <img src="img/index/tabs/tab2/thumb8.jpg" alt="" />
                                    <span class="desc displayNone">Dubai</span>                           
                                </a>
                            </div> --> <!-- tabsThumbsContainer -->          
                      </div> <!-- tab2 -->
                        <!-- TAB #3 CONTENT -->                        
                        <div id="tab3" class="tabsGeneral">
                        <div class="tabsFeatureImageContainer asyncImgLoad" title="img/index/tabs/tab3/DonateNow-168x112.jpg"></div>
                            <h3 class="tabsHeader">Partner With Us</h3>
                            <p class="tabsDesc">Get involved with all the exciting things God is doing at Provision House. Partner with us to help others find true and lasting freedom from addiction in Christ. <a href="http://provisionhouse.org/giving.html" class="commonLink">Click here</a></span>
                            <div class="tabsThumbsContainer">
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab3/WalkingByTheSpirit-350x250-no text.jpg">
                                    <img src="img/index/tabs/tab3/WalkingByTheSpirit-26x26-no text2.jpg" alt="" />
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab3/WalkingByTheSpirit-350x250-no text.jpg">
                                    <img src="img/index/tabs/tab3/WalkingByTheSpirit-26x26-no text2.jpg" alt="" />
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab3/WalkingByTheSpirit-350x250-no text.jpg">
                                    <img src="img/index/tabs/tab3/WalkingByTheSpirit-26x26-no text2.jpg" alt="" />
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab3/WalkingByTheSpirit-350x250-no text.jpg">
                                    <img src="img/index/tabs/tab3/WalkingByTheSpirit-26x26-no text2.jpg" alt="" />
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab3/WalkingByTheSpirit-350x250-no text.jpg"><img src="img/index/tabs/tab3/WalkingByTheSpirit-26x26-no text2.jpg" alt="" />
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab3/WalkingByTheSpirit-350x250-no text.jpg">
                                    <img src="img/index/tabs/tab3/WalkingByTheSpirit-26x26-no text2.jpg" alt="" />
                                    </span>                           
                                </a>                   
                            </div>
    <!-- tabsThumbsContainer -->         
                        </div> <!-- tab3 -->
                    </div> <!-- tabsWrapper -->
                    <!-- TABS BUTTONS -->
                    <div id="tabsBtnBar">               
                        <div class="tabsBtn">latest news<span class="tabsSource">#tab1</span><span class="tabsSource">#tab1</span>                
                    </div>
                        <div class="tabsBtn">Current Project
                            <span class="tabsSource">#tab2</span>
                        </div>
                        <div class="tabsBtn">how to help
                            <span class="tabsDefaultTab"></span>
                            <span class="tabsSource">#tab3</span>
                        </div>                   
                    </div> <!-- tabsBtnBar -->
                </div> <!-- tabsContainer -->

  • How to display an image as a button

    how to make an image like a button ; when we press the image it performs a command

    Or you could use a form with an ImageItem with a button appearance:
    Image myImage = ...
    ImageItem("MyButton", myImage, Item.LAYOUT_CENTER, Item.BUTTON);and then add an ItemCommand to the ImageItem.
    jc

  • How to change an image only when button is pressed

    is there an easy way to make the image in a uiimageview change to a different image while a button is being pressed? then, once the user stops pressing the button, the image view needs to return to the first image.
    thanks in advance!

    Hey , U can handle that with Touches ,
    But in a simply way
    Use Touchupinside to show the pressed image ,
    and use Touchupouside to show the normal image.
    This may give you the same  impression.
    Thanks
    Srikanth

  • How to open a pdf from a button in Flash

    Good Afternoon All,
    I am working in CS4.
    AS 3.
    I am putting together a self-contained Flash presentation. The presentation and all linked images/files will be contained on a flash stick.
    I need to know how to link to a pdf that will be on the flash stick and have it open directly in reader when clicked. I've tried the following AS:
    on (release) {
      getURL("myDoc.pdf", "_blank")
    and it does work, but opens the pdf in a browser window version of reader as opposed to just reader...if that makes sense.
    Any and all help is appreciated.
    THanks.
    Geno.

    Hello,
    <p>Web.show_document calling .htm files saved on disk.....</p>
    Francois

  • URGENT! How do I create a vertical scroll button in Flash CS6 for online banners?

    Hi, I am creating Flash online banners and the disclaimer needs to open as a vertical scroll banner once the mouse touches the 'x close' button where the words 'Disclaimer' is stated.
    How do I create a vertical scroll button including text?
    I am using Flash CS6.

    Hi Babaa,
    sry for the lateness of my reply.
    I would simply make a button that when clicked, displays a layer containing your disclaimer text. The discliamer text would be inside a Movie Clip (MC) for ease of controlling.
    the MC then contains a text field which has a scrollable field. as the user scrolls through you can then display a "close" button to close out the disclaimer MC.
    If you still need the work done feel free to email or PM me here and we can discuss the job further.
    Regards
    Russ

  • Linking a URL to a button in Flash

    I am building a website and the top navigation is in Flash. Each button links to a HTML page. My problem is that when each button is clicked it jumps to the wrong page and I can't figure out why as the URL links are correct. The buttons are movieclips if that makes any difference...
    Here is a sample of the code I'm using for my buttons:
    onClipEvent (mouseUp){
        getURL("index.php","_self","GET");
    I have also tried using:
    onClipEvent (mouseDown){
         getURL("index.php","_self");
    ... But it doesn't work either. Any help would be fantastic as I'm starting to pull my hair out with this thing!

    I have also tried:
    onClipEvent (enterFrame){
        this.mouseDown = function() {
            getURL("index.php","_self");
    With no success...

  • NO image on iconic button in Forms Builder

    Hello,
    I'm using Oracle Forms [32 Bit] Version 9.0.4.0.19.
    When I open any .fmb file I dont see any image on iconic buttons.
    All my .gif files are in .jar
    Is there any way to fix that?

    The Builder cannot read jar files. Also, only gif, jpg, and ico files are supported for the 9.0.4 and newer Builder. In order to have the Builder find them, you need to set the following environment variables (usually in the Registry):
    UI_ICON=<some path to the images>
    UI_ICON_EXTENSION=<the file format extension - like gif>
    Note that this only applies to seeing the images in the Builder Layout Editor and has nothing to do with a running form.
    Ref.
    Note 251767.1

  • How can I overlay AIR 3.5 SDK in Flash Builder 4.7?

    I'm trying to overlay the new Air 3.5 sdk in Flash Builder 4.7 but the option to use specifed sdk is unavailable in the project preferences. What is the solution here?

    Hi,
    Can you please let me know whether you have overlaid it on Win/Mac?
    When you have created the mobile project what does app.xml show? for example if you have 3.5 overlaid you should be able to see something like this in app.xml
    <application xmlns="http://ns.adobe.com/air/application/3.5">
    For overlaying AIR 3.5 SDK on Flex SDK 4.6 locally following the instructions mentioned in the below url and then create a Flex Mobile project using that SDK.
    Overlay help document link : http://helpx.adobe.com/x-productkb/multi/how-overlay-air-sdk-flex-sdk.html
    Let me know if you need more information.
    Thanks,
    Hari

  • How to display rich content with URL in adobe flash builder and flex for mobile apps?

    Hi,
      In Apple IOS SDK, I used the WebView control to display the rich text with Bullets, different font style, images within the text and the URLs also within the text as HTML content.
    Clicking on the URLs automatically opens the respective webpage in Safari.
    In Adobe Flash Builder, I don't see any control straight away equivalent to Apple WebView control.
    How to implement the same using adobe and flex?

    Thanks for your reply, its nice to know its not just me.
    the error i got when submitting to the App store where due to native support for IPHONE 5 which is now mandatory (from May 1st), looking around the internet the common soloution seemed to be upgrading to Air 3.7.
    The strange erorrs on 3.7 revolve around compiling a standard / production build (fast build works fine)
    the error is always the same (snippet shown below):
    Error occurred while packaging the application:
    Undefined symbols for architecture armv7:
      "__ZN7avmplus8Debugger9debugLineEi", referenced from:
          __ZN7avmplus9MethodEnv9debugExitEPNS_13CallStackNodeE in AOTBuildOutput-4.o
          __ZN7avmplus11BaseExecMgr22debugEnterExitWrapperNEPNS_9MethodEnvEiPj in AOTBuildOutput-4.o
    I have completly failed to work out why, but my gut feeling is its something to do with how the mac is compiling the code in standard build and unable to find a library it needs.
    cheers
    Toby

  • How to make colors look same in illustrator and Flash Builder

    We had a designer build out our UI using Adobe illustrator, and then tried to replicate the same hex color and alpha codes in Flash Builder- colors are looking very different on the same machine
    We have used basic web colors but the problem persists. Any pointers on why this could happen?

    Thanks Joan... we managed to figure out the cause to a large extent- problem
    arisen by the way the layers were built in Illustrator vs Flashbuilder. I
    still have the following questions, that we are currently handling via a
    workaround
    a) when I try to skin the container using SkinnableContainer, the skin
    doesn't take effect- but works, when I use same skin with a BorderContainer.
    Any idea of why this is so?
    The code used is as below
    <s:BorderContainer id="Banner" height="15%" width="100%"
    skinClass="mySkins.newskin1">
    <mx:Image id ="logo" source="assets/graphics/logo.png"
    x="{0.018Banner.width}" y ="{.09Banner.height}"
    height="{Banner.height*0.7}" maintainAspectRatio="true"
    width="{Banner.width*0.085}"/>
    <s:Label x="{0.065Banner.width }" y ="{.293Banner.height}"
    fontFamily="Copperplate" fontSize="34" kerning="on" color="#666666"
    text="EUREKA WORLD"/>
    <s:Label x="{.88Banner.width}" y ="{.293Banner.height}" fontFamily="Arial"
    fontSize="14" kerning="on" color="#666666" text="Help | Log Out"/>
    <s:Label x="{.865Banner.width}" y ="{.45Banner.height}" fontFamily="Arial
    Bold" fontSize="18" kerning="on" color="#666666" text="Welcome Gauri"/>
    </s:BorderContainer>
    Skin attached
    b) we are trying to replicate the design from Illustrator(exported in fxg
    format) and replicate in FlashBuilder. We would like to name the objects
    meaningfully so we can connect the front-end with names in the fxg code.
    Currently we see an objID. How do we name objects in Illustrator?
    c) When we use a mx:vbox within a repeater to display contents of an array,
    we had trouble skinning this for background color- compromise we reached was
    to have the background color in the mx:vbox with a skinclass for the border
    and shadow
    Regards

  • How to update the PHP Class Service back in Flash Builder 4

    I'm not sure if my post title makes any sense or not but let me explain.  I've been working on an application in Flash Builder 4 using the ZendFramework and PHP services and everything is work great. the problem I have is after I make changes to my services PHP class (edit php file that has my functions in it), how to I updated those functions in the Flash builder application?
    For example, I needed to pass a second object into one of my function in my PHP class and after I edited the file and saved it, I don't see the changes in the Flash builder 4 application. Is there a button I can run to update the PHP class back in Flash Builder?
    Thanks,
    John Baranowski

    How do you use Flash Builder to regenerate the code for the same PHP service I connected to prior? When I first connected to the PHP service Flash Builder automatically built a package with all kinds of actionscript functions in it. I added a function to my PHP Class file server side and I need help on how to update the package back in Flex to see my new function. Can anyone help me??
    -John

  • How to renew your self-signed certificate p12 with Flash Builder

    I have been using a self-signed certificate (generated using Adobe Flash Builder 4.7) for my Android app. The app is live on Google Play market but the certificate is going to expire soon, and I know if I create new certificate and update my app, existing Android users will not be able to auto-update the app (as the App's Signature has been changed). I would like to know how can we re-new the self-signed Certificate .p12 with Flash Builder?
    Thank you very much.

    After doing my research about the self-signed certificate created by Adobe Flash Builder , I realized that was my mistake to think that the certificate would expire soon. I doubled check the expiration date of my self-signed certificate and the date was set to 35 years after I generated it using flash builder 4.7 (which is very safe).
    For anyone who wants to check the self-signed .p12 expiration date you follow the instruction from this link:
    http://bsdsupport.org/how-do-i-determine-the-expiration-date-of-a-p12-certificate/
    Hope it helps

  • How to use Flex SDK 4.0.0 in Flash Builder Burrito?

    Hello!
    How can I create a project with Flash Builder Burrito that builds against the Flex 4.0 SDK? I tried to copy the 4.0.0 sdk folder over from my Flash Builder 4 installation, but if I create a new project in burrito, it still offers me only choice between 3.5 and 4.5
    what else do I have to do?

    Did you configure it in Window / Preferences / Flash Builder / Installed SDKs?

Maybe you are looking for

  • Play multiple .SWF in sequence

    I have two swf files that I would like to play in sequence in a main  flash file.  The two swf files are partA.swf and partB.swf. I set up two  frames using this actionscript 3 snippet: Frame 1: Code: var partARequest:URLRequest = new URLRequest("par

  • Dialog hidden automatically when browser is in full screen mode

    Hello all, I have an applet which shows a modal dialog automatically. It works fine when the applet is shown in the IE browser in normal mode. The window disappears automatically within few seconds when the browser is in Full Screen Mode. Does any on

  • Precise working in Illustrator

    When resizing an object to, for example 20 mm, ilustrator automatically changes the size to 19,756 mm. Why is this happening? And is their a way to turn this off? The same thing happens, when moving an object, it just snaps a bit off. I checked if I

  • Pie chart wedge itemRollOver

    I need help with creating a custom pie chart class that will allow a function call on pie wedge rollOver. Right now I can get a function call on rollover using itemRollOver using; import mx.charts.events.ChartItemEvent; -in the <mx:PieChart>; itemRol

  • How to implement this scenario:

    Suppose there are 6 men and 4 women in the class, then if all the source files are read successfully then the target directory for men should have 6 files and the target directory for women should have 4 files.