# Call Javascript From Flash - Help Please

**URL:** <https://forum.kirupa.com/t/call-javascript-from-flash-help-please/327729>\
**Category:** flash\
**Created:** [March 23, 2012, 12:53pm UTC](https://forum.kirupa.com/t/call-javascript-from-flash-help-please/327729 "2012-03-23T12:53:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Reinhardt](https://avatars.discourse-cdn.com/v4/letter/r/8e8cbc/32.png) [@Reinhardt](https://forum.kirupa.com/u/Reinhardt)\
**Post date:** [March 23, 2012, 12:53pm UTC](https://forum.kirupa.com/t/call-javascript-from-flash-help-please/327729/1 "2012-03-23T12:53:02Z")

</div>

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](http://manos.malihu.gr/jquery-custom-content-scroller) wbsite with a demo.

The Javascript code that loads the new content looks like this:

```auto
function LoadNewContent(id, file) {
 $("#" + id + " .customScrollBox .content").load(file, function () {
 mCustomScrollbars();
 });
 }

```

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.html .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?
