Load text and color into text box

I am trying to create code that will load text from an external file and change the background of a text box when a button is clicked.
When I compile the movie and click the button some text appears in the text box but not the text I was extecting and there is no color change.
The output panel displays the following message
"Fonts should be embedded for any text that may be edited at runtime, other than text with the "Use Device Fonts" setting. Use the Text > Font Embedding command to embed fonts"
So far I am just trying to get the blue button to work
This is the code
Thanks
import flash.events.MouseEvent;
import flash.net.URLLoader;
import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.Event;
var drawLine:MovieClip = new MovieClip();
var color:Number = 0x6600cc
addChildAt(drawLine, 1);
//addChildAt(blackRectangle, 0);
stage.addEventListener(MouseEvent.MOUSE_DOWN, startDrawing);
stage.addEventListener(MouseEvent.MOUSE_UP, stopDrawing);
function startDrawing(event:MouseEvent):void{
drawLine.graphics.lineStyle(3, color);
drawLine.graphics.moveTo(mouseX, mouseY);
stage.addEventListener(MouseEvent.MOUSE_MOVE, makeLine);
function makeLine(event:MouseEvent):void{
drawLine.graphics.lineTo(mouseX, mouseY);
function stopDrawing(event:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, makeLine);
blueBtn.addEventListener(MouseEvent.CLICK, colorBlue);
function colorBlue(event:MouseEvent):void{
          color = 0x0000ff;
          textLoad("../text/colorBlue.txt", color);
redBtn.addEventListener(MouseEvent.CLICK, colorRed);
function colorRed(event:MouseEvent):void{
          color = 0xff0000;
randomBtn.addEventListener(MouseEvent.CLICK, colorRandom);
function colorRandom(event:MouseEvent):void{
          color = Math.random()*0xff55aa;
clearBtn.addEventListener(MouseEvent.CLICK, clearScreen);
function clearScreen(event:MouseEvent):void{
drawLine.graphics.clear();
var loader:URLLoader = new URLLoader();
function textLoad(file:String, color:uint):void{
          loader.load(new URLRequest(file));
          colorText.backgroundColor = color;
loader.addEventListener(Event.COMPLETE, displayText);
function displayText(e:Event):void{
          colorText.text = loader.data;

As far as the text goes, embed the font for the textfield ti get rid of the warning.
If you are not getting the background color to change, did you give your textfield a background to begin with?  The code you have to change its color will work if it has a background.

Similar Messages

  • I want to change the size and color of text in call out boxes and text boxes. How can I do this? Jack

    I want to change the size and color of text in call out boxes and text boxes. How can I do this? Jack

    Highlite the text inside the text box and then press Ctrl+E.

  • Cant copy text and paste into google search box

    i like to copy text an paste instead of repeatedly typing and the paste function in the right click menu is greyed out. cant paste

    SUPPLEMENT TO MY PREVIOUS POST
    The copy and paste into dialog boxes works just fine.  I suspect that my earlier problem was due to not being familiar with the new computer's keyboard.  I am used to the CTRL key being located at the bottom left of the keyboard.  The new keyboard has the Fn key in that position.  I must have pressed Fn instead of CTRL.  The old habits die hard.  I feel like for not noticing this earlier.

  • Facebook is not loading properly and all my text and images are lined up along the right side of the page. How can this get fixed to the way it use to be?

    Facebook is not loading properly and all my text and images are lined up along the right side of the page. How can this get fixed to the way it use to look?
    Everyone who logs into Facebook on my Firefox has this problem however if we use Internet Explorer - facebook looks normal.

    If you have increased the minimum font size then try the default setting "none" as a high value can cause issues like you described.
    * Tools > Options > Content : Fonts & Colors > Advanced > Minimum Font Size (none)
    *Tools > Options > Content : Fonts & Colors > Advanced > [X] "Allow pages to choose their own fonts, instead of my selections above"

  • How to load date and time from text file to oracle table through sqlloader

    hi friends
    i need you to show me what i miss to load date and time from text file to oracle table through sqlloader
    this is my data in this path (c:\external\my_data.txt)
    7369,SMITH,17-NOV-81,09:14:04,CLERK,20
    7499,ALLEN,01-MAY-81,17:06:08,SALESMAN,30
    7521,WARD,09-JUN-81,17:06:30,SALESMAN,30
    7566,JONES,02-APR-81,09:24:10,MANAGER,20
    7654,MARTIN,28-SEP-81,17:24:10,SALESMAN,30my table in database emp2
    create table emp2 (empno number,
                      ename varchar2(20),
                      hiredate date,
                      etime date,
                      ejob varchar2(20),
                      deptno number);the control file code in this path (c:\external\ctrl.ctl)
    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime, ejob, deptno)this is the error :
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 5
    C:\>any help i greatly appreciated
    thanks
    Edited by: user10947262 on May 31, 2010 9:47 AM

    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime, ejob, deptno)Try
    load data
    infile 'C:\external\my_data.txt'
    into table emp2
    fields terminated by ','
    (empno, ename, hiredate, etime "to_date(:etime,'hh24:mi:ss')", ejob, deptno)
    this is the error :
    C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
    SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 5
    C:\>
    That's not an error, you can see errors within log and bad files.

  • Is there a way to change the font size and color of text in the calendar app?

    Does anyone know a way of changing the font size and color of text in the calendar app that comes with the iPad 2?  It is very hard to see the small gray numbers on the calendar.  Thanks

    Looks like you didn't get a reply on your post, but it is still a problem.  Font size is supposedly changeable via "Accessibility" in Settings, but it doesn't work.  You can turn on "Zoom".

  • Lack of sharpness in text and colors

    Recently I have noticed text and colors appear to have faded, not dramatically but discernible nonetheless. I have adjusted brightness (in displays) with no effect so I wonder if someone can suggest another route ... or is it symptomatic of other problems.

    Sorry. Resolved. Universal Access. I just hadn't found it.

  • By mistake I uninstalled my Acrobat someting, which gave me the opportunity to print .pdf and color-mark text. My licence key is [removed by moderator]. What is the name of the product? Where is the link for download and reinstall? Please help me r

    By mistake I uninstalled my Acrobat someting, which gave me the opportunity to print .pdf and color-mark text. My licence key is [removed by moderator - never disclose publicly]. What is the name of the product? Where is the link for download and reinstall? Please help me rapidly, Best regards / Stefan

    Sign in to your Adobe account online and look in the Plans/Products sections to see which program it might have been.

  • Copy and paste into dialog boxes

    Copy and paste into dialog boxes
    Greetings:
    This is a cross post, so sorry about that, but I had originally replied to a previous post,
    before I realized it was probably the wrong forum
    for my question.
    Copying from a document to a dialog box field doesn't work anymore; How do I fix it?
    We have the problem since upgrading to Tiger.
    Our Mac users, during their workflow, paste a filename
    from a document into the 'save as' field (when printing to a .ps file).
    This no longer works. UNLESS they control click in the 'save as' field.
    Then they can select 'paste' with the mouse. Why is this happening? and how can we fix it? (so they can just 'command C' then 'command V' as they used to).
    We have repaired permissions, cleared user caches,
    tossed finder prefs, logged in as another user,
    all to no avail.
    Thanks in advance!
    z

    Matt,
    Thanks for your response.
    I agree that something else is capturing the shortcut, as
    all shortcuts are unavailable in the pulldown menus at that point where we used to be able to 'Command V' paste into the text field. We're not using Quick Keys, and the
    Full keyboard access setings are default for OS 10.4.
    I did experiement with turning of some of the modifier F key selections in the Keyboard system prefs but none made
    any change for this issue. For now our work around will be to control click in the text field and select 'paste'.
    Seems odd that the contextual menu is available for that field but a 'command V' or command control V doesn't work.
    Not a huge deal, more of an irritant, but I'll keep on the hunt! Thanks again!

  • SSRS Export to text and NOTHING BUT TEXT!

    Is it possible to export a report to text only format? When I export my report to csv and then use the old DOS command to "type" the exported csv file there is a horrible little character at the beginning of the file. 
    I need to export just as text and nothing but text to drop the exported report into a 3rd party service which processes it. This squiggly little character is tripping the 3rd party system. I cant believe something so simple is not supported natively by SSRS?
    I'm using SQL Server 2008 R2. 
    Please help!
    LightSwitchShells.com

    Hi Hale,
    Please try to add the following text in the rsreportserver.config to work around the issue.
    <Extension Name="TXT" Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering">
    <OverrideNames>
    <Name Language="en-US">TXT (Pipe Delimited Text File)</Name>
    </OverrideNames>
    <Configuration>
    <DeviceInfo>
    <FieldDelimiter>|</FieldDelimiter>
    <Extension>TXT</Extension>
    <Encoding>ASCII</Encoding>
    <NoHeader>true</NoHeader>
    </DeviceInfo>
    </Configuration>
    </Extension>
    By default, the  rsreportserver.config is locate in:
    C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer
    There is a document about Export Tab Delimited text file in SSRS 2008 R2, you can refer to it.
    http://revweblog.wordpress.com/2011/09/26/export-tab-delimited-text-file-in-ssrs-2008-r2/
    Hope this helps.
    Regards,
    Alisa Tang
    If you have any feedback on our support, please click
    here.
    Alisa Tang
    TechNet Community Support

  • Display 'item text' and 'material PO text' in a purchase order ?

    hello,
    i am creating a purchase order and i have inputted the 'item text' and 'material PO text' in the ITEM TEXT of the ITEM DETAILS section. I have a smart forms where i am displaying the purchase order by displaying fields from various tables like ekko,ekpo,t024,eket etc ..
    I want ti display the 'item text' and the 'material PO text' on the smartform but i cant find the table or the fields which keep these values(text) ??
    help me on this one ? thanks for yur time...

    c the example below:
    PERFORM read_text USING g_transp 'Z010'.
    FORM read_text USING l_text l_id.
      DATA : lt_text TYPE TABLE OF tline WITH HEADER LINE.
      DATA : l_name LIKE thead-tdname.
      CLEAR l_name.
      l_name = g_delivery.
      CLEAR lt_text.
      REFRESH lt_text.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
      CLIENT                        = SY-MANDT
          id                            = l_id
          language                      = sy-langu
          name                          = l_name
          object                        = 'VBBK'
        TABLES
          lines                         = lt_text
       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.
      CLEAR l_text.
      LOOP AT lt_text.
        CONCATENATE l_text lt_text-tdline INTO l_text.
      ENDLOOP.
    ENDFORM.                    "read_text

  • Sales text and  Purchase Order Text

    Hi,
    in what tables are stored Sales text and Purchase Order Text of the material master ?
    Best Regards

    Hi
    All long text is stored in STXH and STXL.
    Object is MATERIAL.
    Text-Id for basic data text is GRUN
    Text-Id for purchase order text is BEST
    For sales order text it is text object MVKE with text-id 0001
    Go to SE37 function builder. Enter READ_TEXT and do a single test ( F8 )
    Enter your parameters and execute. Example below.
    NAME is a comibation of materialnumber (00000000008000000)WITH leading zeros
    if numeric and sales org (1000) plus distribution channel (10)
    Import parameters - Value
    CLIENT - 010
    ID - 0001
    LANGUAGE - E
    NAME - 000000000008000000100010
    OBJECT - MVKE
    ARCHIVE_HANDLE - 0
    LOCAL_CAT
    Just for future reference with regards to getting text id's etc.
    eg: PO texts.
    --> Go into the material master PO text
    --> Double click into the required text.
    --> Click the "GO TO" menu option.
    --> click Header.
    and all the info you need is there.
    Thanks..

  • How to download material sales text and purchase order text information

    Here is situation:
    goto MM03 transaction,
    Take any material -- and select below views
    1. sales text
    2. purchase order text
    i have to write the download program with the sales text and purchasing text information of all the materials.
    could you pls tell me in which table I will get all the above sales text and purchase order text infrmation.
    I think it will store in standard text. I checked STXH table also for getting information text object, text id, text name, language, etc.
    If anybody knows .. please share.
    Thanks in advance.
    Regards
    Raghu

    Declare internal tables as follows: - An example
    TYPES: BEGIN OF TY_PO_LINES,
         INCLUDE STRUCTURE TLINE.
         END OF TY_PO_LINES,
         TY_PO_LINES_T TYPE STANDARD TABLE OF TY_PO_LINES.
    TYPES: BEGIN OF TY_PO_TEXT,
           TDOBJECT TYPE TDOBJECT
           TDNAME TYPE TDOBNAME,
           TDID TYPE TDID,
           SPRAS TYPE SPRAS,
         TDLINES TYPE TY_PO_LINES OCCURS 0,
         END OF TY_PO_TEXT,
         PO_TEXT_T TYPE STANDARD TABLE OF TY_PO_TEXT.
    DATA: PO_TEXT TYPE TY_PO_TEXT_T
    PO text:
    Looping at your internal table which consists of PO number,
    SELECT TDID TDSPRAS FROM STXH INTO A INTERNAL TABLE say PO_TEXT
    TDOBJECT = EKKO "PO Header Text
    TDNAME = PO NUMBER
    SELECT TDID TDSPRAS FROM STXH INTO A INTERNAL TABLE say PO_TEXT
    TDOBJECT = EKPO "PO line item text
    TDNAME = PO NUMBER
    ENDLOOP
    Looping at PO_TEXT
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
         ID = PO_TEXT-TDID
         LANGUAGE = PO_TEXT-TDSPRAS
         NAME = PO_TEXT-TDNAME
         OBJECT = PO_TEXT-TDOBJECT
      TABLES
         LINES = PO_TEXT-TDLINES
    ENDLOOP
    Follow the same above logic for material with suitable TDID you need to extract
    Hope this helps,
    SKJ

  • Purchase order Text and Basic data text needed from MM03 tcode

    Hi
    I need Purchase order text and Basic data text to be fetched by material number.
    Purchase order text and Basic data text are present in MM03 Tcode.
    Can anyone please guide me how to do it.
    Kind Regards
    Sajid

    hi
    Purchase order text
    GotoMM03 ->view purchase order text.
    In purchase order text screen, below you find one icon 'Editor'
    click on this icon. It will open another screen.
    In this screen -> click Goto Menu->Header.
    It will open the details about Purchase order text.
    TextName (Generally it is material name)
    Language
    Text ID : BEST
    Text Object: MATERIAL.
    Pass the above to READ_TEXT to get the text
    *Basic data text *
    Basic Data Text in MM03

  • Uploading sales text and Purchase order text for material master

    Hi,
      I have created, material master with LSMW  byt not updated SALES TEXT and Purchase order text with LSMW  now i want to uplaod the sales and po text for material master can you give some link or ref. code to upload the text i have near 1000 items for which i want to uplaod text  when i have done the recording with SHDB  i have not found filed in recording.
    regards,
      zafar

    Hi,
    I have made the code in se38
    as below but still it is not working
    REPORT  ZTEST_TEXT.
      data: headerl like thead occurs 0 with header line.
      data itab3 like tline occurs 0 with header line.
    headerl-tdobject = 'MATERIAL'.
    headerl-tdname = '00000000000LSMW123'.          "(Material : 000000000300000560, Sorg : 0001, Dist channel: 01)
    headerl-tdid  = 'BEST'.
    headerl-tdspras = 'E'.
    append headerl.
    move '*' to itab3-tdformat.
    move 'Testing PO text' to itab3-tdline.
    append itab3.
    call function 'SAVE_TEXT'
      exporting
        header                = headerl
      insert                = ' '
       savemode_direct       = ' '
      tables
        lines                 = itab3
    exceptions
       id                    = 1
       language              = 2
       name                  = 3
       object                = 4
       others                = 5.
       IF SY-SUBRC = 0.
         CALL FUNCTION 'COMMIT_TEXT'
           EXPORTING
                OBJECT   = headerl-tdobject
                NAME     = headerl-tdname.
       ENDIF.
       break-point.
    regards,
    zafar

Maybe you are looking for

  • Bapi in order to update table T056P

    Hi all, Is there any bapi or fm to update table T056P in order to enter interest reference rates values. Thanks and best regards

  • Account Dim in Shared Library doesn't have CustomXTopMember or EnableCustomXAggregation Properties

    We are upgrading from 11.1.2.1 to 11.1.2.3.500. We use the Shared Library for our HFM application. In 11.1.2.3.500, there are no options for EnableCustomXTopMember or EnableCustomXAggregation (where X is the number of the Custom dimension IE Custom 1

  • Can you use imovie's green screen feature to make things invisible?

    Hi, i have a GoPro, and am making a mount that will give me a 3rd person view while i snowboard. Like this: https://s3.amazonaws.com/ksr/assets/000/333/633/7ac3cbc3da3b7b2c948f36e6018ea460 _large.png?1357825021 (but home made) However, the tube will

  • Could not connect to the entreprise manager interface

    hello i have installed Oracle10g R2 under centos 5 , i start the db base , i use sqlplus console , and it's going ok , but no web interface , there is a strange thing ; when i run srvctl status/u01/app/oracle/product/10.2.0/db_1/jdk/jre/bin/java: err

  • Help with Lock Screen Code

    My little brother was playing around with my Video Ipod 30 Gig just now and set a code for the Lock Screen and now I can't figure out the code he set. I connected the ipod to itunes and it unlocked, but is there anyway to find out what code he put in