Is possible to add a image in  a button?

I know it can assign a icon for <mx:Button ...>
my button is created programly:
var but:Button = new Button();
but.width=20;
but.addEventListener("click",indent);
myRTE.toolbar.addChild(but);
I want to assign a image on this button. Who has idea how to
do it?

try this:
[code]
<mx:Button styleName="myButton" label=""/>
<mx:Style>
.myButton
upSkin: Embed(source="../forum.gif");
overSkin: Embed(source="../forum.gif");
downSkin: Embed(source="../forum.gif");
disabledSkin: Embed(source="../forum.gif");
[/code]

Similar Messages

  • Is it possible to add texture (image fill) to a line drawn with graphics.lineTo()?

    I am trying to draw a  line from x1, y1 to x2,y2 and i want it to be a line that repeats a pattern from an image. All I can see is that you can only draw lines and change their color or thickness but I would like it to repeat an image. Is that possible or do i have to use a really long and thin rectangle with a bitmap fill?
    The problem is I am making a game where the user will be able to actually draw the line so i have to make it be created dynamically.
    The game fantastic contraption (www.fantasticcontraption.com) has in the game a feature where you draw lines of any length and position that are filed with a picture.
    Any help is appreciated. Thanks!!

    I just threw together a quick proof of concept for the last technique I described...using some similar to the branch image from that earlier link. The swf is attached. Just click around the stage.
    I didn't get too sophisticated here.... so no mouse dragging of the circles  etc although that would be easy to add in.
    Once its drawn via the drawing API its basically just the native renderer that get's sluggish with the animation updates if you add too much. All the bitmapdata transformations are being done at the native level for the updates, but it can get quite cumbersome/cpu intensive if you put too much on stage. I suspect it might be faster under these conditions if the drawn content was vector data, because you can loop through thousands of drawing commands very quickly.
    BranchBitmap is a library bitmap set to export on frame 1 with BranchBitmap as the class name.
    The code for this is :
    var segments:Sprite=new Sprite()
    addChild(segments)
    var connectors:Sprite = new Sprite();
    addChild(connectors);
    var points:Array=[];
    stage.addEventListener(MouseEvent.CLICK, clickhandler)
    stage.addEventListener(Event.ENTER_FRAME,frameupdater);
    function clickhandler(e:MouseEvent):void{
        points.push(new Point(e.stageX,e.stageY));
        connectors.graphics.beginFill(0xff0000,.8);
        connectors.graphics.drawCircle(e.stageX,e.stageY,15);
        drawNewSegment()
    var lastPoint:Point;
    var scrollwidth:uint=2;
    var branchBitmapData:BitmapData = new BranchBitmap(247,52);
    var scrollpixels:BitmapData = new BitmapData(scrollwidth,branchBitmapData.height)
    function frameupdater(e:Event):void{
        branchBitmapData.lock();
        var rect:Rectangle = branchBitmapData.rect;
        rect.x=branchBitmapData.width-scrollwidth;
        rect.width=scrollwidth;
        scrollpixels.copyPixels(branchBitmapData,rect,new Point(0,0))
        branchBitmapData.scroll(1,0)
        branchBitmapData.copyPixels(scrollpixels,scrollpixels.rect,new Point(0,0))
        branchBitmapData.unlock();
    function drawNewSegment():void{
        if (points.length>1){
            if (!lastPoint) lastPoint= points[0];
            var latestPoint:Point = points[points.length-1];
            var diff:Point = latestPoint.subtract(lastPoint);
            var angle:Number = Math.atan2(diff.y,diff.x);
            var baseRectangle:Rectangle = new Rectangle (lastPoint.x, lastPoint.y-branchBitmapData.height/2,Point.distance(lastPoint,latestPoint),branchBitmapData.height);
            var drawingPoints:Array=[];
            var drawingMatrix:Matrix = new Matrix();
            var bitmapMatrix:Matrix=new Matrix();
            bitmapMatrix.translate(0,-branchBitmapData.height/2)
            drawingMatrix.translate(-lastPoint.x,-lastPoint.y);
            drawingMatrix.rotate(angle);
            bitmapMatrix.rotate(angle);
            drawingMatrix.translate(lastPoint.x,lastPoint.y);
            bitmapMatrix.translate(lastPoint.x,lastPoint.y);
            //DEBUG: segments.graphics.lineStyle(0,0,1);
            segments.graphics.beginBitmapFill(branchBitmapData,bitmapMatrix,true,true)
            var p:Point = drawingMatrix.transformPoint(baseRectangle.topLeft);
            var sp:Point =p;
            segments.graphics.moveTo(p.x,p.y);
            p=drawingMatrix.transformPoint(new Point(baseRectangle.bottomRight.x,baseRectangle.y));
            segments.graphics.lineTo(p.x,p.y);
            p=drawingMatrix.transformPoint(baseRectangle.bottomRight);
            segments.graphics.lineTo(p.x,p.y);
            p=drawingMatrix.transformPoint(new Point(baseRectangle.x,baseRectangle.bottomRight.y));
            segments.graphics.lineTo(p.x,p.y);
            segments.graphics.lineTo(sp.x,sp.y);
            lastPoint= latestPoint

  • Possible to capture an image if the button on the cam is clicked?

    Hi!
    Im testing JMF and wonder if anybody knows if it is possible to capture click events from the web camera? The web camera itself has a button made to capture images and I'd like this feature in my application. All I wonder is if it's possible to capture or in any other way access information when ever this button is clicked.
    Thx in advance!
    /Anders

    You could use linux easily.
    Check dmesg, after you push the button.
    Allyou have to do is capture the event.
    In windows, you would probably have to do some jni.

  • Is it possible to display an image instead of button in a radio group?

    I am building an application to be operated with touch screens. I would like to display radio group buttons larger than they are by default. Is it possible to make them seem larger, or to display a custom image instead of the radio group?
    Francisco

    Rather than using a radio group, have you looked into using a list? That is what we use for navigation in APEX in many places when we show large images (like App Builder home page - Run Application, Supporting Objects, Shared Components, Utilities, Export / Import).
    If you need to use radio groups, you can use the template under Globalization to include a larger, clickable image (we do that for pages like selecting the type of page to create). An example template is:
    #DISPLAY_VALUE#&lt;br /&gt;&lt;a href="f?p=4000:4700:&SESSION.::::P259_CHOOSE_PAGE_TYPE,P4700_SELECT_REPORT_TYPE:FORM,FORM_ON_A_TABLE"&gt;&lt;img src="#IMAGE_PREFIX#menu/wiz_form_140x90.gif" alt="#DISPLAY_VALUE#" class="htmldbGreenIcons" width="140" height="90" /&gt;&lt;/a&gt;
    Hope it helps -
    -- Sharon

  • Is it possible to add text when using flashing button property node?

    I am trying to get a text button that displays TEST to show "running"
    when it flashes.  I am using a property node for flashing. 
    At present it cycles between TEST and default color which is set in
    flashing clolor options.

    hi there,
    use the "Strings[4]" property of the button. right click on the property node and see online doc for more information about the meanings of the 4 elements of strings[4].
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • How to add an image in a hub section header

    Hi.
    I want to add an Image in a hub section header. Is it possible to add an image with the section header so that like the section header when I click on the image it would also navigate me to that section page ?
    samEE

    Something like this might work for you:
    <HubSection IsHeaderInteractive="True"
    DataContext="{Binding Section3Items}"
    d:DataContext="{Binding Groups[3],
    Source={d:DesignData Source=/DataModel/SampleData.json, Type=data:SampleDataSource}}"
    Padding="40,40,40,32">
    <HubSection.Header>
    <Image Source="Assets/Logo.png"></Image>
    </HubSection.Header>
    http://peted.azurewebsites.net/

  • How do you add an image to the preview that doesn't show up in the live site?

    Is it possible to add an image that would take the place of " <> " ?

    No this is how it's done. This answer was provided by Nthsecret
    1) I create an image of my widget preview (ex. with photoshop);
    2) I add an image in a server or ftp;
    3) I add the image into file .mucow in this mode:
          <pageItemPosterHTML>
                <![CDATA[
                     <div><img src="YOUR_IMAGE" style=" height: HEIGHT_IN_PX; width: WIDTH_IN_PX;"></div>
                ]]>
          </pageItemPosterHTML>
         <pageItemHTML>
                <![CDATA[
                    <div></div>
                ]]>
          </pageItemHTML>

  • How do I add a "Print this page" button (not just a "Print" button) to a PDF?

    I am creating a multipage PDF in Acrobat Pro 8 for a client and it includes a linked table of contents with several sections and also several forms sprinkled throughout. I need to be able to add buttons that allow the user to print specific page numbers. Is it possible to add a "print this page" button to a page ... or even a "print this form" in case the form within the larger document is multiple pages? I would appreciate any help, thanks!

    I was just coming back to here to say I've figured it out and am using an invisible button (over text that was created to look like a link) on each page... tested and working (when combined with the code). Thank you for your replies!

  • Is it possible to add Audio on Demand to an image in Captivate 7 QUIZ for html 5 output in web browsers?

    We are trying to do a simple HEAR IT - SELECT IT type 'quiz' in Captivate 7 for an indigenous language project.  Our target output is html 5 to web browser.
    We have used the multiple choice question mode and have inserted IMAGES in place of text (although we left the question numbers visible)  
    The user should be able to click on a speaker icon to hear the audio file (as many times as they choose)  and then select the correct image answer.
    ALSO -  Is it possible to add sound effects for a correct or incorrect quiz answer?
    Thanks

    Attaching audio could be done to the Success/Failure captions, rather easily.You can put a shape button on a question slide, other interactive objects are not possible (Buttons on Question/Score Slides in Captivate 6? - Captivate blog). And have that shape button pause before the pause of the question slide. Use an advanced action with the Statement 'Play audio'. Don't use a simple action, because it will release the play head: Why choose Standard over Simple action? - Captivate blog
    User will then be able to click that shape button as many times as he wants, because the play head will remain at the pausing point. When he Submits the question, the two step process will use the pausing point of the Question slide: Question Question Slides in Captivate - Captivate blog
    Lilybiri

  • Is it possible to add a barcode image generator API on HTMLDB that support

    Hi All,
    Currently we create Barcodes images using a Java solution - open source API called Barbeque.barcode.servlet. Is it possible to add a barcode image generator API on HTMLDB that support multiple formats?
    Our current process:
    All jobs created in our system require a barcode which is then printed onto a cover sheet for each job (refer example). We also currently have individual barcodes printed on a single feed barcode printer for attaching to jobs sheets. We also print A4 sheets of barcodes with the Field Technican id number on that we sent out to them.
    Thanks in advacne
    Manoj

    It certainly is possible to call Java from PL/SQL and so therefore from APEX.
    The process is fairly well documented online and there's a well cited example of calling Apache FOP within these forums.
    You may however need to do a little work to wrap your Java library using static methods in order to do this.
    Regards
    Ben

  • Is it possible to add a text box to an image in Aperture?

    is it possible to add a text box/caption to an image in Aperture? (I do NOT have photoshop)

    Do you want to write it directly onto the image? Then install and use the free BorderFX plug-in for Aperture. It will let you write text annotations directly onto the image or onto a border.
    Regards
    Léonie
    You can download BorderFX for Aperture from here: http://www.iborderfx.com/BorderFX

  • Is it possible to add a button with image on the title bar(IDR)?

    I look through all the buttons in the example, All of them does not with an image on them.
    Is it posslbe to put a image on the title bar?
    Best regards?
    Blake Le

    hi, Julia,
    Sorry for the misleading. I want to add a button below the IDR area. And for common button it's OK.
    Now the situation changed , i need to add an icon to a button , to make the user interface more beautiful.
    Is that possible?
    Best regards,
    Thanks very much for your help.
    Blake Le

  • Is it possible to add or overlay text on an image to be used in a slideshow in Aperture?

    Is it possible to add or overlay text on an image to be used in a slideshow in Aperture v3.2.2? If so how? Thanks.
    RJT

    Start here.
    Don't miss this:
    Stage 7: Titling and Adding Text to the Slideshow
    Add a title to your slideshow using the titling controls. Insert a blank slide at the beginning of the movie to display your title. You can also use blank slides to act as chapter dividers. Add text to individual slides where appropriate.
    or this:
    Adding Text to an Individual Slide
    Message was edited by: Kirby Krieger -- added final link.

  • I need my client to be able to add/remove images. Is this possible?

    I need my client to be able to easily add/remove images. Preferably without requiring my client to pay for software. Is this possible with Muse or any other Adobe product. I understand that Muse can allow in-browser swapping of images, but I'm not sure about add/remove.

    You can only edit/replace the existing content with In-Browser editing at this time. Please refer to the following article on what exactly can be edited with the help of BC IBE at this time - http://helpx.adobe.com/muse/tutorials/in-browser-editing-muse-part-1.html.
    Thanks,
    Vinayak

  • How can I add a button to add multiple image in PDF from using adobe acrobat pro?

    I have to create a pdf form using Adobe Acrobat Pro X.
    In this form I want to add a button where I can add multiple images to the field.
    I have tried using javascript event.target.buttonImportIcon(); and successfully add an image, but when I want to add the 2nd image it automatically overwrites the previous one.
    Is there any way to solve this issue? I would like to have a form where I can add a lot of images in it. It is possible in word, but we really have to use adobe.
    Thanks

    Hi thanks for your answer.
    I can add multiple button, but if there are 10 images that I wan to add, then I have to create 10 buttons.
    Moreover, the pictures will be placed on top of each other and it means that you cannot see it clearly.

