Calling a function in flash on an HTML page

Hi,
I need help regarding how to call a flash function from an HTML page. The idea is to have a link on my page (HTML link) that once clicked displays a movieclip in flash. I know i have to use the asfunction in HTML. So far I have just created my swf file with a function called showInfo. I've embedded the flash into an HTML page. I have then added a link on the HTML page as follows:
<a href="asfunction:showInfo">Link name</a>
but when I click it says:
"Firefox doesn't know how to open this address, because the protocol (asfunction) isn't associated with any program."
is there a piece of code I need to write in flash for this to work?
Thanks
Eugene

have your html link call a javascript function and use the externalinterface class in flash to communicate between javascript and actionscript.

Similar Messages

  • How to show a MPEG4/H.264 video in Flash in an HTML page?

    Maybe my title isn't clear. I am hoping someone can shed some
    light on the h264 use in flash.
    Instead of displaying a progressive download .FLV video , I
    am trying to have an MPEG4 /h.264 approx. - a 30meg video display
    in flash in an .html page. Quicktime is easy to do, but Flash is my
    goal.
    I read several articles on h264 and flash 9, including this
    adobe
    H264 article but was hoping there might be an easier and maybe
    quicker solution. I did try renaming the .mp4 extension to .flv in
    dreamweaver but it did not display the video. (...unless it was
    downloading the video completely before displaying...not sure)
    There is a ton of sites, blogs and articles on h.264 and how
    flash 9 will display it...but when it comes to how one might
    actually have h.264 in flash on their own site...I am finding it
    difficult to figure out.
    Forgive my lack of action script and Flash knowledge...any
    direction is appreciated.
    Erick

    ...well I did follow that article on playing an h264/mpeg4
    video in flash. It works well, but how would you add playback
    controls?
    FLVPlayback component only allows you to source an FLV video
    not h264/mpeg4.
    This is probably a simple as3 answer...but I am not
    knowledgeable on as3 to know what code to add.
    Any suggests or direction that I should look would be great.
    In the meantime I am researching actionscript 3 to find and anwer.
    E.

  • IPad = webStageView = HTML = call javascript function thru Flash

    Has anyone loaded a HTML file thru webStageView, and then been able to call javascript functions embeded in the HTML through flash.
    I've seen references to using webStageViewBRIDGE but I think that has been depreciated.
    Below is a link to a Adobe tutorial doing this with the htmlLoader class and FLEX.
    Cross-scripting PDF content in an Adobe AIR application
    http://www.adobe.com/devnet/air/flex/quickstart/articles/scripting_pdf.html
    If anyone has successfully been able to do this on the iPad, could you explain how it's done or provide a link to some documentation.
    Thanks...

    Stagewebviewbridge is a 3rd party library (not an official Adobe product). It looks like it is still supported. The technique described should work even if the library isn't being actively developed.
    http://code.google.com/p/stagewebviewbridge/wiki/Communication
    Also, note that most techniques which use the HTMLLoader class will not work with the StageWebView class -- they are entirely different beasts. (Well, to be precise, on desktop computers, StageWebView uses the same Webkit code, but the interface to it is still very different.)

  • How to Call C functions within Flash?

    I have a bunch of functions written in C++. I would like to
    be able to call these functions within my flash application so that
    I can pass data to the functions and get the returned values. Is
    this possible with Flash 8?
    If this is not possible then is there a way that I can have
    Flash share memory space with another stand-alone application? This
    way, a C++ program could read and write data to the shared memory
    and Flash could also read and write to it.

    you can write a dll and then call mmexecute in the flash IDE,
    but I
    think in the player it is not possible.
    mProjector on windows will let you write c plugins that you
    can call from Flash
    http://www.screentime.com/software/mprojector/plugins.html
    give it a look - it might do what you need...
    On 2006-05-04 15:50:24 -0400, "mmakrzem"
    <[email protected]> said:
    > I have a bunch of functions written in C++. I would like
    to be able to
    > call these functions within my flash application so that
    I can pass
    > data to the functions and get the returned values. Is
    this possible
    > with Flash 8?
    >
    > If this is not possible then is there a way that I can
    have Flash
    > share memory space with another stand-alone application?
    This way, a
    > C++ program could read and write data to the shared
    memory and Flash
    > could also read and write to it.
    John Pattenden
    Screentime Media
    Flash Screen Saver, Application and Wallpaper tools
    http://www.screentime.com

  • How to call javascript function in Flash

    Please help...
    I have a site that run multiple of domain for example
    Domain (A): raymond.com
    Domain (B): raymond.ca
    The problem is this.. when (B) html page load the flash file
    that locate at (A) it load but non of the buttons work which call
    javascript function using getURL("javascript:showpopup()"); But it
    work fine if all reside on the same domain,eg( (A) html page load
    flash file form (A)). Anyone know how to solve this other than
    create a set of flash files on (B).
    Regards,
    Raymond

    http://livedocs.adobe.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?cont ext=Flash_MX_2004&file=00001750.html

  • Calling flex functions from flash swf (AS3)

    Hi all, i'm stuck with communication between loaded AS3 SWF
    from Flash and Flex3 project. I use SWFLoader for runtime loading
    SWF, call functions inside SWF, but cannot find the way to call
    functions declared in Flex project. I try to use ExternalInterface
    class, but it does not help me, or maybe i use it incorrect. Is
    there a method to call Flex user declared functions from Flash SWF?
    All i need is a syntax sample, thank you in advance!

    Also, application.application will point to the top-level app
    scope, even from a loaded swf.
    I believe parentApplication will resolve to what you usually
    want as well.
    For looser coupling, consider using a bubbling event.
    Tracy

  • Incorrect functionality of Embedded tag in html page, displaying object on top of all layers of Adobe air application native window

    Title
    Incorrect functionality of embed tag in html loader for adobe air development
    Description
    Problem Description: If we had loaded youtube.com video url in a view stack and navigate to other index of stack or away from we UI screen within the same native window video or embeded tag of flash player or any other embed object will be displayed on top of all screens layer in same position of where the object should be placed in side of html loader only.
    Steps to Reproduce:
    1) go to http://get.straweb.com/StraWebBrowser/StraWebBrowser.air download and install
    2) load 2 tabs and in the 3 tab load video player of youtube.com which will a sample video
    before completing the load of 3 tab which trying to load video from youtube.com, navigate to other tabs 1 or 2 in few second once the flash player of youtube.com video player is load it will display in the current tab or UI screen.
    3) Try navigating to other tabs than youtube.com loaded tab you see the flash player is on top it stable.
    4) navigate to 3 tab and try to navigate to other tab you can observe that so how it will not show that flash player and only visible in that 3 tab which is fine.
    Actual Result: Embedded tag of html page displaying on top of all layers of Adobe air application native window
    Expected Result: Embedded tag of html page should only displayed in side htmlloader
    This you can replicate in any adobe air plugin update and on any Hardware and Environment.
    Applicable to all sdk versions of adobe air.

    Adobe Bugbase: Bug 3823839 Incorrect functionality of embed tag in html loader for adobe air development

  • Flash button in html page

    Hello,
    I have created button in flash and I want that each time I
    press on the button, html page will open in frame name mainFrame in
    my site the problem is the html page always open in new window.
    As you can see in the code attach, I have two frames in my
    page one called leftFrame and the flash button is in there, and the
    other is mainFrame which i want to open test.html in
    any idea how to solve this?
    thanks

    What happens if you use the full absolute url instead of a
    relative url?

  • Flash plays before html page is completely loaded

    A flash intro for a website's homepage starts to play before
    the html page
    elements are completely loaded and visible. The html page is
    not
    complicated so it would seem the flash is even slowing down
    the loading of
    the html and it looks bad, but not terrible. Is there a way
    to, like,
    prioritize the loading of the page elements?

    Sorry, I didn't design the HTML page but I'm sure it was
    tested in a few
    different browsers. I'm not sure if it happened on all or
    some. The sites
    already live so the designer did not think it was a problem.
    Just thought
    there may be a stacking order or something that would load
    the background
    before the Flash starts playing. Thanks for your help.

  • Flash file in html page

    Hey guys, i made an flash swf and i want to put it in an html page and upload it. But when i go to the page i cant see nothing, here is the file:
    http://triplew.com.gr/cathedral/try.rar
    Whats wrong? I save it first to the www folder (wamp server local) and then i upload it to the site.

    thank you the problem was at the flash version problem solved

  • How to embed Flash Player into HTML page

    Hello,
    I have a question for some gurus who know very well the
    Javascript.
    Namelly what i want is to add <object> tag to the
    current html page programatically with using JAVA SCRIPT.
    As IE is more forgiving it displays the object properly but,
    in Firefox it behaves a bit different. Actually it doesn't appear
    at all in Mozilla browser. Any good sample would be great help.
    I was wondering what i am doing wrong?
    Thanks :)

    thanks.
    i am giving my problem clearly. i have one applet. Previously i am loading the applet in my html page using object tag like this...
    <OBJECT
    classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH="1000" HEIGHT="300" NAME="grid">
    <PARAM NAME="CODE" VALUE="com.adp.base.applet.PriceGrid.class" >
         <PARAM NAME="ARCHIVE" VALUE="common.jar,classes12.jar,toplink.jar" >
         <PARAM NAME="NAME" VALUE="grid" >
    <PARAM NAME="type" VALUE="application/x-java-applet">
    <PARAM NAME= "cache_option" VALUE ="no">
    </OBJECT>
    now what i need to do is
    i need load the applet only first time using web start and when ever the applet code changes in the server i need to reload the applet.
    for that i kept all the applet resources in .jnlp file.i want to cache all the resources which are in .jnlp file and applet must be displayed within a web page within a browser.
    Webstart always open a new application windows.
    I need to run an Applet embedded within a web page within a browser.
    Is there a way to still use Webstart?

  • Flash image and html pages

    I do have an SWF sequence of images in the main html page. In
    the second page I do have sections. Each section has a title of an
    image of the SWF file. The role of this section is to describe the
    image.
    I trying to whenever I click on each image of the SWF in the
    main page, I should be directed to its description in the second
    page, meaning, that the second page should be loaded and its scroll
    down bar should go down and stop where the specific section
    (describing the image I’ve just clicked on) starts.

    I do have an SWF sequence of images in the main html page. In
    the second page I do have sections. Each section has a title of an
    image of the SWF file. The role of this section is to describe the
    image.
    I trying to whenever I click on each image of the SWF in the
    main page, I should be directed to its description in the second
    page, meaning, that the second page should be loaded and its scroll
    down bar should go down and stop where the specific section
    (describing the image I’ve just clicked on) starts.

  • Calling a function in Flash via JavaScript

    My project is in Flash CS3 ActionScript 2. I am using
    JavaScript elements in my project that are called within Flash. The
    following code placed on frame 1 of my main timeline goes to frame
    2 and displays the JavaScript element = that works. Here's the
    code;
    HS_Film_Button.onRelease = function ()
    gotoAndStop(2);
    flash.external.ExternalInterface.call("firehs");
    Now when on frame 2, I want the JavaScript "close button" in
    the element to go to frame 1 on my Flash main timeline. Right now
    what it does is closing itself in frame 2 of my Flash page, so I
    added a flash button in there to go to frame 1. Thus the need to
    double click to finally end up on frame 1. But I want the
    JavaScript element to do that in the first place!
    The real issue here is that the JavaScript element was once
    on my main single frame timeline but its performance (display speed
    and such) was greatly affected by my Flash Time and Date and Frame
    rate calculations. This JavaScript element is based on miliseconds
    and I suspect that my Flash file is based in seconds and that my
    Flash calculations are grabbed by the Browser and directing my
    JavaScript element.....Hey I am getting lost I hope you kind of see
    what I mean. Anyways, if I could just get rid of frame 2 all
    together and have some kind of coding that would eighther have
    Flash calculate in miliseconds rather than seconds????? to match my
    JavaScript one.... Or codify JavaScript so that when called it
    would take over and tell the Browser to change its calculations
    rates?
    If you wish please have a look at the Forum topic postings
    where all of this is evolving with questions examples and
    answers....This link gets you right in the posting.
    Highslide
    JS Forum
    This is where Flash meets JavaScript! I need help please.
    Kind Regards
    Pierre

    Hi, Since your reply I have been trying to follow your
    direction and found a couple of things,
    My flash site is based on the AC_FL_RunContent JS file
    not the
    <object classid= ..............>
    <param name="allowScriptAccess" value="
    sameDomain" /> which element in bold should probably be
    repalced by "always" for the externalinterface addCallback() to
    work properly. The question being what code I have to ad to the
    AC_FL_RunContent JS file for allowScriptAccess.......
    quote:
    ExternalInterface is similar in functionality to the
    CallFrame() method but is more flexible and more generally
    applicable. ExternalInterface is the preferred method for
    JavaScript–ActionScript communication in Flash Player 8 and
    later.
    So I see I could use externalinterface addCallFrame() for
    achieving Javascript to ActionScript communication ; when
    Javascript close button is pressed Flash goes to frame 1........
    The latest hint I got from Highslide JS was to add the
    following in the Head section;
    <script type="text/javascript">
    hs.Expander.prototype.onBeforeClose = function (sender) {
    return confirm("Do you really want to close this nice
    image?");
    </script>
    The line in bold should be the code to call to go to frame 1
    in Flash and the onBeforeClose should probably be onAfterClose.
    Anyways, I am completely lost in space = could you really hep
    me out with this code by code and where to put those exact
    codes.....please
    Pierre

  • Calling .jsx functions from .js files using HTML Widget

    Hi there,
    I'm using the HTML Widget in a panel to load an html file along with some javascript files. Is there a way to call .jsx Adobe functions from a .js file? I've successfully been able to call an alert() of a .jsx file from the html but have not been able to do anything further than that.
    For example:
    .js file:
    var x = foo('bar');
    alert(x);
    .jsx file:
    function foo(x) {
        alert('This works');
        var dir = $.fileName;
        alert('This doesn't work because of $.fileName');
        return 'Directory: ' + dir;}
    So, ultimately I would like to have an HTML Widget in my panel, press a link that will call fiddle with the open document and layer, then return some values back to the HTML Widget's js file.
    Thanks

    To the client browser, JSP is just HTML. Adding JS makes it DHTML, which provides the kind of applet/web page interaction you were referring to in the first post. Note that the applet and JS are both being run 'client side', whereas the JSP is generated 'server side'.
    A JSP environment can in some cases replace the JS (e.g. submit a form with values to the server, and use JSP to write the resulting applet page). This can be handy in the event that the end user does not have JS enabled, in that you can offer a 'pure HTML' solution. OTOH though, it is slower (requires a round trip to the server to do what the user asked for) and most users prefer the quicker 'click and see' philosophy of the Java/JS combo.
    So, my advice to you is that JSP adds very little value, here.

  • Flash Animation in HTML page

    I have an HTML site (unfortunately only an intranet site so I
    can't share) that has swfs used in various places. The home page of
    the site has a movie that I would like, if possible to only play
    when a user enters the site. If, during a session they leave the
    home page for another page within the site, and then come back to
    the home page, I would prefer them not to see a particular
    animation again because once they've seen it, it can be annoying to
    see it each time they come back to the home page. Is there a way,
    with javascript, to make this happen? I don't think it is anything
    I can build into the movie with flash.

    what about using cookies and two versions of the page--one
    with and one without animations? an if statement could look at the
    cookie and load accordingly, maybe.

Maybe you are looking for

  • Problem with the Code in exercise 1.2

    In this exercise: http://www.adobe.com/devnet/flex/pdfs/exercise1.2.pdf the first part is easy. Then you are instructed to go to the Debug Perspective and set a breakpoint that is below the function you defined, but ahead of the variable array. You a

  • ICE Wizard modifying details in eDir

    Hi. OK, so the objective is to modify all of our users phonenumbers and mobile numbers. So the two fields are TELEPHONENUMBER and MOBILE I'm trying to update these via a csv excel file. using : instead of , as the separator I exported them. I was try

  • Setting up Mail on iPod Touch with a POP server

    I can create an email account setup on my iPod Touch using my ISPs' POP connection. However if I go onto my wifes' MacBook or my MacBook Pro under Mail it shows the messages as still being unread. Is there any solution to this issue, so that once I r

  • 9iAS with many OC4J Containers

    Hello, I am having a problem with a 9iAS farm. We've got an infrastructure (9.0.2 patched to 9.0.3) and on the Application Server we try to use more than 10 OC4J containers. After trying to start the 10-th container, there is a timeout error: dcmctl

  • ITunes 11.1.3 download fails to install for Windows XP

    Currently have iTunes 11.1.2.32 installed on a Windows XP SP3 PC. Control Panel lists version as 11.1.1.?. After downloading 11.1.3 install fails because "older version can't be removed". Uninstall of older version from Control Panel also fails.