I've created a button with an looped animation...

... that I want to only play when mousedover, and stop (hide) on mouseout.
Right now it does stop and start once I mouseover the button the first time. But when it loads it's playing not hidden. Here's the code I have at this point:
MouseOver
var mySymbolObject = sym.getSymbol("ButtonSlider");
sym.$("ButtonSlider").css({opacity:1});
MouseOut
var mySymbolObject = sym.getSymbol("ButtonSlider");
sym.$("ButtonSlider").css({opacity:0});
Click
sym.play(0000);
I've tried a hide trigger on the time line with the same code on the buttons, but the ButtonSlider stays hidden.
Thanks for you help in advance.

OK. You need to take off the autoplay in your button annimation. When you create a symbol you have the choice to choose autoplay or not. If you forget to do it at creation when you get the dialog box, you can always remove it later. If you are going to control the timeline of symbols, you need to check autoplay off. I wrote a blog about symbol's scope that will help you: 
http://www.edgehero.com/tutorials/scope
So, enter the button annimation (ButtonSlider and double click ButtonAnimPassion and then check off autoplay.
Then you will need to start the animation on your mouseenter and add this line:
Somehow I cannot get it to work on the mouseenter but it works on the click event
sym.$("ButtonSlider").mouseenter(function(){
     sym.$("ButtonSlider").$('Button').show();
     //sym.getSymbol("ButtonSlider").getSymbol('ButtonAnimPassion').play();
sym.$("ButtonSlider").mouseleave(function(){
     sym.$("ButtonSlider").$('Button').hide();
sym.$("ButtonSlider").click(function(){
     sym.play(0);
          sym.getSymbol("ButtonSlider").getSymbol('ButtonAnimPassion').play();

Similar Messages

  • 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 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 ;)

  • 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 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>

  • Creating a button with a text label layer

    Hi guys.  Looking for any tips on how best to implement a button with a text label.  I initially created a rectangle object on a lower layer and with text in the upper layer via type tool.  When I group both objects and create the button the text is readable in my InDesign (document) computer screen but the minute I preview it on my iPad the button becomes unreadable and pixellated.  I tried various approaches by moving the text layer outside the button group does not display the text at all.  Has anyone run into this issue?  If so what is the best practice?  Thanks in advance.

    Thanks for the insight Neil.  Regarding my button design its nothing fancy.  Its a rectangle box on one layer and a text label on another layer inside the rectangle object.  What I'm trying to simulate is when the user taps on the button the click state will change colour to notify the user that they have activated an event and in this case a navto://...
    The way I've implemented it is the rectangle is coloured pink [Normal] and when tapped the light pink [Click] toggles between both colours BUT my text label disappears. 
    See the screen shots below.

  • Creating dynamic buttons with pictures on them

    Hi there,
    What is the procedure for doing so?
    I need to create 5 buttons which looks the same, and each one of them has a picture on it.
    I'm new to Flash/Action Script.
    I created a button symbol, named it and created linkage to AS.
    I also created a MovieClip that holds the picture I want to put on top of the button and created a linkage.
    Then in the code I create two instances and display them
    This is the code:
    public function setBBWBtnProp(btn:btnChoose, tmb:MovieClip, idx:int)
         btn.height = 120;
         btn.width = 120;
         btn.x = 20;
         btn.y = 15 + 140 * idx;
         tmb.x = btn.x + 5;
         tmb.y = btn.y + 5;
    var btn1:btnChoose = new btnChoose();
    var tmb1:mvBBW02Thumb = new mvBBW02Thumb();
    setBBWBtnProp(btn1, tmb1, 0);
    ph.addChild(btn1);
    ph.addChild(tmb1);
    Now, it works but the movieclip blocks the button...
    Any idea how to do it correctly...

    I'm only an intermediate scripter, but in my experience it seems like it's a mistake to mix coding with buttons. Instead use a movie clip and assign listeners to it.
    look up functions like the onese I use below
    actorButton is my movie clip
    private function registerMyButton(){
                actorButton.buttonMode = true;
                actorButton.addEventListener(MouseEvent.CLICK, reportClick);
    function reportClick(event:MouseEvent):void{
                var thisPage = myImgData.web_page_str;
                var targetURL:URLRequest = new URLRequest(thisPage);
                navigateToURL(targetURL, "_self");
    hope that helps
    ...gregory

  • Need help on creating a button with additional drop down menu

    Hi,
    I need to have a button with additional menu as we see in IE, please help me how can i do that. I want the button to be displayed normally with an additional arrow on the right side when clicked on it shows pop up menu. Please let me know if the solution has already there in the forum. I searched and couldn't get one .. :(

    Hey there buddy.
    Try this:
    http://www.koders.com/java/fid20361AB8C305DE9B9110DE90F2154FC43AA0E57C.aspx
    Jason.

  • How to create a button with javascript

    Hello everyone ,
    I'm pretty new in the world fo APEX , after reading a lot of tutorials , i'm trying to build my own application ,but now i'm stuck because of my lack of knowledge :)
    So here is the problem ,
    I have a line with a select list ( designed to select a task )+ 5 text fields ( designed to write how many hours the worker worked each day for the task )
    And then , a button " Add Task " , so with this button i want to create a copy of the first line so the worker can add an other task , but actually i have no idee how to do this .. I don't know if i was clear or not ? ,
    I will apreciated all advice and remarks ,
    Thanks in advance
    Brice

    Once your tabular form is created,
    go to Report Attributes and click the edit icon(pencil image) next to the column you want to be a select list,
    go to column attributes and click the Display As select list, and you'd probably choose Select List Static or Named
    The Add Task button would be the standard 'Add Row' button that gets created from creation of the tabular form.
    What do the rows that you want to create relate to? It seems that the first row has a Task coming from the select list and the 5 entry columns as hours each working day of week and one week = one row ?
    If you need to create additional blank rows, I would look at using an Apex Collection, created in a before header process, where you can add as many rows as desired, then query the collection for the tabular form, and maybe have a custom post submit process to update the collection data to your table. If you're only adding rows to the table, you don't really need the checksum functionality that is a desirable part of the Apex Tabular Form/MRU process. Thinking out loud here.
    Hope this helps.
    Edited by: Bob37 on Nov 9, 2011 10:40 AM

  • Create a button with image

    I create a new button and set imageSource property with my image name (saved in mimes/components/<mycomponent>...).
    The problem is that button don't display image.
    If i try to use the same pic like image element it's all ok.
    Someone has the same problem?
    Thanks
    Andrea

    Hi!
    I've met the same problem, but with a little bit another appearance:
    - my gif files are saved in mimes/components/<component>
    - when I do DC build locally (context menu DevComponent/Build)
    - and then deploy (again context menu DevComponent/Deploy)
    it works - images are shown in runtime.
    I see .ear file (and wda inside ear), which contains my gif files in appropriate location.
    Structure is (starting from root of wda):
    - Applications
    ....<application> (empty folder)
    - ComponentInterfaces
    - Components
    ....<component>
    ........gif files
    - PORTAL-INF
    ....folders (classes, lib, ...)
    ....webdynpro
    ........Applications
    ............<application>
    ................<application>.xml
    ........ComponentInterfaces
    ........Components
    ............<component>
    ................<component>.xml - no gif files in the folder
    However when I download build result from CBS, the wda file has different structure - the only top level folder is "PORTAL-INF" and inside there are no gif files.
    Correspondingly, when I deploy SCA, generated by CMS, the images are missing.
    What should I do that server build will be similar to local build? I.e. how to bring "Components" top-level folder back in wda, when it's built by CBS?
    Note: The problem appeared after upgrade from SP10 to SP12.
    Any ideas?
    Best regards,
    Nick

  • Quick Migrate Creates a Trigger with Infinite Loop

    Quick Migrate did a good job at nicely converting my MS SQL Database to Oracle. The only problem that I have is triggers. I have a table with the companies and when the table is just created and there are no rows in the table, on the very first insert it goes into a constant loop. There is no code I have altered after the migration has been completed.
    So, there is:
    table: RA_COMPANY
    sequence: SEQ_RA_COMPANY_ID
    trigger: TRG_RA_COMPANY_ID
    table has no rows, trigger has been compiled and sequence hasn't been accessed so on the first insert, the trigger should put 1 into the newly added row. Here is the migration code for the trigger:
    CREATE OR REPLACE TRIGGER TRG_RA_COMPANY_ID BEFORE INSERT OR UPDATE ON RA_COMPANY
    FOR EACH ROW
    DECLARE
    v_newVal NUMBER(12) := 0;
    v_incval NUMBER(12) := 0;
    BEGIN
      IF INSERTING AND :new.ID IS NULL THEN
        SELECT SEQ_RA_COMPANY_ID.NEXTVAL INTO v_newVal FROM DUAL;
        -- If this is the first time this table have been inserted into (sequence == 1)
        IF v_newVal = 1 THEN
          --get the max indentity value from the table
          SELECT max(ID) INTO v_newVal FROM RA_COMPANY;
          v_newVal := v_newVal + 1;
          --set the sequence to that value
          LOOP
               EXIT WHEN v_incval>=v_newVal;
               SELECT SEQ_RA_COMPANY_ID.nextval INTO v_incval FROM dual;
          END LOOP;
        END IF;
       -- assign the value from the sequence to emulate the identity column
       :new.ID := v_newVal;
      END IF;
    END;
    ALTER TRIGGER TRG_RA_COMPANY_ID ENABLE;
    /and on the first insert, the loop that is in the middle will be an infinite loop.
    I do need only the inserts and I removed the UPDATE part and the loop itself but I am just wondering why is migration process creating this loop.
    thanks

    Hi Tridy,
    I look into this for you.
    I can see that this line
    SELECT max(ID) INTO v_newVal FROM RA_COMPANY;
    Is going to cause an issue if there are no rows.
    I wonder if
    SELECT NVL(max(ID),0) INTO v_newVal FROM RA_COMPANY;
    Solve the issue?
    Ill do some tests latter today and get back to you.
    Regards,
    Dermot.

  • 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

  • Creating a Button with OOP and AS 2.0

    Hi,
    After a couple of years of doing AS 1.0, I'm trying to step
    up to OOP AS 2.0. I'm trying the very simple task of placing a
    button on stage and assigning and event to it, but it's not
    working. The only thing I get is a small gray rectangle. What am I
    doing wrong?
    As a side note, does anyone know any good tutorials for basic
    OOP with AS 2.0?
    Thanks.

    For the code to work you need to have a copy of the button
    component in the library of the fla -> drag an instance of the
    button component from the component window to the stage and delete
    it from the stage -> the button component is now in the library.
    Test your movie.

  • Create a button with an advanced action to start a video and associated text on the timeline.

    I need help. I have a video on a slide that I want to start only when the learner clicks a Play Video button.  When that button is clicked, the video should start and the associated text captions with their timings should start then as well.  Is this possible with advanced actions?  If so, can anybody help me with those actions?
    The slide would work like this:
    Upon entry to the slide, narration is playing, and a text box appears on the screen.  It tells them to "click the play video button to begin".  Nothing should happen until they click the play video button.
    When they click the button, the advanced action would start the video, and the associated text boxes appear as each "step" in the video goes by.  It's a procedure with step by step instructions.

    You are very correct.  I am making it too complicated!  I believe I will do exactly what you said.  If I still want to have a button that says Play Video, I could just have that button advance to the next slide.  The learner will probably not even know they are on a different slide.  Thanks for making me see that clearly.  Sometimes I get too caught up in trying to do something one way.  Thanks for the help! 

  • How to create a button with an attached menu?

    I don't know how these buttons are called but I'll try to explain what I want to do. I have a toolbar where I have a button that cycles through several functions on every action - I use it to cycle through display modes. Because I do not want to switch through all other posibilties I want a menu next to it where I can directly switch to the desired display mode. Clicking on the button cycles through the modes and clicking on the attached menu provides a direct selection. What I have in mind is something like the "show images / show no images / show cached images only" Button in the Opera webbrowser, see
    http://img32.imagevenue.com/img.php?loc=loc74&#8465;=a33_button_menu.jpg
    Currently I'm using a group of JToggleButtons but since I'm going to add new display modes adding new buttons would make the toolbar look too crowded.

    See if this is useful
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    class SwingA implements ActionListener
    JPopupMenu pop;
    JFrame frame;
    JPanel panel;
    JButton cmdPop;
    JDialog dlgFrame;
    int times_clicked = 0;
         public static void main(String[] args)
         SwingA A=new SwingA();
         SwingA()
                    try
              UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
                      frame=new JFrame("PopUp");
                      frame.setSize(600,480);
                      frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
                      pop=new JPopupMenu();
                      cmdPop=new JButton("Click");
                     cmdPop.addActionListener(this);
                   JMenuItem item = new JMenuItem("First");
                   JMenuItem item1 = new JMenuItem("Second");
                   pop.add(item);
                   pop.add(item1);
                     panel=new JPanel();
                      panel.add(cmdPop);
                      frame.getContentPane().add(panel);
                      frame.setVisible(true);
              catch(Exception E)
         public void actionPerformed(ActionEvent source)
           pop.show(cmdPop, cmdPop.getWidth(), 0);
    }

Maybe you are looking for

  • Officejet 7000 Wide Format 809a

    How do I get a replacement external power supply for the HP Officejet 7000 Wide Format 809a printer. I have followed the HP on line video to do a reset and check on the power supply and believe that the ext'l power supply is dead. Printer was last se

  • How to enable Arabic text in Photoshop cs3?

    Greetings everyone, I want my Photoshop cs3 to support Arabic text. I have searched the internet to find any clue but couldn't. Please help.

  • Cant download the updated app for windows 8.1 or pin the desktop version to the start menu???

    how do i pin the new updated desk top version to the start screen in windows 8.1 do i relly have to down load the update every time i want to use skype rather than have it running all the time on my taskbar, this is my computer and i would like to be

  • Basic css question

    Hi all this is a basic question but I need to ask it Ther h1, h2, h3 classes that are set normally at the beginning of each style sheet does that meanm that the same values are set throughout the whole page? If I have another div how can I set anothe

  • Metalink Doc on FRM-41810 "Error Creating Menu" in oracle form

    Hi,       Can any one please send me the " RM-41810 "Error Creating Menu" , From the Metalink Document Thank you