Maybe you are looking for

  • Tracking or Following - What is the difference?

    The following is copied from the Jive documentation: You have two ways to keep important things on your radar: you can follow activity or track it. Tracking is for crucial need-to-know. Following is for keeping up in a looser sense. Tracking routes a

  • How do I solve this distinct count problem?

    Hello experts,   So, I have an OBI report (table view).  I needed to get the percentage difference btn 2 columns, I did. Then I had to summarize difference in 4 buckets (0-15, 16-30, 31-50, >50%); I did (case statement). NOW,  I need to summarize(dis

  • How to populate the weekly wise (23weeks ) data in Report Coloumn wise

    Hi, I want develop a report which includes 23 weeeks of data should populate  in coloumn wise ...and their totals at last column? we have a 0calweek and weekplan( its already divided in to 25 weeks) infoobjects...So how to go about it..... ex:Product

  • How can I download Adobe CS5 upgrade on a new computer.

    I just bought a new computer and am trying to download Adobe CS5 upgrade. When installing it says I do not have a qualifying adobe product. I have a student version of Adobe CS2 premium which the installer also does not recognize the serial number...

  • Flash player won't install all the way onto my Mac?

    Adobe Flash Player will not install properly on my Mac? It loads to 50% and then stops and says "General Installation Error". Can you help me?