[SWFObject] swfObject + Javascript to Flash communication.

ReDrUm redrumnz at gmail.com
Thu Aug 10 21:32:19 PDT 2006


Hi Everyone,

Although this is not specifically an swfObject problem (I don't think), I am
trying to incorporate the macromedia Flash JavaScript Integration Kit into
my site using swfObject.

http://weblogs.macromedia.com/flashjavascript/

I've ended up using the method/scripts used here in this tutorial:

http://www.mustardlab.com/developer/flash/jscommunication/<http://osflash.org/doku.php?id=flashjs>

My aim is to attach and pass variables (containing the source of flv
files) from my thumbnails onClick into my swf containing the FLVPlayBack
component.
I have achieved this in IE however it does not work in Firefox nor Opera. I
was wondering if anyone had any ideas/fixes?

The source code inside my swf looks as follows:
Frame 2:

// no upgrade needed, start the movie
stop();

// This is a temporary variable to set an initial video.
vdoVarSource = "media/TNZ-PureNZ.flv";

// This dynamically sets the video source externally through
JavaScriptFlashGateway.
vdoContainer.onEnterFrame = function () {
 vdoContainer.contentPath = vdoVarSource;
};
The source for the onclick within my php file is as follows:

<?php
// Where $flv = the source path of the flv file e.g. "media/myVideo.flv"
echo '<img src="'.$thumb.'" width="87" height="55" alt="'.$alt.'"
onclick="setFlashVariables(\'sendmovie\',\'vdoVarSource='.$flv.'\')"
/>'."\n";
?>

You can view what i currently have at www.filmproducer.co.nz/TEMPLATE.php

If anyone knows how to get this working in IE AND Firefox/Opera (and
hopefully Safari) I would greatly appreciate it.

Thanks for your help

-- 
Tim Keir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.deconcept.com/pipermail/swfobject-deconcept.com/attachments/20060811/71e88780/attachment-0004.htm>


More information about the Swfobject mailing list