How create a button with a certain size??

hi
the button I create need to have a image icon, and the size of it should remain the same no matter what happen to the size of the frame or panel. by the way, how do I calculate the size of a image I need to set to a button at run time? thank you.

first copy and run this code, may sure u r connected to internet..
import javax.swing.*;
import java.awt.*;
import java.net.*;
public class JButtonExample extends JFrame {
  JPanel jPanel1 = new JPanel();
  JButton jButton1 = new JButton();
  public JButtonExample() {
    try {
       jButton1.setMargin(new Insets(0, 0, 0, 0));
       URL r = new URL("http://developer.java.sun.com/images/javalogo52x88.gif");
       jButton1.setIcon(new ImageIcon(r));
       jPanel1.add(jButton1);
       this.getContentPane().add(jPanel1, BorderLayout.NORTH);
    catch(Exception e) {
      e.printStackTrace();
    pack();
    show();
  public static void main(String[] args) {
    JButtonExample JButtonExample1 = new JButtonExample();
}good luck

Similar Messages

  • How to create a pdf with the correct size?

    Hi there
    How do I create a pdf with the correct size? I created several albums and ordered them. Now I want to backup the album and I know how to create a pdf, but when I choose A5 it's to big, when I create my own size it's not the size it should be. The original (made with iphoto) is a small size album 200x150mm. But when I create my own size (200x150) it shows some white borders.
    Does anybody have some tips ore workarounds?
    Yuri
    Imac
    Iphoto 11 (9.4.2)

    Books are designed for and printed on 8.5 x 11 inch stock, US Letter size.  You shouldn't have to select any size.  While viewing the All Pages mode in the book Control-Click on the page and select Save Book as PDF from the contextual menu. 
    That will create a PDF that iPhoto uses to upload and print.  Not all pages will be the same size as the dust jacket will be present in it's full size, 32.8 inches x 8.91 inches:
    If you want a PDF that's designed for your own printing the type Command+P while viewing the All Pages window.  In the first print window click on the PDF button.  It will present you with a contextual menu where you should select Save as PDF.  That will give you an 8.5 x 11 PDF file with all pages the same size.
    OT

  • How to create a button with the drop-down menu?

    I want to create a button with the drop-down menu, which is like the 'back' on the tollbar in IE. I heard JPopupMenu can reach the certain result, but the button hadn't a down arrow. Who can help me?

    i have made something like this :
    //======================================================================
    package com.ju.guiutils
    import java.awt.*;
    import java.awt.event.*;
    import java.net.URL;
    import java.util.Vector;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import javax.swing.plaf.basic.BasicComboBoxUI;
    * @version 1.0 14/04/02
    * @author Syed Arshad Ali <br> [email protected]<br>
    * <B>Usage : </B> ButtonsCombo basically performs function button + JComboBox, if we have different options for
    * <BR>same button then we can use this ButtonsCombo.
    *<BR> By the way there is no button at all in <I>ButtonsCombo</I>
    public class ButtonsCombo extends JComboBox {
    //===================================================================================
    * Create ButtonsCombo with default combobox model
    public ButtonsCombo () {
    super ();
    init ();
    //===================================================================================
    * Creates a ButtonsCombo that takes it's items from an existing ComboBoxModel.
    public ButtonsCombo ( ComboBoxModel model ) {
    super ( model );
    init ();
    //===================================================================================
    * Creates a ButtonsCombo that contains the elements in the specified array.
    public ButtonsCombo ( Object [] items ) {
    super ( items );
    init ();
    //===================================================================================
    * Creates a ButtonsCombo that contains the elements in the specified Vector.
    public ButtonsCombo ( Vector items ) {
    super ( items );
    init ();
    //===================================================================================
    private void init () {
    setBorder ( BorderFactory.createBevelBorder ( BevelBorder.RAISED ) );
    setRenderer ( new ComboRenderer() );
    setUI ( new ComboUI() );
    addMouseListener ( new ComboMouseListener() );
    //===================================================================================
    * Set items for ButtonsCombo in the specified array
    public void setItems ( Object [] items ) {
    setModel ( new DefaultComboBoxModel( items ) );
    //```````````````````````````````````````````````````````````````````````````````````
    * Set items for ButtonsCombo in the specified Vector
    public void setItems ( Vector items ) {
    setModel ( new DefaultComboBoxModel( items ) );
    //```````````````````````````````````````````````````````````````````````````````````
    * Get current items in a array
    public Object [] getItemsArray () {
    ComboBoxModel model = this.getModel ();
    if ( model != null ) {
    int size = model.getSize ();
    if ( size > 0 ) {
    Object [] items = new Object[ size ];
    for ( int i = 0; i < size; i++ ) {
    items[ i ] = model.getElementAt ( i );
    return items;
    return null;
    //```````````````````````````````````````````````````````````````````````````````````
    * Get current items in a Vector
    public Vector getItemsVector () {
    ComboBoxModel model = this.getModel ();
    if ( model != null ) {
    int size = model.getSize ();
    if ( size > 0 ) {
    Vector itemsVec = new Vector();
    for ( int i = 0; i < size; i++ ) {
    itemsVec.addElement ( model.getElementAt ( i ) );
    return itemsVec;
    return null;
    //===================================================================================
    class ComboMouseListener extends MouseAdapter {
    public void mouseClicked ( MouseEvent me ) {
    ButtonsCombo.this.hidePopup ();
    public void mousePressed ( MouseEvent me ) {
    ButtonsCombo.this.hidePopup ();
    ButtonsCombo.this.setBorder ( BorderFactory.createBevelBorder ( BevelBorder.LOWERED ) );
    public void mouseReleased ( MouseEvent me ) {
    ButtonsCombo.this.hidePopup ();
    ButtonsCombo.this.setBorder ( BorderFactory.createBevelBorder ( BevelBorder.RAISED ) );
    //===================================================================================
    class ComboRenderer extends JLabel implements ListCellRenderer {
    //````````````````````````````````````````````````
    public ComboRenderer () {
    setOpaque ( true );
    //````````````````````````````````````````````````
    public Component getListCellRendererComponent ( JList list, Object value, int index, boolean isSelected, boolean cellHasFocus ) {
    setBackground ( isSelected ? Color.cyan : Color.white );
    setForeground ( isSelected ? Color.red : Color.black );
    setText ( ( String )value );
    return this;
    //````````````````````````````````````````````````
    //===================================================================================
    // We have to use this class, otherwise we cannot stop JComboBox's popup to go down
    class ComboUI extends BasicComboBoxUI {
    public JButton createArrowButton () throws NullPointerException {
    try {
    URL url = getClass ().getResource ( "/images/comboarrow.gif" );
    JButton b = new JButton( new ImageIcon( url ) );
    b.addActionListener ( new ActionListener() {
    public void actionPerformed ( ActionEvent ae ) {
    return b;
    } catch ( NullPointerException npe ) {
    throw new NullPointerException( "/images/comboarrow.gif not found or /images folder not in classpath" );
    catch ( Exception e ) {
    e.printStackTrace ();
    return null;
    //======================================================================
    you can cutomize this according to your requirement , okie ;)

  • How can i create a button with a dynamic picture?

    How can i create a button with a dynamic picture using
    mcLoader.loadClip
    I did create one with it doesnt seem to be working. It loses
    all its
    functions (eg onPress onRelease)
    Thanks

    I solved thep roblem anyway creating a mc.. then creating
    another MC withing
    the first MC and i change the picture on the second MC. And i
    apply the
    propierities to the first MC , and works
    If i have troubles with mu sistem on the future I will use
    yours!
    Thanks!
    "the fleece" <[email protected]>
    escribi� en el mensaje
    news:e67i88$jlf$[email protected]..
    > the image loading will remove any properties or
    functions the mc had.
    >
    > you need to apply them in the onLoadInit function
    >
    > mclListener.onLoadInit = function(target_mc:MovieClip) {
    > target_mc.onRollOver=blah blah
    > };
    > var image_mcl:MovieClipLoader = new MovieClipLoader();
    > image_mcl.addListener(mclListener);
    > image_mcl.loadClip(blah, blahblah);
    >
    >

  • How to create a String with a specific size?

    how to create a String with a specific size?
    For example I want to create different Strings with the size of 100 , 1000 or 63k byte?

    String are immutable so just initialize it with the number of characters you want.
    You might want to look at java.lang.StringBuffer and see if that's what you want.

  • How to create a report with different page sizes

    Hi,
    I would like to create a report with different page sizes, it's possible to do it with diadem?
    When I change the layout parameters, changes afect to all sheets...
    Is there a way to change page size individually for each sheet?
    Thanks in advance.
    Marc

    Hi Marc,
    You can use the DocStart and DocEnd commands along with the PicPrint command to spool multiple print commands to the same output PDF file using the direct printer approach.  This should enable you to programmatically specify the page size differently for each sheet that you add to the print job.
    ' Print PDF Page by Page.VBS
    OPTION EXPLICIT
    Dim i, Path, OldPrintName
    Path = AutoActPath & "2D Stacked"
    Call DataDelAll
    Call DataFileLoad(Path & ".TDM")
    PDFFileName = Path & " Page by Page.pdf"
    IF FileExist(PDFFileName) THEN Call FileDelete(PDFFileName)
    OldPrintName = PrintName
    PrintName = "winspool,DIAdem PDF Export,LPT1:" ' Set to PDF printer
    PDFResolution = "72 DPI" ' "2400 DPI" , "default"
    PDFOptimization = TRUE
    PDFFontsEmbedded = FALSE
    PDFJPGCompressed = "high"
    PrintOrient = "landscape" ' orient paper
    Call PrintMaxScale("GRAPH") ' auto-max, see alternative margin setting variables below
    PrintLeftMarg = 0.181
    PrintTopMarg = 0.181
    PrintWidth = 10.67
    'PrintHeigth = 7 (read-only)
    Call WndShow("REPORT")
    Call DocStart ' Begin multi-page document/print job
    FOR i = 1 TO 4
    Call PicLoad(Path & ".TDR")
    Call GraphSheetNGet(1)
    Call GraphSheetRename(GraphSheetName, "Page " & i)
    Call PicUpdate
    Call PicPrint("WinPrint") ' Add a page to be printed
    NEXT ' i
    Call DocEnd ' End multi-page document/print job
    PrintName = OldPrintName
    Call ExtProgram(PDFFileName)
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • How do I boot with a certain user in-control?

    Duh.  Maybe I am suffering a lapse mentally.  But my question is my Subject, please:  "How do I boot with a certain user in-control?"  I set Users as I want, then I re-start, but I use the older user, still.  So I feel perplexed, which is not good.  :-(
    I feel Frustrated at trying to _download_ Mavericks.  More than two-weeks I've seen:  "Your request is Temporarily unable to be processed.  Please try again later."
    [On my iMac, I am trying to create a new account to use to try to get Mavericks.]  Thank you.  :-)

    Well, depending on your current OS version, what you need to do is to switch user at the login screen.  On Lion, there's a switch user icon to click on.  Switch user then log in.
    But I don't think that will fix not being able to download Mavericks, though I guess it's possible.  If you already have an Apple ID and account, you want to be careful about associating multiple IDs with different apps, video, music, etc. on your system.  That can result in problems, as Apple IDs can't be consolidated.

  • How create and work with Z output to meet the client requirment?

    hi  gurus,
    I am SD functional consultant and need ur help
    Please explain me how create and work with Z output .
    How we arrange and change the fields in header and footer
    where and how we do changes in Layouts setting and SAP scripts to meet the user requirments.
    pls forward functional or Tech spec of Z output
    points will be rewarded
    thanx & regards
    shabnum

    Hi shabnum ,
    I hope you can do it.
    Goto SE71, enter form name--> click change
    1) click in page window command button, Identify the header and footer window
    2) single click on Header window and click change button(pencil symbol)
    3) identify the fields and change order of the fields
    I hope this will help to solve your issue
    Regards,
    SaiRam

  • How create data store with PermSize 512MB on WIN32?

    Hi!
    How create data store with PermSize > 512MB on WIN32? If I set PermSize > 512MB on WIN32, then data store becomes invalid.

    Thanks for the details. As I mentioned, due to issues with the way Windows manages memory and address space it is generally not possible to create a datastore larger than around 700 Mb on WIN32. Sometimes you may be lucky and get close to 1 GB but usually not. The issue is as follows; on Windows, a TimesTen datastore is a shared mapping created from memory backed by the paging file. This shared mapping must be mapped into the process address space as a contiguous range of addresses. So, if you have a 1 GB datastore then your process needs to have a contiguous 1 GB range of addresses free in order to be able to connect to (map) the datastore. Unfortunately the default behaviour of Windows is to map DLLs into a process address space all over the place and any process that uses any significant number of DLLs is very unlikely to have a contiguous free address range larger than 500-700 Mb.
    This problem does not exist with other O/S such as Unix or Linux nor does it exist with 64-bit Windows. So, if you need to use a cache or datastore larger than around 700 Mb you need to use either 64-it Windows or another O/S. Note that even on 32-bit Linux/Unix TimesTen datastores are limited to a maximum size of 2 GB. If you need more than 2 GB you need to use a 64-bit O/S.
    Chris

  • How create a DLL with module python?

    Hello,
    I am a beginner in TestStand,
    I would like to know, how create a DLL with module Python? because for create a sequence, we must own a DLL.
    Thank you for your answer
    Vincent
    Solved!
    Go to Solution.

    Hello,
    I would like use TestStand with Python module. So I believe, we must use a DLL for execute a test, I'm wrong because I can use .exe for realize a test.
    Now I know how use TestStand with Python module but I have a mistake. I wonder which is error 255?
    Whereas I use .exe in Language C, I have no error.
    Thank you for your anwser.
    Vincent
    Attachments:
    Setup_Test.jpg ‏244 KB
    Report.jpg ‏258 KB

  • How create and work with Z output to meet user req

    hi gurus,
    I am SD functional consultant and need ur help
    Please explain me how create and work with Z output .
    How we arrange and change the fields in header and footer
    where and how we do changes in Layouts setting and SAP scripts to meet the user requirments.
    pls forward functional or Tech spec of Z output
    points will be rewarded
    thanx & regards
    shabnum

    Hi
    From SPRO do the all steps.
    Goto SD-> BASIC functions->Output control->Output determination->Output determination by condition technique->Maintain Output determination for sales documents
    Here define all like access sequences, Output types, condition tables and assign them to Program and Forms.
    From SE71 copy the script to a Zscript and to modify it to suit your requirements and the same Zscript has to be assigned to Output type, Program in NACE transaction.
    Reward points if useful
    Regards
    Anji

  • Creating a button with text in FlashCS5

    I am fairly new with using FlashCS5.  I just finished the class and created a button with text in it for class but now when I need to do it for a project I can't seem to get it to work.
    I am trying to create a simple start and stop button to start and stop a Flash movie.  I can get the buttons to work without any text, such as the word start and stop in the middle of each.  Everything I've tried to do with the text on the button turns out the same.
    What happens is that in Flash the buttons appear to work fine.  The little hand with the finger shows no matter where I place my cursor on the button but when I test them the area where the text is does not allow the click to work.  I have tried specifying a hit area and made sure that the hit area was larger than the entire button but still the middle where the text is doesn't work.   Outside of the text area works fine.
    Any ideas?  I've spent 4 hours on this.

    Thank you for the reply but what I am doing is much simpler.  I am creating a gray rectangle and putting text in the center.  I am then selecting both the rectangle and the text and converting it to a button.  I am then editing the button from the library and adding a keyframe to the hit area, drawing a rectangle around the button to establish the hit area.
    I am enabling simple buttons and when in Flash it appears fine.  It is when I test that the area where the text is doesn't function as clickable.

  • How create 1 dvd with 2 file

    how create 1 dvd with 2 file

    As you probably know,  DVD creation in Compressor and FCPX is very limited – and it only accommodates single tracks.
    But there is no reason why you can't put multiple movies on a single timeline in FCP. Separate them with inserted gaps and add chapter markers to provide some level of navigation among them.
    Good luck.
    Russ

  • How can i create a button with richText display instead of label

    Hi All,
    I'm trying to create a button that will look exactly as the regular spark button but will have more than one color in his label (Like attached 'buttonPic.jpg')
    I have tried to create a new button skin and new button component that will replace the label text and will to the job, but still it looks like the button original class overides the richText definitions. (Code attached)
    Maybe there is other solution?
    This is my extra code in the MyButtonSkin
         <!-- layer 8: text -->
        <!---
        @copy spark.components.supportClasses.ButtonBase#labelDisplay
        -->
        <s:Label id="labelDisplay"
                 visible="false">
        </s:Label>
        <s:RichText id="exLabelDisplay"
                    color="0x900000"
                    textFlow="{TextConverter.importToFlow(htmlTextAsHTML, TextConverter.TEXT_FIELD_HTML_FORMAT)}"
                    left="7" right="7" top="2" bottom="2">
        </s:RichText>
        <fx:Declarations>
            <fx:String id="htmlTextAsHTML"><![CDATA[<p><b>0</b>+</p>]]></fx:String>
        </fx:Declarations>

    Hi mewk,
    probably it was a catch due to eyes that actually got a bit of sleep
    anyway small test app
    <?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/halo" minWidth="1024" minHeight="768">
    <fx:Script>
    <![CDATA[
    protected function updateBtn_clickHandler(event:MouseEvent):void
    richbtn.label=mytext.text;
    ]]>
    </fx:Script>
    <s:Button id="richbtn" x="69" y="58" width="169" height="83" skinClass="ButtonSkin1" label="&lt;p&gt;hello&lt;/p&gt;&lt;p&gt;goodbye&lt;/p&gt;"/>
    <s:Button x="70" y="333" label="Update rich button" id="updateBtn" click="updateBtn_clickHandler(event)"/>
    <s:TextArea x="69" y="174" id="mytext" text="&lt;p&gt;hello&lt;/p&gt;&lt;p&gt;&lt;b&gt;bold&lt;/b&gt;&lt;/p&gt;"/>
    </s:Application>
    and a skin with minimal change
    <?xml version="1.0" encoding="utf-8"?>
    <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
                 xmlns:fb="http://ns.adobe.com/flashbuilder/2009" minWidth="21" minHeight="21" alpha.disabled="0.5">
        <fx:Metadata>
            <![CDATA[
            [HostComponent("spark.components.Button")]
            ]]>
        </fx:Metadata>
        <fx:Script fb:purpose="styling">
            <![CDATA[        
    import flashx.textLayout.conversion.TextConverter;
                static private const exclusions:Array = ["labelDisplay"];
    override public function get colorizeExclusions():Array {return exclusions;}
              override protected function initializationComplete():void
                    useBaseColor = true;
                    super.initializationComplete();
    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
                    var cr:Number = getStyle("cornerRadius");
                    if (cornerRadius != cr)
                        cornerRadius = cr;
                        shadow.radiusX = cornerRadius;
                        fill.radiusX = cornerRadius;
                        lowlight.radiusX = cornerRadius;
                        highlight.radiusX = cornerRadius;
                        border.radiusX = cornerRadius;
                    if (highlightStroke) highlightStroke.radiusX = cornerRadius;
                    super.updateDisplayList(unscaledWidth, unscaledHeight);
                private var cornerRadius:Number = 2;
            ]]>       
        </fx:Script>
        <!-- states -->
        <s:states>
            <s:State name="up" />
            <s:State name="over" />
            <s:State name="down" />
            <s:State name="disabled" />
        </s:states>
        <!-- layer 1: shadow -->
        <s:Rect id="shadow" left="-1" right="-1" top="-1" bottom="-1" radiusX="2">
            <s:fill>
                <s:LinearGradient rotation="90">
                    <s:GradientEntry color="0x000000"
                                     color.down="0xFFFFFF"
                                     alpha="0.01"
                                     alpha.down="0" />
                    <s:GradientEntry color="0x000000"
                                     color.down="0xFFFFFF"
                                     alpha="0.07"
                                     alpha.down="0.5" />
                </s:LinearGradient>
            </s:fill>
        </s:Rect>
        <!-- layer 2: fill -->
        <s:Rect id="fill" left="1" right="1" top="1" bottom="1" radiusX="2">
            <s:fill>
                <s:LinearGradient rotation="90">
                    <s:GradientEntry color="0xFFFFFF"
                                     color.over="0xBBBDBD"
                                     color.down="0xAAAAAA"
                                     alpha="0.85" />
                    <s:GradientEntry color="0xD8D8D8"
                                     color.over="0x9FA0A1"
                                     color.down="0x929496"
                                     alpha="0.85" />
                </s:LinearGradient>
            </s:fill>
        </s:Rect>
        <!-- layer 3: fill lowlight -->
        <s:Rect id="lowlight" left="1" right="1" bottom="1" height="9" radiusX="2">
            <s:fill>
                <s:LinearGradient rotation="90">
                    <s:GradientEntry color="0x000000" alpha="0.0099" />
                    <s:GradientEntry color="0x000000" alpha="0.0627" />
                </s:LinearGradient>
            </s:fill>
        </s:Rect>
        <!-- layer 4: fill highlight -->
        <s:Rect id="highlight" left="1" right="1" top="1" height="9" radiusX="2">
            <s:fill>
                <s:SolidColor color="0xFFFFFF"
                              alpha="0.33"
                              alpha.over="0.22"
                              alpha.down="0.12" />
            </s:fill>
        </s:Rect>
        <!-- layer 5: highlight stroke (all states except down) -->
        <s:Rect id="highlightStroke" left="1" right="1" top="1" bottom="1" radiusX="2" excludeFrom="down">
            <s:stroke>
                <s:LinearGradientStroke rotation="90" weight="1">
                    <s:GradientEntry color="0xFFFFFF" alpha.over="0.22" />
                    <s:GradientEntry color="0xD8D8D8" alpha.over="0.22" />
                </s:LinearGradientStroke>
            </s:stroke>
        </s:Rect>
        <!-- layer 6: highlight stroke (down state only) -->
        <s:Rect left="1" top="1" bottom="1" width="1" includeIn="down">
            <s:fill>
                <s:SolidColor color="0x000000" alpha="0.07" />
            </s:fill>
        </s:Rect>
        <s:Rect right="1" top="1" bottom="1" width="1" includeIn="down">
            <s:fill>
                <s:SolidColor color="0x000000" alpha="0.07" />
            </s:fill>
        </s:Rect>
        <s:Rect left="2" top="1" right="2" height="1" includeIn="down">
            <s:fill>
                <s:SolidColor color="0x000000" alpha="0.25" />
            </s:fill>
        </s:Rect>
        <s:Rect left="1" top="2" right="1" height="1" includeIn="down">
            <s:fill>
                <s:SolidColor color="0x000000" alpha="0.09" />
            </s:fill>
        </s:Rect>
        <!-- layer 7: border - put on top of the fill so it doesn't disappear when scale is less than 1 -->
        <s:Rect id="border" left="0" right="0" top="0" bottom="0" width="69" height="20" radiusX="2">
            <s:stroke>
                <s:LinearGradientStroke rotation="90" weight="1">
                    <s:GradientEntry color="0x000000"
                                     alpha="0.5625"
                                     alpha.down="0.6375" />
                    <s:GradientEntry color="0x000000"
                                     alpha="0.75"
                                     alpha.down="0.85" />
                </s:LinearGradientStroke>
            </s:stroke>
        </s:Rect>
        <!-- layer 8: text -->
    <s:RichText id="LabelDisplay"
    color="0x900000"
    textFlow="{TextConverter.importToFlow(hostComponent.label, TextConverter.TEXT_FIELD_HTML_FORMAT)}"
    left="7" right="7" top="2" bottom="2">
    </s:RichText>   
    </s:SparkSkin>

  • How make menu button with unrolling thumbnails in as 3.0??

    Hello
    I need help with doing a menu with unrolling and rolling up buttons with thumbnails;  now I have someting like that (attachments) this was made by as 2.0 but I need help with changing this on as 3.0.
    if samobody have some ideas how can I do this or somting similar using as 3.0 I will be grateful

    The only way to convert it to AS3 is to go thru it and replace the code as needed.  While some code may not have to change, quite a bit of it will.  Your best bet for getting thru it is to build it up from scratch one object at a time and get each coded as you go.  Otherwise you will be overwhelmed with error messages.  Here's a few pointers.
    All code is AS3 has to be placed on the timeline.  You cannot place code "on()" objects.  So each object needs an instance name.
    Any interaction or event handling such as mouse controls and file loading involve event listener/event handler pairs.  So you will want to start with looking into the addEventListener() method, which is pretty much used globally for any/all event processing.
    When it comes to loading external swf files, you want to use the Loader class.
    To determinine how to make the code work, I recommend using a practice file.  A file that you can implement one codig sequence in at a time just to determine what works.
    Converting this to AS3 will be a good exercise for you on the road to learning it.  When I wanted to start learning AS3 that's pretty much what I did, though with the sole purpose of the learning as my goal.  I took a fairly complicated menu design that I had created first in AS2, and then rebuilt it from the ground up using AS3.

Maybe you are looking for

  • Error when starting DB2 instance

    Dear All, We are running our SAP system with DB2 database on Solaris platform. Recently when performing db2start we encounter an error message "ld.so.1: db2start: fatal: libicudatadb2.so.32: open failed: No such file or directory" Please help to unde

  • I supposedly updated to safari 6.0 but now I have no Internet!

    I have a MacBook Pro 10.6.8. For a school project I needed to access a website that only allows users on if they access it from safari 6.0 and I was still using 5.0. They gave me a download link and I used it and now when I click on safari it says yo

  • New MacBook Air 11" 2012 does not recognize 3G dongle

    Hello, Bought the new 11" 2012 MacBook Air last week. Unfortunately I can't use my 3G dongle with it. (it's a T-Mobile branded Huawei E173) The Air just doesnt recognize it. Even not as disc image. When I plug it into my 15" 2009 MacBook Pro it just

  • Berkeley DB JE no in-memory option ?

    Hi, Is there any way to create the berkley databse in memory ?

  • Hyperlinks (to URL) not working in MOS

    Hi, I have a multistate objets in which I have an image as an hyperlink to an URL in each state but they are not working. Could someone tell me what i'm doing wrong? Thank you