Use img in TextField.htmlText?

Hello,
I try to show load picture (<img />) in TextField.htmlText.
Questions :
Is this supported?
If yes, are there safety rules particulate?
Code :
var textArticle : TextField = stage.addChild( new TextField ) as TextField;
textArticle.autoSize = TextFieldAutoSize.LEFT;
textArticle.htmlText = "<p>test load picture :: <img src=\"http://www.google.com/intl/en_com/images/logo_plain.png\" id=\"image\" /></p>";
var loaderPicture : * = textArticle.getImageReference("image");
trace(loaderPicture); // return null
Tested on MacOsX 10.5.8, Flash 11.0.0.428
Thanks,
Laurent

have you checked through here?
http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9 b90204-7c83.html
also you'll need to wait until it is loaded
http://wiki.mediaboxtraining.com/doku.php/flash:text_loading

Similar Messages

  • Using img tag with htmlText

    I'm trying to display images within mx:Text components using htmlText.  However, no matter what I try, I can't get an image to display.  The application just displays whitespace where the <img> tag is.  My current code looks something like:
                <mx:Text id="test_html" width="100%" height="100%">
                    <mx:htmlText>
                        <![CDATA[
                            <p>Why can't I include an image =(</p><img src='assets/add_icon.gif' width='20' height='20' align='left' hspace='10' vspace='10' />
                        ]]>
                    </mx:htmlText>
                </mx:Text>
    What I get displayed when I view this is:
    I've tried essentially every permutation that I can think of -- setting the htmlText in actionScript, using all different paths (app:/assets/add_icon.gif, ../assets/add_icon.gif, add_icon.gif, embedding the image and using {<classname>.addIcon}).  I have other images embedded in the application using the path "../assets/<image file>" and they work fine (they're not being used in htmlText).
    Has anyone had this kind of trouble before?  Any idea what might be going wrong?

    does anybody know anything? how long do i need to wait to see
    if someone replies? I just need to know if it is possible or not.

  • Using multiple img src / with htmlText --display problem

    I need help.
    I am using multiple <img src /> tag with htmlText and
    pictures displays in layers(overlay)?
    html_txt.html = true;
    html_txt.htmlText = "text<br><img src = '
    http://picture1.jpg 'width='500'
    height='491' hspace='0' /><br>more text<br><img
    src = '
    http://picture2.jpg' width='299'
    height='612' hspace='101' ><br>end with text";
    Is there any way to refresh text field when pictures are
    fully loaded so it will display like regular html page?
    this is flash version, evrything is shown but it is not
    right.
    http://www.sosui.jp/flash/test/v001/pages/home/homeBlogV002.swf
    I want to show them like this page.
    http://sosui.jp/flash/test/v001/pages/home/blog.html
    I tried onEnterFrame but pictures will not show. I think it
    is because it is trying to load pictures everytime. So I cannot use
    onEnterFrame, i need other way to refresh text field.
    Please help me. you might of guessed I am not an English
    speaker, so my English might be little off.
    Thank you.

    does anybody know anything? how long do i need to wait to see
    if someone replies? I just need to know if it is possible or not.

  • Using variables in textfields

    This may have been asked alot. but all the things i found on
    google led me nowhere except confusion.
    the code i have so far is attached, but i can't seem to get
    the message outputted properly.
    Also, the x.text needs to be replaced with the textfield, but
    i'd like if that could be a var too, so i can use different
    textfields.
    All my textfields are in the timeline "messageBar" on layer
    "Text", this timeline lies on(under?) the main timeline.
    if you need more information, feel free to ask.
    Thanks in advance,
    Tyrope

    Your file link is in error. You'll have to try to put your
    impatience on a shelf for awhile--it is apparently leading to only
    more errors.
    It will be very helpful if you describe in detail how you
    have things designed and coded, not only in terms of what objects
    contain what other objects, but also where code and objects are
    planted along the timeline. While I was initially only concerning
    myself with your code for textfield issues, Andrei noticed
    something I didn't pay any attention to, that your function was not
    properly coded as a function.
    One thing you probably need to realize is that code cannot
    command objects that are not present. So if you have code executing
    in frame1 and it's trying to tell something in frame 5 to do
    something, you need to move that code to frame 5 where the object
    is. You could set a variable to a value in frame 1 so that it can
    be used for other code when you get to frame 5... your mention of
    using setInterval could do what you think, but it's not a relaible
    approach, especially if your code can't get you out of frame 1.
    Whenever you are trying to troubleshoot code, you should
    utilize the trace() function. It is very useful in telling you
    where things go awry.

  • How do you get a TextField.htmlText to display a character?

    I'm trying to have a dynamic text field display htmlText and
    I've run into a bug/problem where the text field will NOT display
    the < character (less than sign). In fact, unless I escape that
    character like: \<, the text field stops displaying ANYTHING
    after a < as well.
    var tff:TextFormat = new TextFormat();
    tff.size = 12;
    tff.color = 0x000000;
    tff.align = "left";
    mytextField.ptf.type = "dynamic";
    mytextField.ptf.multiline = true;
    mytextField.ptf.html = true;
    mytextField.ptf.embedFonts = false;
    mytextField.ptf.selectable = false;
    mytextField.ptf.autoSize = "left";
    mytextField.ptf.htmlText = myHTMLString;
    mytextField.ptf.setTextFormat(tff);
    mytextField is a clip on the stage that has a dynamic text
    field in it. it's set to Arial and Use Device Fonts.
    the results when
    var myHTMLString:String = "<i>this</i> is a
    <b>sample piece</b> of html text with a \<
    character."
    displays:
    this is a
    sample piece of html text with a \ character.
    and when
    var myHTMLString:String = "<i>this</i> is a
    <b>sample piece</b> of html text with a <
    character."
    displays:
    this is a
    sample piece of html text with a
    I presume that it's having problems displaying the <
    character because it's confusing it with the start of an html tag.
    How do you escape the < character so it can be displayed?
    I tried url and html encoding it (&lt; and %3C) but got
    the same results

    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_15863

  • Generate image with CFIMAGE - but need to use img tag to serve the content

    I create a new image with cfimage, that already works without
    any problems.
    But instead of using the action="writetobrowser" I need to be
    able to use the script inside a img tag:
    Example: <img
    src="myscript.cfm?somedata=iwanttheimagetocreate>
    I found one webpage that deals with that problem (
    http://www.webdevelopernews.com/2007/09/14/serving-up-cfimages-via-image-tags/)
    but the image served to the browser, when using the code below, is
    of a very low quality and another point is that you can't serve
    .gif's to the browser.
    <cfcontent type="image/jpg"
    variable="#ImageGetBlob(backgroundimage)#">
    Any suggestions/solutions?
    Thanks,
    Phil

    In that entry Raymond mentions:
    "The WriteToBrowser action actually generates HTML that points
    to a ‘magic’ URL to serve the image.". ie <img
    src="/CFFileServlet/_cf_image/_cfimg-12345036853711072.PNG" alt=""
    />
    Perhaps you could create a function that captures the
    generated html by using <cfsavecontent>.
    <cfsavecontent variable="imageTagHTML">
    <cfimage action="writeToBrower" ..>
    </cfsavecontent>
    Then uses a regular expression to extract and return the url
    portion only. ie
    "/CFFileServlet/_cf_image/_cfimg-12345036853711072.PNG"
    <cfset ExtractedURLHere = SomeFunction(arguments...)>
    <cfoutput><img
    src="#ExtractedURLHere#"></cfoutput>
    Though you could also use the entire html string directly
    <cfoutput>#imageTagHTML#</cfoutput>

  • What can I use if I need htmlText property in Flex Mobile project

    Hello,
    What control exposes an htmlText propery in Flex Mobile? MXML or AS3, doesn't matter.

    A strange blue-ish text? How could that possibly be of any help?
    In other news:
    Yeah, that's what I did after posting then resorted to using StageWebView or WebStageView, could never remember the name.
    Thank you.

  • Displaying a Smartform Using IMG (Web Dynpro)

    Hi Guys,
    I am trying to display one of my smartforms in the front end using the IMG and I am finding it hard to do so. I cant find the appropriate path to assign my smartforms.
    Please help!
    Val.

    CALL FUNCTION LV_FUNC_MOD_NAME
        EXPORTING
          CONTROL_PARAMETERS = LS_SSFCTRLOP
          OUTPUT_OPTIONS     = LS_OUTPUT_OPTIONS
          USER_SETTINGS      = ' '
          RRNUM              = IM_RRNUM
        IMPORTING
          JOB_OUTPUT_INFO    = LT_RETURN
        EXCEPTIONS
          FORMATTING_ERROR   = 1
          INTERNAL_ERROR     = 2
          SEND_ERROR         = 3
          USER_CANCELED      = 4
          OTHERS             = 5.
      IF SY-SUBRC <> 0.
      ENDIF.
    CALL FUNCTION 'CONVERT_OTF'
      EXPORTING
        FORMAT                = 'PDF'
        MAX_LINEWIDTH         = 132
      IMPORTING
        BIN_FILESIZE          = LV_LENGTH
        BIN_FILE              = LV_XSTRING
      TABLES
        OTF                   = LT_RETURN-OTFDATA
        LINES                 = LT_TLINE
      EXCEPTIONS
        ERR_MAX_LINEWIDTH     = 1
        ERR_FORMAT            = 2
        ERR_CONV_NOT_POSSIBLE = 3
        ERR_BAD_OTF           = 4
        OTHERS                = 5.
    IF SY-SUBRC <> 0.
    ENDIF.
    LV_FUNC_MOD_NAME is your smartform function module name.
    LV_XSTRING contains the stream of the pdf , send this to the browser using the following code.
        LV_FILENAME = 'RebateRequest.pdf'.
        LV_CTYPE = 'pdf'.
        CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE(
                  EXPORTING I_FILENAME = LV_FILENAME
                            I_CONTENT  = LV_XSTRING
                            I_MIME_TYPE = LV_CTYPE
                            I_INPLACE = ABAP_TRUE
                            I_IN_NEW_WINDOW = ABAP_TRUE ).
    Abhi

  • Using img in user signature

    Why is img tag disabled in user signature?
    I think it might be neat using it.
    I wanted to put this
    to my signature...
    It is an image that automatically updates (so, every time I upgrade kernel the image updates to a server and I will not have to play with my signature every time I change something on my system)...

    Because people with images in their signatures suck and it is important to us that the Arch forums are not filled with people who suck.
    People suck in first place. Stupid signatures are the results. Not the opposite
    ===============================================
    But by using only text one can't make auto updating signatures.
    Last edited by Doctor Drive (2010-11-13 09:10:17)

  • Using Operations on TextFields as part of a thread

    Hello,
    How can I do the Operations on the TextFields as part of a thread like :
    accepting the values from the user through TextField
    doing operations on the values
    displaying the result
    The Application must have a main function. and the class inherited from Applet and is implementing Runnable Interface.
    I have this class in which a clock is also already running as a part of a Thread.
    Thank you

    Hi,
    What have you done so far? What is your actual problem?
    /Kaj

  • Confused as to why you shouldn't use imgs as nav links

    I was going to create a horizontal nav bar using text as
    image because I want the text links to be a particular font. People
    keep saying this is a bad idea because the search engines can't
    recognize images. Why does it matter if Google can read my nav
    links? What do people do if they want their nav bar links to be in
    a funky or different font?

    The site was built before that article was written! 8)
    Lame, I know....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Thierry" <[email protected]> wrote in message
    news:gdlnn9$t1l$[email protected]..
    > "Murray *ACE*" <[email protected]>
    wrote in message
    > news:gdlg93$jo7$[email protected]..
    >> That's about the size of it, yes. Although I do
    image replacement method
    >> sometimes. For example, here -
    >>
    >>
    http://www.madisonconcrete.com
    >>
    >> the menu is images, but if you view the page in FF
    and disable the CSS,
    >> you get the text links as well.
    >
    > But with image off (which would be the most common
    case), sighted users
    > get nada.
    > I think real images with alt text beats negative
    text-indent when it comes
    > to usability/accessibility.
    > If you want to use *real* text then there is this
    technique:
    >
    http://tjkdesign.com/articles/tip.asp
    >
    > I'm a bit biased though ;)
    >
    >
    > --
    > Thierry
    >
    http://www.TJKDesign.com/go/?0
    | Articles and Tutorials
    >
    >
    >
    http://divahtml.com/products/scripts_dreamweaver_extensions.php
    |
    > Extensions that keep your markup clean
    >
    http://www.fourlevel.com/ |
    CSS Menus, Gallery, Tab Panels, etc
    > --
    >

  • Picklists when using oracle.dacf Textfield or gridcontrols

    Hi
    I was previously using Jdev1.0 and I was able to have a picklist
    Lov using JBCL field controls and gridcontrol.All I had to do
    was to map the picklist editor to the Querydata set and bind it
    to a column.
    Now I am using an infobus gridcontrol.How can I have an piclist
    LOv here.What are the dacf controls that support this.
    How do I bind it to the query in the Rowset info??
    Incase I need to code this explicitly to get it working , can
    you just send in a small example on how to do this..
    Thanks
    Ram
    null

    this can happen for several reasons. Based upon the stacktrace and your comments, it looks like the connection.properties file wasn't placed somewhere in the class path. If that is not the case, please make sure that all of the necessary jars are over on linux and that the classpath is identical to the one used under NT. A good way to check this is to take a look at the command line that is displayed in the message window when the application is run from within JDev.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Heikki Vilkkinen ([email protected]):
    ResultSetInfo: ResultSet XxpsError could not be opened because of problems opening one or more attributes.
    [oracle.dacf.dataset.SessionInfo name=Session1]
    [oracle.dacf.dataset.RowSetInfo name=XxpsError]
    8
    [Loracle.dacf.dataset.ColumnInfo;@7b3babc8
    oracle.dacf.dataset.DataSourceOperationException: ResultSetInfo: ResultSet XxpsError could not be opened because of problems opening one or more attributes.
    at oracle.dacf.dataset.ResultSetInfo.openProducerObject(ResultSetInfo.java, Compiled Code)
    at oracle.dacf.dataset.ProducerObject.open(ProducerObject.java, Compiled Code)
    at oracle.dacf.dataset.RowSetInfo.open(RowSetInfo.java, Compiled Code)
    at oracle.dacf.dataset.SessionInfo.openChildren(SessionInfo.java, Compiled Code)
    at oracle.dacf.dataset.ProducerObject.open(ProducerObject.java, Compiled Code)
    at oracle.dacf.dataset.SessionInfo.publishSession(SessionInfo.java, Compiled Code)
    at abc.fabc.<init>(fabc.java, Compiled Code)
    at abc.abc.<init>(abc.java, Compiled Code)
    at abc.abc.main(abc.java, Compiled Code)
    What is the reason for this phenomena?
    Application developed using JDeveloper 3.1
    data form wizard works under NT well but
    when I copy classes and xml-files to Linux
    and run the application it shows standard
    login dialog but after login it fails
    to execute query (rowsetinfo)
    <HR></BLOCKQUOTE>
    null

  • Questions about TextConverter.TEXT_FIELD_HTML_FORMAT

    We currently have a lot of content produced which is displayed using the 'htmlText' property in the MX Text & TextArea components.  So basically we produce content that uses the 11 or so supported html tags.  I'm researching the TLF and SPARK components to see what we would have to change in order to use these new technologies.  I wanted to check my understanding of the TextConverter.TEXT_FIELD_HTML_FORMAT property.
    Using that property seems straight forward.  I will have to upgrade my components to the SPARK Text components and use the TextFlow object that is created.  However, my questions are...
    - In Flex 4.1 (and TLF 1.1) there seems to be some support lacking for the anchor tag and list tag.  The ASDOC for the anchor tag mentions that ActionScript link events are not supported.  Neither are a:link, a:hover, and a:active styles.  I believe I read somewhere that support has now been added or there are workarounds.  Is this true?  For the list tag, I know in TLF 2.0 ListElements are supported.  If I use TLF 2.0 and this TextConverter.TEXT_FIELD_HTML_FORMAT property, will my <li> tags just work?  The ASDOC I'm looking at is here: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flashx/textLayout/conve rsion/TextConverter.html#TEXT_FIELD_HTML_FORMAT
    Thank you for your time!

    Thank you Richard!
    A couple of follow up questions...
    1.  If we were to use the HTMLTextFieldImporter class and continue to use the old TextField htmlText syntax, can we just add new "<div>" tags to the content we produce and they will just work?  By this I mean, since "<div>" was not supported with the TextField htmlText syntax but now is with TextFlow, can we just add "<div>" tags to the content we produce and the HTMLTextFieldImporter will still work and our "<div>" tags will be valid and rendered correctly?
    2.  What advantage is there to switching to the TextFlow syntax if we already have procedures in place that produce the old TextField htmlText syntax and there is code in the TLF that imports it?  Is there any features or support we would miss out on if we don't use the TextFlow syntax?
    Thank you once again!!

  • HtmlText: img src= from Library?

    Hello Guys
    I have a htmlText Field, and I wanna embed a Movieclip from my library into the text.
    I've tried everything for about 5 hours, nothing worked, even though the Adobe Help stated that it's possible:
    src: Specifies the URL to an image or SWF file, or the linkage identifier  for a movie clip    symbol in the library. This attribute is required;  all other attributes are optional. External files (JPEG, GIF, PNG,     and SWF files) do not show until they are downloaded completely.
    So you can stick images from your library in html textFields... the question is how?
    Thank you in advance.
    Kenji

    Well, I was using the linkage and everything correctly. I found out my fault. I was using a TLF-Textfield which doesn't support the embedding of library images (or does it??)
    It works in classic textfields though, but in classic textfields, the textflow is totally broken with images. Instead of inserting it into the textline, it creates a new line, only for the picture. But for my purpose (chat smileys) that's of no use. I need my pictures right in the text line where they have to be...
    Like <-- this.
    And not like <--- this, as it is with classic textfields.
    Does anyone know how to embed library movieclips into a TLF-Text??

  • How to use Sharepoint 2013 img file

    Hi,
    I downloaded Sharepoint 2013 as an img file. I am trying to install it on VMWare 5.1 which only accepts ISO files. How can I convert the img file to ISO or what other workarounds are available?
    I already tried renaming the file to ISO, but it didn't work.
    Thanks

    Hi WaelS,
    If you want to use img file in VMWare, you may need to convert the img file to ISO, as VMWare doen't support img file.
    Please do as the followings to convert the img file to iso:
     1. Unzip the files
     2. Open a command prompt (Start > Run > type cmd, press Enter)
     3. Browse to the folder where the unzipped files are (cd "c:\Windows ISO Files")
     4. Considering that you are in the folder containing the files command prompt, type
           copy /b file1+file2+file3+file4+file5 file.iso
     4a. Check that the files have no extension. If they have, the command changes to something like:
           copy /b file1.ext+file2.ext+file3.ext+file4.ext+file5.ext file.iso
     4b. If there aren't *any* other files in the folder, typing this should be enough:
           copy /b *.* dvd_file.iso
    If you still have question about the issue, I suggest you can post a thread in corresponding forum, you will get more helpful information from there.
    Best Reagrds
    Zhengyu Guo
    TechNet Community Support

Maybe you are looking for