I am trying to run a jQuery function on my HTML page from AS3.
This is my jQuery function:
function loadImage(imageNumber)
{
imageURL = '<img src="images/image' + imageNumber + '.jpg">';
$("#imageBox").html(imageURL);
}
Here are the settings of my flash file in the HTML page:
<param name="allowScriptAccess" value="always" />
<param name="bgcolor" value="#ffffff" />
<embed src="links.swf" quality="high" bgcolor="#ffffff" width="320" height="242" name="links" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
and finally... here is the AS3 script in my .swf file:
function gotoImage1(e:MouseEvent):void {
var jscommand:String = "loadImage(1);"
var link:URLRequest = new URLRequest("javascript:" + jscommand + "");
navigateToURL(link, '_self');
}
Thankyou in advance for taking the time to look and any help is massively appreciated.
Kindest Regards.Tom