A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Call Javascript From Flash - Help Please

  1. #1
    Registered User
    Join Date
    Mar 2012

    Call Javascript From Flash - Help Please

    Hi People,

    Ok I have no clue on how to do this, so hopefully someone will be able to save the day?

    Included is an example to look at for those willing to help. I have just extracted the relevant sections from the original source files. The html files are commented as well for ease of reference.

    Now for my problem:

    I have a flash/AS3 slideshow that serves as an abstract for a html based site. There is a catch however... I use a custom content scroller and dynamic content loader (javascript & jQuery) for the body of the site.

    An example of the custom scroller and dynamic conten loader can be seen on the Malihu wbsite with a demo.

    The Javascript code that loads the new content looks like this:
    function LoadNewContent(id, file) {
     $("#" + id + " .customScrollBox .content").load(file, function () {
    The button (its a list item) in the html fie that would trigger the custom content loading looks like this:
    "<li><a onclick="LoadNewContent('mcs_container','about.htm l .content');return false" href="#" class="infos"><span></span></a></li>"

    The ".content" class div is the section im swopping around depending on which link the user clicks. In the case above i dynamically load the contents of the ".content" div from the about.html file into the ".content" div in the index.html file (which is my main file).

    Is there a way to do the same from Flash?
    Attached Files Attached Files

  2. #2
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    press the picture...
    I am not sure what exactly you want. However, here is an example how two flash movies can communicate using javascript:

    May be that helps.
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  3. #3
    Clarance the Clear Boy
    Join Date
    Mar 2012

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center