Dynamic Text and changing Text in AS3

I have a Dynamic Text box in my Library.  I drag it to my main stage and give it a name..it is now a movieclip. The name is 'mcAdmin'.  I added an event listener for MOUSE_OVER.  I want the text to change color, but for now I'm just trying to change the text; however, it's not displaying the change in text I want.  I do a trace, and the change is in there on the output window, but it is not displayed as such.  How can I :
1) use AS3 to change the font color of the text
2) use AS3 to change the text and have it display?
function onMouseOver_txtAdmin(e:MouseEvent):void
Mouse.cursor="button";
//Current mcAdmin text is 'Administration'
//I want to change the color of Administartion on Mouse_Over
//but to test if I can get to anything, I'm just trying to change the text.
mcAdmin.text="Hello";
trace(mcAdmin.text);
mcPPMB.alpha=.5;
mcASB.alpha=.5;
mcISO.alpha=.5;
mcEA.alpha=.5;
mcAdmin.alpha=1;
mcAdmin.scaleX=1.25;
mcAdmin.scaleY=1.25;
Thanks.

1st
give the textfield a name, if it hasn't already (sounds like you put it in a movieclip).
to change the text set the text property of your text field
like this
myTextField_txt.text = "here is the text";
or if it is inside a movieclip
myClip_mc.myTextField_txt.text = "here is the text";
To change the color you would need to put a TextFormat on it. To keep the same fontsize, font etc. you could first get the TextFormat from your existing Textfield, change the color of the TextFormat and set it on the TextField.
// get the Textformat of the first character
            var TF:TextFormat = myTextField.getTextFormat(0,1)
// set the font color
            TF.color = 0xff0000;
// put it on the whole text
            myTextField.setTextFormat(TF)

