How to use a link to execute an ActionScript function in a SWF file?

In the Actionscript 3.0 language and components reference > all categories > class TextField > properties > HTML htmlText supported tags table, the description of the anchor tag has this sentence: "you can use the link event causes the link execute an ActionScript function in a SWF file instead of opening a URL. I do not understand how to do this. Can someone tell me how to proceed? Alternatively, can anyone point me to an example or a reference that explains how to run an ActionScript function in a SWF file using the event of links?

Thank you

Tim Persinger

You put a href as you normally would, just by using events: define as follows:

someTextField.htmlText = "Hello World";
someTextField.addEventListener (TextEvent.LINK, hwPressed);
function hwPressed(e:TextEvent) {}
trace (e.Text);
}

will trace "hw".

Tags: Adobe Animate

Similar Questions

  • How to use the node to call a library function to convert C++ source codes

    Hi all

    There are two dll name 'QMSL_WLAN_Transport.dll' and 'QCAMSL_MSVC10R.dll' and some codes c ++ to connect to the DUT. The two DLLs work together for communicaite with the DUT.

    I am confused as how to use the node to call a library function to load the 'QCAMSL_MSVC10R.dll' function as

    g_hResourceContext = QLIB_ConnectServer_UserDefinedTransport((HANDLE) USER_HANDLE,
    UserDefinedSend,
    UserDefinedReceive,
    UserDefinedFlushTxRx,
    true,
    true);
    

    It seems that 'UserDefinedReceive, UserDefinedSend, UserDefinedFlushTxRx' Processaddress?  And "UserDefinedReceive, UserDefinedSend, UserDefinedFlushTxRx"'s functions in 'QMSL_WLAN_Transport.dll '.

    UserDefinedReceive = (_UserDefinedReceive)GetProcAddress(hUDT,"UserDefinedReceive");
    UserDefinedSend = (_UserDefinedSend)GetProcAddress(hUDT,"UserDefinedSend");
    UserDefinedFlushTxRx = (_UserDefinedFlushTxRx)GetProcAddress(hUDT,"UserDefinedFlushTxRx");
    

    Attached DLLs and C++ code snippets.

    Need help.

    Thank you.

    These parameters are reminders - pointers to functions that are called by the DLL - and there is no way to duplicate this purely in LabVIEW. Search this forum for the word "recall" and you will find similar questions (for other DLLs). You will need to write your own DLL (in C, C++, etc.) that implements these functions and provides a way to transfer data to LabVIEW.

  • How to use windows search to search the contents of a bunch of files with random names / extensions?

    How to use windows search to search the contents of a bunch of files with random names / extensions? Plain txt files say 1,000 with random name of file extensions?

    You can always search within those, but you need to add extensions to the file system so that it knows to look inside these files.  You said that you have a lot, so it's perhaps tedious.  Here's How to search within several types of files.

    One thing you could try is rather to make a copy of this file, rename all the files to the same extension (even an extension false for example something.bill) and perform your search on this band.  Just an idea.

  • Does anyone know how to use the movement of scroller with the function of the fluid width?

    Hi all

    Does anyone know how to use the movement of scroller with the function of the fluid width?

    Thanks, Federico

    This feature is not yet implemented.

  • How can I configure Adobe Flash Player as default program to open SWF files?

    Overview of basic

    I have this work very well to my laptop at home, but I need this working for school projects.

    Whenever I want to open a SWF file at home, I just double click it and open it in Adobe Flash Player (Adobe Flash Player 10.0 r22) and I have no problem!

    However, when I'm at school I have to run in Internet Explorer, the file SWF, Adobe Flash Player IS installed, but the SWF files are opened directly, they are opened in Internet Explorer.

    At home

    If I right click on a SWF file at home and select 'Open with', and then "choose default program...". ", Adobe Flash Player is already there under the name" Adobe Flash Player 10.0 r22 ", so I can select the default value. (On my laptop at home)

    At the school

    In school, so go to "Open with", then "choose default program... ", Adobe Flash Player IS NOT there, only Internet Explorer and other programs in the box of other programs. (On my laptop to school)

    Question

    How can I assign Adobe Flash Player as default program to open SWF files (on my laptop to school)? If I select "Browse...". "and go to C:\WINDOWS\System32\Macromed\Flash there is no file with a description of" Adobe Flash Player 10.0 r22 ", is the file for the program located somewhere else, or I'm just not properly looked into the record?

    I really need these files open in Adobe Flash Player directly and not in Internet Explorer (I know that you can set the view to 100% and do it properly sized)

    Thanks to all who help!
    -Charlie! (Yes I know, that I need not write this in a forum)

    The standard Flash Player is a browser add-on and not a standalone player.  So what in fact opens when you open a SWF file at home?  Flash Player projector?

    If so, you must also download in your school, to http://www.adobe.com/support/flashplayer/downloads.html, then make the file association.

  • How to use two different versions of the stub of Web Services SDK files in a single project (5.5 and 6.0)

    Hello

    I have a project that uses the vSphere 5.5 management SDK (I built the stub files according to the documentation) and have these in my c# Solution. Everything works beautifully. My class files that interact with vSphere all have a use statement as follows:

    using Vim25Api;

    All fine so far.

    Now, I want to be able to provide support for a user to connect to vSphere 5.5 and 6.0 vSphere environments. I built the stub files for vSphere Management 6.0 SDK and those in my solution presented in a separate project. Each project is based on a different class library and I have each set of files for each version of vSphere stub in different NuGet packages. However, when I select to use a vSphere 5.5 connection, it seems that internally the 6.0 files stub are used, or vice versa.

    I tried to separate things out by giving the Vim25Service.dll and Vim25Service.XmlSerializers.dll files for each version of alias names (alias by default for all assemblies is "global", but I changed it to vSphere5 and vSphere6 for each version. Then at the top of each class file before all with what I'm doing:

    extern alias vSphere5;

    or

    extern alias vSphere6

    (According to what project I'm in). Then, use the using statement for each class file that interacts with vSphere using vSphere5::Vim25Api; or using vSphere6::Vim25Api; to use the files to correct/stub namespace for each version I support.

    However this still doesn't seem to work, and things seem to be getting confused upwards somehow. I take a guess that internal files make calls and somehow have crossed.

    Is it possible to use two stub version of vSphere together different files in the same project? How should I handle my script? I thought of just upgrading to use the version of vSphere 6 (I can always connect to vCenter 5.5 using these, but some of the properties on the object have changed, (for example some dynamic properties on AlarmObjects and other items have been removed and code breaks if I delete the references to the stub vSphere 5.5 files.) So, I want to keep two different versions and use each of them separately in the same solution, so I support vSphere 5.5 and vSphere 6.

    Solved - this using wsdl.exe and just by specifying a different namespace to use in the proxy class that is generated by using the /n switch.

    for example using PowerShell to build automatically, the value $VimApi and do:

    WSDL.exe/n:$ VimApi...

  • How to use PS to judge the existence of a file in the directory specified and how to use PS to the directory specified for create to create the file? (javascript)

    1, how to use PS to judge of the existence of a file in the specified directory? (using javascript)

    2, how to use PS to the directory specified for create to create the folder? (using javascript)


    Thank you!

    If (Folder(/*_insert_the_path_here_*/).exists == false) {Folder(/*_insert_the_path_here_*/).create()}

  • How can we change the green 'Adobe Captivate"loading animation in a SWF file?

    Hello!

    I would like to replace the loading image that I inserted (below) to something else.

    It is the loading image that appears when the SWF file loads in a browser.

    Does anyone know how to do this?

    Thank you

    Loading.PNG

    Go to edit, preferences, project, start and end and the icon of the browser to the right of the Preloader to choose another preloader.

    Lilybiri

  • How to use MouseEvent and KeyboardEvent on the same function?

    It's maybe a stupid question, but I'll ask her.

    I did a login (textfield and a button).

    mybutton.addEventListener(MouseEvent.CLICK, loginCheck); It's my button

    function loginCheck(event:MouseEvent):void {}
    My code for the function here

    }

    In order to make the connection by using the Enter key, I tried to add:

    myText.addEventListener (KeyboardEvent.KEY_DOWN, keyEnter);
    function keyEnter(event:KeyboardEvent): void
    {
    If (event.keyCode is Keyboard.ENTER)
    {
    loginCheck();
    }
    }

    But of course it won't work because loginCheck is a function of MouseEvent.

    How can I make it work?

    It does not appear that you will use one of the properties of type event mouse or keyboard in loginCheck, right? Then, you can simply set the type of the parameter in loginCheck() to the event instead and add the event argument in keyEnter() when calling loginCheck() from here-> loginCheck (event).

    rmybutton.addEventListene (MouseEvent.CLICK, loginCheck, false, 0, true); It's my button

    function loginCheck(event:Event):void {}
    logic of connection here

    }

    myText.addEventListener (KeyboardEvent.KEY_DOWN, keyEnter, false, 0, true);
    function keyEnter(event:KeyboardEvent): void
    {
    If (event.keyCode is Keyboard.ENTER)
    {
    loginCheck (event);
    }
    }

    TS

  • How to use the Mac keyboard to perform the function () more?

    When you use the Mac Calculator application, I am able to subtract using my mac keyboard, but I seem to be unable to add w/out using the mouse. Am I missing something?

    More then is to remove your keyboard (top-right). It is above the "equal" sign. The items that are displayed above the other characters require that you press shift to enter.

  • How to use the type of packages, procedures and functions in another schema?

    I have two schema target in an OWB project, such as A and b. In a map of A, I would use some packet types, functions and procedures of B. I tried the method of the suggested such synonym, but I couldn't find the metadata of these when importing... The only type of synonym I can import is the synonym for the table. Y at - it a bug for synonym?

    If I can't use a synonym for that matter, is there another way to solve the problem?

    Now, in some cases you will absolutely need to create the second module as Carsten described, but it should also be noted that you can reference objects in things like Expressions even if you have not loaded the metadata. It's only when you need strong bonding that it becomes necessary to import objects. For everything else, as long as the reference can solve during the compilation so you are good to go.

    For example, I target a function in a schema (S1) and a synonym private that it in another (s2). A mapping of the S2 schema has an expression object that uses the synonym of the function in the expression property for a couple of the attirbutes of output. The synonym has not been loaded in metadata - OWB has indeed no knowledge of its existence. But she is resolved at compile time if the mapping validates and generates successfully.

    Mike

  • How to use the backup to my new 6s function when my iPhone 5 c is running iOS 9.2 as it says it is incompatible, in trying to use iCloud saving

    iPhone 6s start-up aid

    Update the new phone first. Settings > general > software update. Accept the update, download and install it. Once the phone lights up and takes you through the installation process, go to settings > General > reset > erase content and settings. The phone will restart, take you through the installer again and you will be asked to you want to restore the backup to iCloud. Say yes to that, choose the backup you want and let the process complete.

  • How can I call functions of a SWF file loaded into another swf?

    Hello

    Please excuse my ignorance, I am very new to actionscript and flash.

    I have 2 Fund sovereigns - a.swf and b.swf.

    I load b.swf in a.swf with the following code:

    var swfLoader:MovieClipLoader = new MovieClipLoader();
    swfLoader.loadClip("b.swf", container_mc);
    

    Now in b.swf, I have a function as follows:

    public function sendData(){
      trace("I ran the function!");
    }
    

    So I did a lot of reading, from what I can tell, I should be able to perform the function of sendData() from code in a.swf, by typing:

    container_mc.sendData();
    

    but it's not working. What I am doing wrong?

    Thanks in advance,

    Adam

    container_mc. SendData();

    will work AFTER THAT b.swf is initialized.  That is to say, use a listener to detect that.

  • What is the use of links and the executable section in a pageDef?

    Hello

    What is the use of links and executable section in a page view definition file.

    I know that we can add different types of links to page with links that are not there in the page what use executable?

    If I click on the icon I get different types of iterators and stocks + green. If the two are even why we we both kept?

    Thank you

    REDA

    Hi Ashish I put in it,

    Now, only I realized the problem is with the lifecycle ADF

    If I place a logging operation in the method of the request form, we will see that the method is called twice and that is why exceptions are thrown. Change the property of refreshment of the invokeAction of prepareModel to renderModelIfNeeded. The commit operation will work with this change and the invokeAction will be called once again because it will be necessary. Once again, the point of the example is to call the invokeAction but for the validation button, as is evident, the value of prepareModel was not enough. The value renderModuleIfNeeded ends the validation operation. .

  • How to use the date with the report parameter format

    Hi all

    How to use the date format with this tag function,

    <? param@begin:P_FROM_DATE? > <? $P_FROM_DATE? >

    This date of form source of report and setting is coming as this 2012/11/01 00:00:00.

    So now I need this in MY-DD-YYYY marker. I tried like this..? param@begin:P_FROM_DATE? > <? $format - date: P_FROM_DATE; ' DD-MON-YYYY '? >

    but its giving error. Can someone pls how to convert to the format of date custom.

    Thanks and greetings
    Srikkanth.M

    Problem solved.

    REF this link

    Date Format of XML

Maybe you are looking for

  • Bring back the 'Hide Menu Bar' option Apple!

    I don't like using iTunes with the menu bar being there all the time. It makes iTunes appear cluttered! Clear, clean and simple, being one of the reasons why I like Apple. Please Apple bring the option to hide the menu bar. Concerning

  • How can I change my password I clouds?

    How can I change my password I clouds?

  • Satellite A100-003: the Vista Explorer displays blank DVD

    A few months after his dvd player, I bought my laptop started to behave very strange. Right now, most of the cds and dvds that I get is recognised as void by windows Explorer (I am running Windows Vista Home Premium 32 bit English, bought with the ma

  • HP officejet pro k5400 print hieroglyphics from my computer windows 7 when network attached so

    my HP officejet Pro K5400 to print hieroglyphics from my computer windows 7 - both when attached USB or Network attached. It was printing fine before when network.  has taken a different and trendy site via USB and has not printed correctly since.  P

  • QT and OpenGL not made

    I have implemented the example in the SDK of 4.8 Qt under opengl/cube. http://Qt.Gitorious.org/Qt/Qt/trees/4.8/examples/OpenGL/cube I have modified so that it works on the PlayBook (that is, do not use QWindow). It runs great on Ubuntu in Qt Creator.