I have attempted to have a hyperlink text using actionscript:

var t:TextField = new TextField();
t.htmlText = "hello world"
+ "<a href='weeTestPage.html'target='_self'><u>click here</u></a>";
t.autoSize = TextFieldAutoSize.LEFT;
addChild(t);
when I run the code it always creates a new window to open up the file
in. I have even attempted to switch out _self with _top, _parent, and _blank, always with the same result.
I simply want the file to open up in the same window. Any suggestions?

I understand that the code below should work but it doesn't, I have to take the underline before self out, for the hyperlink to work at all, and then it creates another window for the file. There may some sort of glitch that I am not aware of. But the code below does not work as is in my app. Any further suggestions?
var t:TextField = new TextField();
t.htmlText = "hello world"+ "<a href='weeTestPage.html' target='_self'><u>click here</u></a>";
t.autoSize=TextFieldAutoSize.LEFT;
addChild(t);

Similar Messages

  • How can I change Label's text using ActionScript?

    Hi~ everyone~
    I want change Label's text using ActionScript.
    Test.mxml
    <?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/mx" minWidth="955" minHeight="600" initialize="init()">
    <fx:Script>
      <![CDATA[
       private function init():void{
        var btn:BtnScript = new BtnScript();
        this.addElement(btn);
      ]]>
    </fx:Script>
    <fx:Declarations>
      <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <s:Label x="182" y="149" text="Label" id="lbl"/>
    </s:Application>
    BtnScript.as
    package
    import flash.events.MouseEvent;
    import mx.controls.Alert;
    import spark.components.Button;
    public class BtnScript extends Button
      public function BtnScript()
       super();
       this.addEventListener(MouseEvent.CLICK, eventHandler);
      private function eventHandler(event:MouseEvent):void{
              // lbl.text = "changed text";
           // HOW CAN I ACCESS LABEL IN MXML FILE?
    I'm about to learn flex. Please help me.
    Thanks in advanced.

    You could achive this very easily(but this shouldn't be used in production code as it'll be difficult to manage as the project grows) by defining a static data member varibale of DataType Label something like below, (modified/added code in BOLD)
    Test.mxml
    <?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/mx" minWidth="955" minHeight="600" initialize="init()"
          creationComplete="creationCompleteHandler(event)">
    <fx:Script>
      <![CDATA[
       private function init():void{
         var btn:BtnScript = new BtnScript();
         this.addElement(btn);
       private function creationCompleteHandler(event:FlexEvent):void{
         Model.someLabel = lbl;
      ]]>
    </fx:Script>
    <fx:Declarations>
      <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <s:Label x="182" y="149" text="Label" id="lbl"/>
    </s:Application>
    BtnScript.as
    package
      import flash.events.MouseEvent;
      import mx.controls.Alert;
      import spark.components.Button;
      public class BtnScript extends Button
        public function BtnScript()
          super();
          this.addEventListener(MouseEvent.CLICK, eventHandler);
        private function eventHandler(event:MouseEvent):void{
              // lbl.text = "changed text";
          // Now use Model.someLabel which is basically 'lbl'.
          Model.someLabel.text = "changed text";  //Mission Accomplished....
    Model.as
    package
      public class Model
        public static someLabel:Label;
    Note: This approach is just to give you an idea but instead should use the MVC pattern.

  • Hyperlink Text Merge.

    Dear All,
    I am using InDesign CS5.5 exporting the PDF.
    I just opened the pdf file into Acrobat Reader XI,  I just move the cursor hand tool its shown the hyperlink icon and click ok going the correct destination. But I want to copy the same text in PDF file, the text it will automatically merging why? I don't know what is the reason behind this. I also tested the same file in Acrobat Professional using the text edit tool and copy the same text and pasted into the browser or notepad the hard hyphen shown/comes perfectly, In same Acrobat Professional use the text selection tool copy and paste the text into the notepad its merging a texts.
    1. Please refer this snapshot below, I'm using the Adobe Reader XI. This one is works perfectly without copy any hyperlink text I just click its goes to the correct destination in this case.
    2.But I want copy the same hyperlink text using the Adobe XI with selection tool, its merging the text when pasted into the notepad or web browser. Please refer the below screen shot.
    Please give any suggestion or ideas are welcome!
    thx,
    csm_phil

    You need to make sure you can identify the strings to convert to hyperlinks. I'm not a Data Merge user, but you probably can insert a unique identifier before and after the string which you can use to search for the links (in the general gest of {this-is_a_link}, if you are not using braces anywhere else), or perhaps a unique paragraph (when on a single line) or character style.
    Then, after merging, you can run a script that searches for this specific attribute, and converts them to a link.

  • Transporting Text using SO10

    Hello,
    I have created some text using SO10 in dev environment. These text hass to be moved to QA. We dont get transports created for these texts.
    So what is the alternative and best way to move the text from Dev to QA?

    Hi Rajasekhar,
      The standard text created in SO10 transaction never asks for a transport request while it is getting saved in SAP box.  So we need to create a transport request for it.  follow the below procedure.
    1) in SE38 run the program RSTXTRAN.
    2) it will asks for the transport request.  create a new transport request in SE10 and give this request here.
    3) save the std text in this transport request.
    4) now give this request number to BASIS people who will transport the object to QA box.
    thanks & regards
    Kishore Kumar Maram

  • I have difficulty pasting text into the file name field(prefix only) while saving files.

    OS: WinXP sp3
    FF: 3.6.3
    I have difficulty pasting text into the file name field (prefix only) while saving files. example: File name is Pic123.jpg and I want to rename it ABC123.jpg and I have ABC loaded into the WinXPsp3 clipboard. When I highlight\right-click\delete "Pic" then attempt to paste the ABC, I get either no reaction, or upon multiple paste attempts, the ABC is appended to the end of the file, after the extension, as "Pic123.jpgABC". If I delete this unwanted suffix, or repeat the process several times, eventually I can delete the unwanted portion of the prefix and paste the desired text. Sometimes it works fine first try, but mostly it takes several tries. I'm using Firefox 3.6.3 but the problem existed in whatever previous version I had too. This issue only occurs when using the delete/paste; I can always manually change the name by typing. Thank you for your help.

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    A possible cause is that the server sends a wrong response header.
    The server may not comply to RFC 5987 and sends a wrong Content-Disposition:attachment; filename header.
    * https://developer.mozilla.org/en/Firefox_8_for_developers#Network

  • HT4946 i have an important text message on a phone that currently wont turn on, i know its backed u all i need is a copy of the text message, how do i do this?

    i have an important text message on my phone that i need to retrieve but my phone is currently broken so i would like to know how i retrieve it as my iphone is backed up. cheers

    http://support.apple.com/kb/ts2755

  • How can I have a standard text block appear on the last page of my documents?

    How can I have a standard text block appear on the last page of my documents without having to type it in all the time? I have a terms statement with a line for a customer’s signature which I want on the last page of my invoices and right now I have to type it in each time or cut and paste it from a previous invoice. I already have a Master Page that includes the customer information and my company information at the top of each page and I am using data merge to fill each page with the items ordered and their pictures etc. I would just like to have this standard terms block automatically show up on the last page after the last item in the data merge.
    Thank you all in advance for your help.

    Thank you Peter. This works. I have the text block now at the bottom of a second master page which I apply to the last page. For aesthetics I can modify the position of the text block in the new master page to bring it up from the bottom under the last item ordered when there is less than 4 items on the page. (my data merge fits up to 4 items with their images on a page).  If the last page is full I’ll insert a final page using the second master and also bring it up to the top of the page.

  • I have a word document that I have put hyperlinks in and turned into a pdf.  When I email and receiver opens in iPad the document is blank.  When I do a file save as pdf the document appears and the hyperlinks work but the document has much of the content

    I have a word document that I have put hyperlinks in and turned into a pdf.  When I email and receiver opens in iPad the document is blank.  When I do a file save as pdf the document appears and the hyperlinks work but the document has much of the content turned into symbols.  What is going wrong?

    You select the printer properties and set the appropriate page size (I think there is a place to set it in PDF Maker too, but not sure). In the printer, this is equivalent to putting the proper paper in the printer.

  • Adobe X PDF files converted to jpg, edited and converted back to PDF have ragged, unclear text.  I didn't have this problem with Acrobat 9 standard.  What is the remedy for this.  If this is the best I can expect, I won't be able to use X standard.

    Adobe X PDF files converted to jpg, edited and converted back to PDF have ragged, unclear text.  I didn't have this problem with Acrobat 9 standard.  What is the remedy for this.  If this is the best I can expect, I won't be able to use X standard.

    I can't imagine any worse workflow than converting to JPEG to edit text, then back to PDF. Text in a PDF is a vector thing, smooth at all resolutions. And JPEG is made for photos. EVERY conversion to JPEG and back loses quality but how much loss there is will vary.
    If you must go to an image format, try PNG.

  • When attempting to open a hyperlink to a PDF file on the web from a Microsoft WORD for Mac 2011 (14.3.9) document, Safari 7.0 instead displays the file as text?

    When attempting to open a hyperlink to a PDF file on the web from a Microsoft WORD for Mac 2011 (14.3.9) document, Safari 7.0 instead displays the file as text?

    As seen in http://answers.microsoft.com/en-us/mac/forum/macoffice2011-macword/has-the-word- 2011-for-mac-invisible-toolbars/018a3ab6-0570-4ad5-abf8-5b6427fdde3e?msgId=e111b f0a-0e32-4fa3-9536-f349dad8439d
    and it worked for me:
    1. Quit Word
    2. In the Finder's menu bar, select Go > Go to folder and type or paste: ~/Library/Preferences/
    3. Click on Go
    4. Locate the preference file com.microsoft.Word.plist, then Option-drag it to the desktop to create a backup copy
    5. Go to Applications/Utilities and open Terminal
    6. Paste the following bold command at the $ prompt (it's a single line):
         defaults write com.microsoft.Word 14\\Toolbars\\Show_HIToolbar -boolean TRUE
    7. Press Return and then quit with Command Q
    8. Start Word and test. If the fix works, trash the backup file in the Desktop file. Otherwise, restore it.
    In the original source the author also mentions the change in Word 2008

  • Is there a way that you can have two different text fields (email, phone) that one at least one of them must be completed before submitting the form? Can it be done using javascript in the validation tab? if so, how?

    Is there a way that you can have two different text fields (email, phone) that one at least one of them must be completed before submitting the form? Can it be done using javascript in the validation tab? if so, how?

    Here is one solution:
    // mouse up action for submit button;
    function GetField(cName) {
    // get field object for cName field with error checking;
    var oField = this.getField(cName);
    if(oField == null) app.alert("Error accessing field named " + cName + "\nPleae verigy field name, spelling and capitalizeation.", 1, 0);
    return oField;
    } // end GetField function;
    var oPhone = GetField("phone");
    oPhone.required = oPhone.value == oPhone.defaultValue;
    var oEmail = GetField("email");
    oEmail.required = oEmail.value == oEmail.defaultValue;
    if(oPhone.required && oEmail.required) {
    app.alert("Missing required fields.", 1, 0);
    } else {
    app.alert("Submitting form", 3, 0);
    // additional code for submission;

  • I have downlades a text tone from itunes how do i get it as my text tone on my iphone 4 ???

    i have downlades a text tone from itunes how do i get it as my text tone on my iphone 4 ???
    PLZ HELP ME !!

    You can't. I don't know what it is you believe you downloaded, but the iPhone does NOT support custom SMS tones at this time. iOS 5 will, but iOS 4 does not.

  • Can someone tell me how to delete a number which is stored in my messages list even though i have deleted the text message itself?

    Hi.  Can anyone help me? I am trying to delete a phone number which appears in my Messages list even though i have deleted the text message content it came from.

    Try logging into your Yahoo account from a computer, search out the contact you are trying to delete and manually correct or delete the bad contact.
    The bad information might be hidden as a second address or other contact information (or misspelled) and not be showing up on the iphone but will pull up the address anyway.
    I had one old address in a contact that kept pulling up each time i tried to email him. The new address was there, but the old address was what the phone kept showing. When I edited the contact info from my computer the old address went away, and the new address started poping up.

  • HT204150 I'm having problems with random contacts disappearing from icloud. I have a saved text from a contact that displays her info but when I look for her in contacts it's missing.

    I'm having problems with random contacts disappearing from icloud. I have a saved text from a contact that displays her info but when I look for her in contacts it's missing.

    It is locked to your sisters carrier.
    She would have to ask her carrier if they unlock iPhones and if she qualifies for this service.

  • Anyone who used WordPerfect remembers their macros--atimesaving "mini-program" (I think they called it) so you wouldn't have to retype often-used text like your name, address, phone number. How do I do this in Firefox?

    I'm sure Firefox has a shortcut so I don't have to retype often-used text over and over again (like my name, address, phone #).
    If anyone remembers using WordPerfect, "macros" was their tool for accomplishing this.
    What's the shortcut in Firefox?

    Firefox does have what is called "Form Autocomplete". It remembers frequently used form entries (such as a name), and suggests them next time you fill out a form.
    [https://support.mozilla.org/en-US/kb/Form-autocomplete https://support.mozilla.org/en-US/kb/Form-autocomplete] explains the feature in more detail, as well as info to make sure it is working properly.

Maybe you are looking for

  • How do I set up wireless printing between my desk jet 2542 and my computer?

    how do I set up wireless printing between my desk jet 2542 and my computer?

  • Elements 11 change position & scale at the same time

    I have Premiere Elements 11. Can I change position and scale of the same clip over time using keyframes? I have figured out how to zoom in and out and how to pan using keyframes, but when I try to do both, the the first effect applied gets reset.

  • Starts then shuts down

    i got home from work yesterday, went to start up my G4 it starts the boot phase with the apple logo and spinning gear and then shuts down. i tried to reset motherboard, i checked both fans which are spinning (rpms?) but i do notice the heat sink is f

  • SOO Site of origin!!... Clarification please!!

    Hello to all, I'm having problems in understanding how bgp choose one route and discard other based in its SOO, for example suppose this example look at the network diagram in the link: Figure 1 Network Diagram for SoO Example (BGP per Neighbor SoO C

  • Error with Filename

    Hi, I am trying to get an Excel File Name using the function module KD_GET_FILENAME_ON_F4 on a Module Pool program. I can see the name of the file but when I click on it it just does not move the filename to the screen field. Using the DEBUGger, I fo