<div><span class="gmail_quote">On 10/11/06, <b class="gmail_sendername">Sam Sherlock</b> <<a href="mailto:sam.sherlock@gmail.com">
sam.sherlock@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
yep I have jsfc working alongside jquery (mostly straight forward)
see - <a href="http://www.sharkevaderproductions.com/v5/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.sharkevaderproductions.com/v5/</a>
jquery (and a shed load of plugins)
jsfc
and ufo all playing nicely
if you're code works I will be able to replace the ufo (its currently hack [I had to add a line to call the function to set the flashcommunicator]) script with your plugin and thats akin to making a call back to set the flash commmunicator (it achieves the same results AFAIAC)
I intend to have a more in depth look the mike chambers project, the jsfc <div><span class="e" id="q_10ed36ae774091a4_1">
<div><span class="gmail_quote">On 10/11/06, <b class="gmail_sendername">Luke Lutman
</b> <<a href="mailto:luke@zincroe.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
luke@zincroe.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Interesting... :-)
It would be pretty easy to use those libraries alongside my plugin, but replicating what they do
is probably beyond the scope of my plugin (a separate one, maybe?).
Try this (with JSFC):
var fc;
$('#element').flash(...).find('embed').each(function(){
fc = new JSFCommunicator(this);
}).end();
Then you should be able to use fc in the same way.
Note that this would only work for a single flash movie, but it could be setup for multiple
flash movies (by pushing the JSFCommunicator objects into an Array?) if that's what your after.
Luke
Sam Sherlock wrote:
> Hi Luke,
>
> here is the state of play:
>
> jsfc - <a href="http://www.abdulqabiz.com/files/JSFC/example.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.abdulqabiz.com/files/JSFC/example.html</a> (src available to)
>
> also theres this -
> <a href="http://weblogs.macromedia.com/flashjavascript/readme.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://weblogs.macromedia.com/flashjavascript/readme.html</a> (mike chambers
> again!!)
>
> Its not when its fully loaded! but its also not when document.ready
> either. Its a pain!!!
>
> For flash8 theres extendedinterface though - which looks great!
>
> would be interesting to see what you make of the above
>
> -S
>
> On 10/11/06, *Luke Lutman* <<a href="mailto:luke@zincroe.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
luke@zincroe.com</a> <mailto:<a href="mailto:luke@zincroe.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
luke@zincroe.com</a>>>
> wrote:
>
> Hey Sam,
>
> Thanks for all the kind words :-)
>
> I've (been lucky?) never to need to communicate between flash and
> javascript, so I'm a bit out of the loop on how that whole process
> works.
>
> If it's simply needing access to the <embed /> element after it's
> inserted into the dom, it should be pretty simple (off the top of my
> head):
>
> $('#hello').flash(...).find('embed').each(function(){
> // do stuff
> }).end();
>
> If you need to wait until the flash movie has fully loaded before
> creating your object, that's a whole 'nother ballgame.
>
> Could you call an javascript function from within the flash movie that
> creates the object you need? Something like:
>
> - load page
> - insert flash movie
> - flash movie preloads itself
> - flash movie calls someFunction() in javascript
> - someFunction() creates the object that talks to flash
> - ....
> - Profit!
>
> ;-)
>
> That'd probably work ok if you only have one flash movie calling
> someFunction(), but would get a little hairy otherwise because
> someFunction() wouldn't know which element in the DOM called it.
>
> If <embed /> or <object /> fire onload events, it'd be possible to add a
> callback function -- but I'm pretty skeptical that they'd fire the
> event
> with any sort of consistency across browsers (if at all).
>
> You could use an Image object to preload your swf (if it's small), so
> that it'd come from the cache when inserted into the page (using the
> Image object's onload event to trigger the $().flash call).
>
> Last but not least, you could wait for window.onload
(instead of
> document.ready), but there might be quite a gap between when the flash
> movie finishes loading and window.onload is called
>
> Hope that helps!
>
> Luke
>
> Sam Sherlock wrote:
> > I am astounded Luke remarkable stuff.
> >
> > Looks like I might be able to reduce my script over heads quite a bit
> > with this.
> >
> > At first glance (through tired eyes n with fatigued mind) it
> appears to
> > handle text replacement better than the existing sifr jquery plugin.
> >
> > I am working away on a project at mo that makes call into and out of
> > flash using Flash version 7 (flash 8 has extended interface which
> sounds
> > great), to work this I am using JSFC (JavaScript
> FlashCommmunicator - it
> > works well in all browser I have tested so far) I have had some jip
> > with creating the object to talk to flash, as it needs to be created
> > after the flash is full placed in page (which can be sometime after
> > document.ready fires) - would your plugin be able to aide me here?
> >
> > 1) Either by being able to call function within flash? (Previous
> > points have been aired claiming that this is best not done with
> jquery)
> > 2) Could a call back be made to fire when flash is set in the page?
> >
> > In any case the script is piece of sheer wonderment
> >
> > -S
>
>
> _______________________________________________
> jQuery mailing list
> <a href="mailto:discuss@jquery.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
discuss@jquery.com</a> <mailto:<a href="mailto:discuss@jquery.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
discuss@jquery.com</a>>
> <a href="http://jquery.com/discuss/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://jquery.com/discuss/</a> <<a href="http://jquery.com/discuss/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://jquery.com/discuss/</a>>>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> jQuery mailing list
> <a href="mailto:discuss@jquery.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
discuss@jquery.com</a>
> <a href="http://jquery.com/discuss/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://jquery.com/discuss/</a>
--
zinc Roe Design
<a href="http://www.zincroe.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">www.zincroe.com</a>
(647) 477-6016
_______________________________________________
jQuery mailing list
<a href="mailto:discuss@jquery.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
discuss@jquery.com</a>
<a href="http://jquery.com/discuss/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://jquery.com/discuss/</a></blockquote></div>
</span></div></blockquote></div>
_______________________________________________
jQuery mailing list
discuss@jquery.comhttp://jquery.com/discuss/