Mango
Mango

Reputation: 175

Run Jquery function on actionscript 2.0

I have a function in jquery I would like run in flash using action script 2.0

The Jquery:

<script>
$(document).ready(function(){  
$("a").click(function(event){
            $("div#Header").height(97)
             .css({cursor:"auto", backgroundColor:"#FCC"});
 });
});
</script>

The Html

<a href="#">Run</a>

How I do this in actionscript 2.0?

Upvotes: 2

Views: 1389

Answers (1)

Ben Regenspan
Ben Regenspan

Reputation: 10548

ExternalInterface lets you call Javascript functions from Flash. The simplest thing to do would be to place your code inside a Javascript function defined in the HEAD of the page (or otherwise above where the SWF is embedded), then call:

ExternalInterface.call("yourFunctionName");

More on ExternalInterface in this old SO question.

Upvotes: 2

Related Questions