Default AS3 Text component bounce effect help

I tried posting this in an Actionscript forum without much
help. I hope someone here can point me in the right direction.
So I need help trying to figure out how to add an AS3 effect
to an AS3 Text component.
var savedNote.Text = new Text();
savedNote.text = "Selected options have been saved!";
savedNote.visible = false;
var submitButton.Button = new Button();
submitButton.label = "Save selected options";
submitButton.addEventListener(MouseEvent.CLICK,
onSubmitButtonClickedHandler);
public function
onSubmitButtonClickedHandler(event:Event):void
//here set the visible for the text to true but i want a
bouncing effect
// to be applied to the text component "savedNote" each time
the button is clicked - HOW
savedNote.visible = true;
so each time the user clicks on the button I want the text to
appear the first time and then have a bouncy effect so that the
user know the action to save when button is clicked actually took
place.
HOW do I do this with AS3??? Thank you! if anyone can point
me to online tutorials that would be great!

Pasting your code right into my Flash file works well for me. Are you able to see the text in a black color? Are you able to change everything else except for the color?

Similar Messages

  • Line highlighting in Text Component

    I'm trying to figure out how to apply a colored background to certain lines of a text component. This is common, for instance, in a lot of editors, especially IDE's (notably, Eclipse), where the currently selected line has a separate background color from the rest of the page. I'm having a lot of trouble understanding how to use Elements and Views and EditorKits and all that, and I'm not even sure if that will solve the problem. All I've been able to do so far is put a colored background behind individual characters; but then it stops at the end of the line, instead of continuing for the width of the text component.
    Any help is greatly appreciated.

    I assumed you were using the built-in Highlighter classes to do the coloring. If you aren't, you're doing a lot more work than you need to. Here's what I use:import java.awt.Color;
    import javax.swing.event.ChangeEvent;
    import javax.swing.event.ChangeListener;
    import javax.swing.text.*;
    * Usage: new CurrentLineHighlighter(myColor).install(myTextComponent);
    public class CurrentLineHighlighter implements ChangeListener
      static final Color DEFAULT_COLOR = new Color(0, 0, 0, 15);
      private Highlighter.HighlightPainter painter;
      private Object highlight;
      private JTextComponent comp;
      public CurrentLineHighlighter()
        this(null);
      public CurrentLineHighlighter(Color highlightColor)
        Color c = highlightColor != null ? highlightColor : DEFAULT_COLOR;
        painter = new DefaultHighlighter.DefaultHighlightPainter(c);
      public void install(JTextComponent tc)
        comp = tc;
        comp.getCaret().addChangeListener(this);
      public void stateChanged(ChangeEvent evt)
        if (highlight != null)
          comp.getHighlighter().removeHighlight(highlight);
          highlight = null;
        int pos = comp.getCaretPosition();
        Element elem = Utilities.getParagraphElement(comp, pos);
        int start = elem.getStartOffset();
        int end = elem.getEndOffset();
        try
          highlight = comp.getHighlighter().addHighlight(start, end, painter);
        catch (BadLocationException ex)
          ex.printStackTrace();
    }

  • How to avoid sorrouding p tag added by the default text component on editing a text in a page

    We are using Default Text component(foundation/components/text) within a CQ5 Page. The text component is automatically adding a <p> tag surrounding the text in the text area. We would like to control this behavior of auto addition of the <p> tag in the text component. Please suggest us a solution to avoid the <p> tag around the text.
    Here is the brief backgroud- We are doing a migration of html pages into CQ5. The editable sections of the page are converted to CQ5 Text components with in the page. While we are creating the page from the backend, we are not adding the <p> tag surrounding the page. However after creating the page, if users goes to the page and edits a text block within a page, the additional <p> tags are getting added which is disturbing the styling.
    Let us know if we need to provide more information on this.
    Thanks & Regards,
    Vamsi

    Hi Vamsi,
    I am facing same kind of issue.
    As of now I am thinking of overritng the css applied by this <p/> tag.
    If this p tag is fallowing same strucute then though of putting reqular expression to catch hold of this tags on the page.
    Some thing like it always creates with id
    <p id="cq-gen246"></p>
    <p id="cq-gen253"></p>
    <p id="cq-gen254"></p>
    Do you have any better approach..

  • Need help with Bounce effect

    Hi, I'm using Flash CS3 but I'm working in Actionscript 2.0.
    What I'm trying to do is a simple bounce effect for an png image in
    a banner that I'm working on. Right now I have the 90 px image
    right above the 728x90 stage. I want it to bounce down into place
    onto the stage. I selected the image, converted it to a movie clip
    and named the instance of the clip girl_mc. Then I created an
    Actions layer, selected the first frame of that layer, and opened
    my Action panel. Here's the code I used to get the bounce effect
    but it's not working...
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    new Tween(girl_mc,"_y",Bounce.easeOut,girl_mc._y,45,3,true);
    The 45 is the position I want it to end up at (which is right
    in the middle of the 90 pixel stage).
    Can anyone let me know what I'm doing wrong? Big thanks in
    advance!

    Actually, you're right, when I worked up the file from
    scratch the bounce effect worked fine. Question, I have two objects
    I want to bounce (girl_mc and weight_mc). I want the weight one to
    start bouncing into place about a half second or second after the
    girl one. How would I do that? I tried dragging the weight_mc movie
    clip to the 10th frame on the timeline and the whole thing didn't
    work. I also tried creating a keyframe on the actions layer at the
    10th frame and putting the weight_mc actionscript there and again
    the whole thing didn't work. Any suggestions?

  • Please help with choosing the right text component

    Hello,
    In my applet, I need a single-line text component with the following capabilities:
    1: Support for bold font (entire text,not just part of it)
    2: Support for underlined text (entire text,not just part of it)
    3: Support for blinking text
    4: Ability to put caret anywhere within the text field with mouse
    5: Support for field validation
    6: Ability to handle various key events and modify the text and/or move around caret position accordingly.
    Now, I know there are at least 4 different text components: JTextField, JTextArea, JEditorPane, JTextPane. Which one of these is most suitable for the above features? Is it possible to use JTextField to support all of the above?

    Here is a link to the Java Swing tutorial which discusses the text components.
    http://java.sun.com/docs/books/tutorial/uiswing/components/text.html
    I think you need to use a JEditorPane or a JTextPane (although I'm not sure any of the components support blinking text). A demo program shows some of the capabilities of these components:
    http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html

  • Dynamically resize a text component

    I am trying to build a simple twitter application.  I pull in the feed from twitter and set it to an arrayCollection.  This information is passed to a list component as a dataProvider.  The list contains a itemRenderer that pulls in a custom component for displaying the information I want from Twitter.  Here is the code for the component called Tweet:
    <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" verticalScrollPolicy="off">
        <mx:Image width="50" height="50" source="{data.link[1].href}" />
         <mx:Text width="100%"  id="twitterText" text="{data.title} {'\n'} {data.author.name} {data.published}" /> 
    </mx:HBox>
    pretty simple.  The problem is, the text componnent does not resize its height to the amount of text, so my text is cut off.  If i set a static height, I have too much white space on short tweets.  I have tried changing the height with AS3 but can't seem to get it to work.  Any ideas?
    Here is the the list component I am using:
      <mx:Canvas width="100%" height="100%" x="0" y="100" backgroundColor="#FF0000" borderStyle="none">                       
                <mx:List dataProvider="{ac}" itemRenderer="Tweet" top="58" left="0" right="0" bottom="40" id="theList"></mx:List>
       </mx:Canvas>
    Oh and if it helps,  I am using the same method Lee Brimelow teaches in his 3 beginner Flex tutorials on his site gotoandlearn.com

    I finally figured out the problem.  The problem was not with the text component but rather the list component.  Here is my list component now:
    <mx:List dataProvider="{ac}" itemRenderer="Tweet" id="tweetList" top="0" left="0" right="0" bottom="145" themeColor="#A5A5A5" variableRowHeight="true"></mx:List>
    I ran across the property variableRowHeight.  It defaults to false.  When set to true, each item in the list can be a different size.  The textarea was resizing correctly.

  • How to email text from a text component in my applet on a the host server ?

    How to email text from a text component in my applet on a the host server, back to my email address ?
    Assuming I have Email Form on the host server.
    Help will be appreciated.

    You can do like below
    =REPLACE(Fields!Column.Value," " & Parameters!ParameterName.value & " ","<b>" & Parameters!ParameterName.value & "</b>")
    The select the expression and  right click and choose placeholder properties
    Inside that set Markup type as HTML 
    then it will highlight the passed parameter value in bold within the full xml string
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Feature Request - Editable Illustrator Text in After Effects

    Hello,
    I would absolutely love it if I could convert text from Illustrator to editable text in After Effects. For most animated videos this is a pretty basic workflow that would help out so much. Right now the only solution appears to be having a "guide layer" of sorts with all your text on it, and then copying and pasting the text from AI to AE and then lining it up with the guide layer. Can be a very tedious process if you are working on a project with a lot of text. Most shots are designed in AI before going into AE which is why the text is already laid out.
    Thanks!
    Remington

    Yes, we know that! But we are dealing with projects which have vast amounts of text and elements composed in Illustrator and increasingly InDesign. Maybe the key would be for Illustrator and Indesign to have a dedicated export function to AfterEffects. Not much to ask considering how many people around the planet use this workflow. I would pay for an AE script if it was available.

  • Default Header text comes in PO at the time of creation

    Hi Friends,
                   my problem is that a default Header text must come on the PO based on the user or purchasing group at the time Creation (In Transaction ME21N).
    Is there any user exits or badi for it. I have already searched for them but i have not got any thing. Please help me.
    Thanks for ur valuable answers

    yes i know that through copy control we can get default text but it is item level text instead of the header text.and other thing it does not depend on the user or purchasing group. I default header text that is populated imediately when user call ME21N. So is there any BADI or user exit for that.Please reply.
    Thanks for ur reply and valuable answers
    null

  • Center text in a text component with line wrapping

    I need to display dynamic text in a text component. I need line wrapping (on work boundaries) and also need horizontal and vertical center alignment.
    How do I do this? I saw a previous post on aligning text in a JTextArea that said to use a JTextPane but I don't see in JTextPane how to do word wrapping.
    Thanks,
    John

    //  File:          SystemInfoWindow.java.java
    //  Classes:     SystemInfoWindow
    //  Package:     utilities.msglib
    //  Purpose:     Implement the SystemInfoWindow class.
    //     Author:          JJB 
    //     Revision History:
    //     Date            By   Rel#  Description of change
    //     =============  ===  ====  ===============================================
    //     Jul 3, 2006   JJB  1.00  Original version
    //  Public Types / Classes          Type Description
    //  ========================     =============================================
    //     SystemInfoWindow
    package utilities.msglib;
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTextArea;
    import javax.swing.JTextPane;
    import javax.swing.SwingUtilities;
    * TODO Enter description
    class SystemInfoWindow extends JDialog {
          * @param args
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        Test thisClass = new Test();
                        thisClass.setVisible(true);
                        SystemInfoWindow window = new SystemInfoWindow(thisClass);
                        window.setMessage("System shutdown in progress ... lot sof atatarte athis tis a sa logoint of tesxt it keeps going and going and going thsoreoiat afsjkjslakjs fshafhdskrjlkjsdfj");
                        window.setVisible(true);
         //     ------------------------  Inner Classes ---------------------
         static class Test extends JFrame {
              private JPanel jContentPane = null;
               * This is the default constructor
              public Test() {
                   super();
                   initialize();
               * This method initializes this
               * @return void
              private void initialize() {
                   this.setSize(300, 200);
                   this.setContentPane(getJContentPane());
                   this.setTitle("JFrame");
               * This method initializes jContentPane
               * @return javax.swing.JPanel
              private JPanel getJContentPane() {
                   if (jContentPane == null) {
                        jContentPane = new JPanel();
                        jContentPane.setLayout(new BorderLayout());
                   return jContentPane;
         //     ------------------------  Static Fields ---------------------
         private static final long serialVersionUID = -8602533190114692294L;
         //     ------------------------  Static Methods --------------------
         //     ------------------------  Public Fields ---------------------
         //     ------------------------  Non-Public Fields -----------------
         private JPanel jContentPane = null;
         private JTextPane textField = null;
         public SystemInfoWindow(JFrame frame) {
              super(frame);
              initialize();
              //setUndecorated(true);
              setLocationRelativeTo(frame);
              pack();
         //     ------------------------  Interface Implementations ---------
         //     ------------------------  Public Methods --------------------
         public void setMessage(String text){
              textField.setText(text);
              adjustSize();
         //     ------------------------  Non-Public Methods ----------------
         private void adjustSize(){
              Dimension oldSize = textField.getPreferredSize();
              textField.setPreferredSize(new Dimension(
                        oldSize.width, oldSize.height + 30));
              pack();
         //     ------------------------  Generated Code --------------------
          * This method initializes this
          * @return void
         private void initialize() {
              this.setSize(300, 200);
              this.setModal(true);
              this.setContentPane(getJContentPane());
              this.addWindowListener(new java.awt.event.WindowAdapter() {
                   public void windowOpened(java.awt.event.WindowEvent e) {
                        //setLocationRelativeTo(MsgLibGlobals.parent);
                        pack();
          * This method initializes jContentPane
          * @return javax.swing.JPanel
         private JPanel getJContentPane() {
              if (jContentPane == null) {
                   jContentPane = new JPanel();
                   jContentPane.setLayout(new BorderLayout());
                   jContentPane.setMaximumSize(new java.awt.Dimension(50,2147483647));
                   jContentPane.add(getTextField(), java.awt.BorderLayout.CENTER);
              return jContentPane;
          * This method initializes textField     
          * @return javax.swing.JTextPane     
         private JTextPane getTextField() {
              if (textField == null) {
                   textField = new JTextPane();
                   textField.setEditable(false);
                   textField.setMaximumSize(new java.awt.Dimension(20,2147483647));
              return textField;
    }Message was edited by:
    BaltimoreJohn

  • In Flash CS4,How can I give a AS3 List Component a suitable horizontalScrollBar

    In Flash CS4 when an AS3 List Component has too many rows,it will has a verticalScrollBar automatically. but it will never has a horizontalScrollBar even a part of the content of the list is hidden.
    I set the property  list.horizontalScrollPolicy="on",and set list.maxHorizontalScrollPosition=200; then the horizontalScrollBar appear
    but when I click the item of the list, all the list move to left, half of the list is hidden,
    I can only see the right part of the list, the I click the list again,the list move to right,then I can see all the list by move the horizontalScrollBar
    How can I give a suitable horizontalBar to the AS3 list component?

    Thank you for your help! (sorry,I`m bad in English...)
    In fact, it works.
    but,I made a mistake,the reason I want to give a list a horizontalScrollBar is:I want to show all content in a list that is not wide enough,
    you see,first row can show all content in this list,but in the other rows,the content is too wide to show,I want to give the list a horizontalScrollBar to show all content by draging the horizontalScrollBar to right.
    now,set property:
    list.horizontalScrollPolicy="on", list.maxHorizontalScrollPosition=30;(the result is the image above),when I drag the horizontalScrollBar to right:
    ah ha ,the row can`t show all content too,the horizontalScrollBar is related to the width of all the list, is not related to the width of the content in every row.
    now I kown why the horizontalScrollBar is always disable.
    but in design,to show a lot of content,we can`t draw  a list too wide, it`s not beatiful,so I want to use a horizontalScrollBar to show all content in every row.
    and the list is not too wide
    ah ah,  like the list in Flex4
    In fact,ah,I have not studied Flex 4,so,I have to make it by using Flash CS4 Component
    How can I do? Please
    (so sorry for my bad English,I do my best in it)

  • Formatting HTML Text in Text component

    Hi all,
    I'm trying to render some Html text in a text component, I'm
    getting the HTML from within an xml document as such:
    <xml><htext><p><b>Testing HTML
    Text</b></p><p>Here's another
    line.</p></htext></xml>
    If I put that into a Text component with the htmlText=htext
    property, the line spacing is as expected, but it seems to add in a
    blank space character for every character of the html code. (E.g.
    "<b>Testing" adds 3 extra spaces before the word "Testing").
    Renders like (using - as space character):
    Testing HTML Text
    -Here's another line.
    If I use the condeseWhite=true property on the Text
    component, it fixes the extra space characters issue, but then
    stuffs the line spacing up, so <p> becomes rendered like a
    <br>.
    Renders like:
    Testing HTML Text
    Here's another line.
    Any thoughts, or help is much appreciated, thanks in advance.
    Oz
    P.S I was trying to avoid the obvious "br" tag which will
    make it work and render correctly....
    <p><b>Testing HTML Text</b></p>
    <br/><p>Here's another line.</p>

    no. use css.

  • Output text component new line

    HI Team,
    I am picking up a value from resouce bundle for output text component.
    I wish to display data in output text component to display data after a new line.
    Suppose the message is coming as How are you.Welcome
    Now it should come as
    How are you
    Welcome
    Any help how is this achievable.
    I am working on Jdev 11.1.1.6
    Regards,
    Ajay

    Hi Team,
    The issue is resolved now.
    I have changed the escape property of output text component. to false so as to avoid the <br /> being HTML-escaped. and at the value level have used like
    <af:outputText value="#{XX.YOUR_REQUEST_HAS_BEEN_SUBMITTE}&lt;br />&lt;br />#{XX.YOUR_REQUEST_HAS_BEEN_SUBMITTE1}"
                                         id="ot10" escape="false"/>
    Where XX.YOUR_REQUEST_HAS_BEEN_SUBMITTE=Value1 and YOUR_REQUEST_HAS_BEEN_SUBMITTE1=Value2 in my resource bundle file.
    Output is coming as
    Value1
    Value2
    Does any one know how can i mark it as correct , can't see it after the forums upgrade to new one.
    Message was edited by: Ajay

  • Retrieve RowSet and Display in Output Text Component

    To retrieve a row object, took more effort than I expected with this tool. I wanted to populate a simple output text component with a db object pulled from a row, and I binded it to the rowset column. It worked great, but it kept retrieving the first row, since in the JSP it was calling this:
    #{questionsetup.questionRowSet.currentRow['question']}
    To get it to increment rows per output text component I did this:
    questionRowSet.setDataSourceName("java:comp/env/jdbc/SelfService");
            questionRowSet.setCommand("SELECT ALL dbo.Question.quesId, dbo.Question.question, dbo.Question.lastChangeDate  FROM dbo.Question");
            questionRowSet.execute();
            questionRowSet.next();
            outputText3.setValue(questionRowSet.getString("question"));
            questionRowSet.next();
            outputText4.setValue(questionRowSet.getString("question"));
            questionRowSet.next();
            outputText5.setValue(questionRowSet.getString("question"));Is there another way to do this automatically? The Studio Creator way? Or is this correct? The Studio Creator help file explains how to bind a simple component, and using the binding, but it even says it will retrieve the data in the first row. Incremenet rows or specifying a specific one would really help!
    Thank you very much!

    Maybe take control of the Select statement myself...
    So I decided to get the MIN value of my ID
    like this
    "select MIN(T21id) AS ttt from persons"
    now this is valid in SQLyog
    BUT Creator says
    Description: An unhandled exception ...
    Exception Details: javax.faces.el.PropertyNotFoundException
    Invalid column name: BaseRemuneration
    nb why is this "unhandled" since it is inside a try block?
    why does it mention BaseRemuneration which is a completely different but valid column??
    So Sun Creator will accept an unknown subset of valid SQL commands, and give bizarre irrelevant exception error messages on the set of valid SQL statements that it doesnt like.
    The documents appear to state that MIN is not handled by the IDE but can be entered manually.
    In fact it can NOT be enmtered manually.
    So is there an accurate list of valid SQL that is accepted?

  • Java Text Component

    hello everyone, i need help regarding java swing Text component. I want to create a photo album in java. i tried to use JTextPane to view picture and text, and it works fine, but when i tried to make the JTextPane uneditable, the JTextPane display only the text without the picture.
    maybe you can suggest how to solve this problem or suggest me to use other java component. Thank you very much in advance for your help.

    JSplitPane

Maybe you are looking for

  • How do I keep my status bar at the top and not moving from side to side and bottom of phone

    how do I keep my status bar at the top of my phone? I let my grandsn play a game on my phone and after he gave it back I noticed my status bar would move from the top to the side or bottom etc

  • 100k black exporting to PDF as rich black

    Hey guys, I've rattled my brain for long enough over this issue, it's time to ask the wider community. When I export a pdf with any of my export profiles, all overprint 100k (black swatch) blacks are exported as CMYK. It doesn't matter if it's text o

  • Finding and linking to media used in project

    I appreciate Keynote very much. I'm wanting to be able to click on media elements within the "slides" and find their source location on my drive. I can do this in Final Cut Pro with a File menu item called "Reconnect Media". I can find no such method

  • Encrypted e-mail to a shared mailbox

    Hi, We have four users who share a mailbox, and need to be able to receive encrypted e-mail. Each of them has a certificate that is published to the global address list. Does anyone know how to set things up so that others can send encrypted e-mail t

  • Why can't I use the Harley Davidson 1,7,1 theme

    The Harley Davidson 1.7.1 theme I've installed will not run. If I go to the tool bar click 'tools' then click 'Add Ons" A box opens that lists default and Harley Davidson 1.7.1 and under the Harley Davidson it says "use theme" and "uninstall" with on