I am trying to make an image gallery that provides thumbnails in HTML and when clicked on the full resolution of that image is loaded into a .swf file on the same page, into a movie container.
I have resourced Macromedia’s site as well as ActionScript.org and cannot figure out what is going on. Right now, the JavaScript is not sending the string to the Flash file at all, even in a dynamic text field. I also am not sure if Flash can open .gif files as well as how to set the movieclip to a variable, if it is needed at all. Any advice and help you can give would be great - and all files are accounted for.
<HTML>
<HEAD>
<TITLE>Javascript to ActionScript/Flash Demo</TITLE>
<SCRIPT LANGUAGE=JavaScript>
<!--
function doPassVar(args){
alert(args);
window.document.hrker.SetVariable("whichOne", args);
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<a href="#" onClick="doPassVar('test/001full.gif')"><IMG SRC="test/001thumb.gif"></a>
<a href="#" onClick="doPassVar('test/002full.gif')"><IMG SRC="test/002thumb.gif"></a> <br><br>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="400" height="250" id="hrker" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="full.swf" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="scale" value="exactfit" /><param name="bgcolor" value="#000000" /><embed src="full.swf" loop="false" menu="false" quality="high" scale="exactfit" bgcolor="#000000" width="400" height="250" name="hrker" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" swLiveConnect="true" />
</object>
</BODY>
</HTML>
Flash container code:
onClipEvent (enterFrame) {
this.loadMovie(_root.whichOne);
}
I know I will encounter problems with variables with that simple coding but I would just like this function to work right now with at least one image. Thanks for your time!