Similar Messages

  • Folder action to find and replace text and change line feeds

    I want to use a folder action to find and replace text and change Mac carriage returns to DOS line feeds inside text files.
    The text to be replaced is: "/Users/wim/Music/iTunes/iTunes Music/Music" (without the quotes)
    This text has to be removed (i.e. replaced by an empty string)
    The text occurs many times within each file.
    The files are playlists exported from iTunes in the M3U format (which are text files). They contain Mac carriage returns. These need to be changed to DOS line feeds.
    I have found the following two perl commands to achieve this:
    To find and replace text: perl -pi -w -e 's/THIS/THAT/g;' *.txt
    To change carriage returns to line feeds: perl -i -pe 's/\015/\015\012/g' mac-file
    I know that it's possible to make a folder action with Automator that executes a shell script.
    What I want to do is drop the exported playlists in M3U format in a folder so that the folder action will remove the right text and change the carriage returns.
    My questions are:
    Is it possible to make a folder action that executes command line commands instead of shell scripts?
    What is the correct syntax for the two commands when used in a folder action shell script? Especially, how do I escape the slashes (/) in the string to be removed?
    Thanks for your help

    Ok, I've include an applescript to run a shell command. The applesript command quoted form makes a string that will end up as a single string on the bash command line.  Depending on what you want to do, you may need multiple string on the bash command lines.  I've included some information on folder actions.
    It is easier to diagnose problems with debug information. I suggest adding log statements to your script to see what is going on.  Here is an example.
        Author: rccharles
        For testing, run in the Script Editor.
          1) Click on the Event Log tab to see the output from the log statement
          2) Click on Run
        For running shell commands see:
        http://developer.apple.com/mac/library/technotes/tn2002/tn2065.html
    on run
        -- Write a message into the event log.
        log "  --- Starting on " & ((current date) as string) & " --- "
        --  debug lines
        set desktopPath to (path to desktop) as string
        log "desktopPath = " & desktopPath
        set unixDesktopPath to POSIX path of desktopPath
        log "unixDesktopPath = " & unixDesktopPath
        set quotedUnixDesktopPath to quoted form of unixDesktopPath
        log "quoted form is " & quotedUnixDesktopPath
        try
            set fromUnix to do shell script "ls -l  " & quotedUnixDesktopPath
            display dialog "ls -l of " & quotedUnixDesktopPath & return & fromUnix
        on error errMsg
            log "ls -l error..." & errMsg
        end try
    end run
    How to set up a folder action.
    1) right click on folder. click on Enable folder actions
    2) Place script in
    /Library/Scripts/Folder Actions Scripts
    3) right click on folder. click on attach folder action
    pick your script.
    Create a new folder on the desktop & try.
    You can put multiple folder actions on a folder. There are other ways of doing this.
    Here is my test script:
    on adding folder items to this_folder after receiving dropped_items
        repeat with dropped_item_ref in dropped_items
           display dialog "dropped files is " & dropped_item_ref & " on folder " & this_folder
        end repeat
    end adding folder items to
    How to  make the text into an AppleScript program.
    Start the AppleScript Editor
    /Applications/AppleScript/Script Editor.app
    In Snow Leopard it's at: /Applications/Utilities/AppleScript Editor
    Copy the script text to the Applescript editor.
    Note: The ¬ is typed as option+return.  ption+return is the Applescript line continuation characters.
    You may need to retype these characters.
    Save the text to a file as an script and do not check any of the boxes below.

  • I used to have a +.- displayed in upper left corner to click and change text size. My sister used my computer and now I can no longer find this feature.

    I used to have a +.- displayed in upper left corner to click and change text size. My sister used my computer and now I can no longer find this feature

    Do you still have all toolbars visible (View > Toolbars)?
    Did you use an extension or the standard zoom buttons that you can find in the toolbar palette in the View > Toolbars > Customize window ?
    Press F10 or tap the Alt key to bring up the "Menu Bar" temporarily.

  • Dynamically create and remove TEXT items in forms

    Hi Guys,
    Is there a way to dynamically create and remove TEXT items in form. For example I have the EMP and DEPT table and when
    I select the EMP table name from the LOV, rows of the EMP table with column name and data should get displayed on the screen and likewise a similar action for DEPT table and
    so on. I have about 90 tables from where data could be required to view and edit. They all have varying number of columns.
    Any suggestions ?
    Thanks
    KMD
    null

    Use OLE concept of developer and map Excel as an object
    Nadeem
    null

  • InDesign CC 2014 very slow performance when dragging images and changing text

    InDesign CC 2014 very slow performance when dragging images and changing text.
    Running on 2010 Macpro 2.4GHz. 8GB RAM. Any solutions? I've read through many forums on this and tried several fixes.

    Have exact same issue on  my Windows 7 machine. Resetting preferences is a workaround.
    So I start InDesign whilst holding down these keys.
    Ctrl + Alt + Shift (Windows) or Cmd + Ctrl + Opt + Shift (Mac)
    Whilst inDesign is usable again with this fix- I have to do it every time so it trashes all my preferences so NOT GOOD long term fix. Otherwise InDesign freezes and can only be stopped by forcing a quit.
    I have manually deleted the preference files and I have created a brand new admin account - but still no luck - will be onto support tomorrow

  • PO Header Texts and item texts

    Dear Experts
                        PO header texts and item texts are stored in which table. please tell me the table name.
    Here i have configured PO version management. in that i want to control some sensitive fields change only version management will get triggered. it is done through  for this i have configured the sensitive fields in PO Print relevant changes. in that config the PO header texts and item texts table and field name is not exist.
    Now i have change the PO through me22n in header texts version management is triggered for this. i want to control this if some body change the po header texts and item texts version management should not triggered.
    is it possible.
    Regards
    Anand.

    Hai,
    Try this  table STXH.
    Get the required information(input) for the function module 'READ_TEXT'.
    CALL FUNCTION 'READ_TEXT'
          EXPORTING
            ID                            = 'ST'
            LANGUAGE                      = sy-langu
            NAME                          = thead-tdname
            OBJECT                        = 'TEXT'     
        ARCHIVE_HANDLE                = 0
        LOCAL_CAT                     = ' '
      IMPORTING
        HEADER                        =
          TABLES
            LINES                         = lines
         EXCEPTIONS
           ID                            = 1
           LANGUAGE                      = 2
           NAME                          = 3
           NOT_FOUND                     = 4
           OBJECT                        = 5
           REFERENCE_CHECK               = 6
           WRONG_ACCESS_TO_ARCHIVE       = 7
           OTHERS                        = 8
        if sy-subrc eq 0.
          loop at lines.
            wa_HEADER_TEXTS-TEXT_FORM = lines-TDFORMAT.
            wa_HEADER_TEXTS-TEXT_LINE = lines-TDLINE.
            append wa_HEADER_TEXTS to lt_tmp_HEADER_TEXTS.
          endloop.
    Better take the help of abaper.
    With Regards,
    Jaheer

  • SAP SCRIPT Header text and Item text not printing in customized PO

    Hello Experts,
                          I have copied the standard MEDRUCK to ZMEDRUCK and customized the form according to the requirement.
    I want to print the header text and Item text in my form.
    For Header text I have used :
    /: INCLUDE &EKKO-EBELN& OBJECT EKKO ID F01
    Problem 1: The text what I enter in header text is flowing only when I hit on print preview without saving the form. Once I save the SAP SCRIPT  and click on print preview the field is appearing blank. I also tried to print the form, but the field is appearing blank even on the print out.
    Problem 2: For item text the field is concatenation of  EBELN & EBELP. Can anyone suggest me how to concatenate and fetch the text in item text.

    Hi,
        Im getting an error in my subroutine pool for i_xtline which is to fetch ITEM TEXT., It says its not a in any internal table nor defined as data. How can I proceed further. I have pasted my code below. Please check and revert ASAP
    PROGRAM  ZMEDRUCK_SUBP1.
    TABLES: EKPO, EKKO.
    FORM fetch_table_data TABLES in_tab STRUCTURE itcsy
                                 out_tab STRUCTURE itcsy.
    data xname like THEAD-TDNAME.
    data i_xtline like xtline.
    clear i_xtline.
    refresh i_xtline.
    CONCATENATE EKPO-ebeln EKPO-ebelp INTO v_item_text.
    MOVE v_item_text to ITEMTXT.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
      CLIENT                        = SY-MANDT
        id                            = F01
        language                      = EN
        name                          = ITEMTXT
        object                        = EKPO
      ARCHIVE_HANDLE                = 0
      LOCAL_CAT                     = ' '
    IMPORTING
      HEADER                        =
      tables
        lines                         = i_xtline
    EXCEPTIONS
       ID                            = 1
       LANGUAGE                      = 2
       NAME                          = 3
       NOT_FOUND                     = 4
       OBJECT                        = 5
       REFERENCE_CHECK               = 6
      WRONG_ACCESS_TO_ARCHIVE       = 7
      OTHERS                        = 8
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.

  • Purchase requisition - Header Texts and Item Texts

    Hi,
    In Creating Purchase requisition if we enter the Header note text and Item text, in which table these texts will be stored.
    Regards,
    Ram

    Hi,
    To see any text go to the detail of that text you will have a magnify button below that text click there you will get the stand text editor open.
    Click on GOT->Header it will give the information you need to get this text via function module 'READ_TEXT' they are sored in STXH.
    Points if find this helpful
    Regards,
    Yakub Shah

  • Purchased Acrobat XI Pro - was able to edit text and add text and now does not allow me to do anything -

    was able to edit text and add text and now does not allow me to do anything - Except purchase the software again.Can't find an answer to this anywhere.

    Use Adobe Acrobat, not Adobe Reader.

  • Regarding subtotal text and total text

    Hi All,
    can any body provide example program for ALV total text and subtotal text both using REUSE_ALV_GRID_DISPALY.  and
    using OOPS.
    @@@MODERATOR::    Please dont lock my threads.I have been searching since 2 days for this example and i tried with the provided examples .but they are not worked out ::
    FOr your information :
    Some of the links i searched in SDN: 
    http://wiki.sdn.sap.com/wiki/display/ABAP/ALVDisplayTotalTextOrSubtotalText
    Re: SubTotal Text in ALV?
    http://wiki.sdn.sap.com/wiki/display/ABAP/ALVStandardSumTotalOr+Subtotal

    Hi Naveen,
    If you are looking for specific Subtotal text in ALV Grid, then i think it is not possible.
    You can use SORT table to get sub-totals based on the columns that you display.
    Generally the record existing on the column based on which you sort the table, appears as the sub-total text automatically.....
    You can try giving Subtotal text in the LAYOUT as well and pass the layout to the ALV function module.
    Best Regards,
    Ram.

  • Item texts and header texts

    hi,
    In which table item texts and header texts avialable.
    Edited by: Ramesh villa on Apr 11, 2009 4:49 PM

    Dear,
    For any queries (simple) recommended to search on group by entering simple search words of your quenry. You will find maximum solved questions.
    Re: PO header and item texts
    Regards,
    Syed Hussain.

  • Creation of short text and long text?

    Hi,
    We create short text by using oe_fnd_attachments_pub.create_short_text_document and oe_fnd_attachments_pub.add_attachment API and to create long text we use fnd_documents_pkg.insert_row .
    Why is it that we have different approaches for creation of short text and long text?
    I know that oe_fnd_attachments_pub.add_attachment is used to attach a short text to some entity,but then why we dont do the same for long text?
    Please lemme knw urgently ...
    Thanks and Regards
    Amar

    Thanks for the help,
    I looked into the document and i got to know few things as to how short and long text are created, but can u tell when the records are inserted into fnd_attached_documents, because i can see that records are inserted into fnd_attached_short_text and fnd_attached_long_text, fnd_documents but i dont see any insertion into fnd_attached_documents, can u lemme knw how and when it is done?

  • Is there a method in labviewto dynamically save and change the monitor resolution under program control?

    Is there a method in labview to dynamically save and change the monitor resolution under program control? I have another application that runs on another monitor. I would like to change the monitor resoultion to 640x480 on program startup, and then restore the monitor resolution back to the user's settings on exit. Can this be done?

    vaidehi_joshi wrote:
    Is there a method in labview to dynamically save and change the monitor resolution under program control? I have another application that runs on another monitor. I would like to change the monitor resoultion to 640x480 on program startup, and then restore the monitor resolution back to the user's settings on exit. Can this be done?
    Have you already done this manually?  I've seen Labview scale front panels very strangely when changing resolutions...
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Display header text and item text in smartform

    Hi all,
    I have to display header text and item text of PO in smartform BBP_SUSPO.
    So how to do that.. I have to use 'read_text' Fm or directly i can get values from any table ???
    Thanks in  advance.
    Regards,
    Anagha Deshmukh

    Hi Amit,
    I have used inculde text that is avalable in smartforms to display header & Item text in this way
    For header :
    Text Name         Header guid
    Text Object       BBP_PD
    Text ID           HTXT
    Language          EN
    For Item:
    Text Name         Item Guid
    Text Object       BBP_PD
    Text ID              ITXT
    Language          SY-LANGU
    U can used this attributes in read_text function mdule also.
    Thanks & Regards,
    Anagha Deshmukh

  • Create mirror text and stroke text in AI Scripting

    Hello All,
    Please help me with the Script of creating mirror text and stroke text in Adobe illustrator scripting.
    Thanking you.
    With Regards
    Sawlay Singh.

    second: mark your answers as correct if you're helped, or at least come back and say "thanks"
    remember 'dinner for one'?
    http://forums.adobe.com/thread/1146984

Maybe you are looking for

  • IPod touch 4th gen (restore problem, unknown error 9)

    So I was using an app on my iPod touch, but then suddenly the screen froze and turned white. Then it would shut off and get to the apple logo, then slowly fade out to all white and restart. This happened continuously and I couldn't get it to stop whe

  • Updated xml schema not reflected in Import Manager and Syndicator

    Hi all, We have a perfectly running MDM scenario using custom XML schema for import and syndication. I have now updated the schema by adding a couple of fields to the schema and uploaded the new schema to MDM using Console - Admin - XML Schemas, and

  • OS X get "frozen" often while I run in internet ...

    Hi people, I remark that in that often my mac get "frozen" suddenly and I have to restart holding down the power key for few seconds..that's happend also 5-6 time pro day..sometimes less. After restarting, it says that OS X shut down and ask me to se

  • Help on using AWR report

    we use ORACLE 11.1.0.7. We have couple of processes that run for about 2 to 3 hours which are scheduled to run after 6 pm. When these processes run, currently users are not allowed to access the system . So last week we ran these processes with 30 to

  • AGO function error in Pivot Table

    Hi, I have a typical time dimension - year, period, week, date. Most of my facts are available at the most detailed level of date however I have some Budget facts that are only available at the week level. When I combine these facts in a report I am