Re: [jQuery] Media plugins

2006-11-11 Thread Luke Lutman
Just to make sure I'm understanding the problem, you want to hide the 
contents of #hdr (i.e. the html version of the nav, etc.) after the 
flash is inserted, right?

If so, then all you should need to do is:

$('#hdr').flash(sharkOptions.ufo, {version: 
7}).find('embed').each(function(){
 fc = new JSFCommunicator(this);
 sharkOptions.page.isFC = true;
}).end();

And add the following to your stylesheet:

.flash-replaced .alt {
 display: none; }

The 'function(htmlOptions){...}' in the text-replacement example is used 
by jQuery.fn.flash() -- instead of the default, jQuery.fn.flash.replace 
-- to measure the content that's being replaced. You could use something 
similar if you want to literally replace the content of #hdr (instead of 
prepending into #hdr), like this:

$('#hdr').flash(sharkOptions.ufo, {version:7}, function(htmlOptions){
 $(this).html(jQuery.fn.flash.transform(htmlOptions));
}).find('embed').each(function(){
 fc = new JSFCommunicator(this);
 sharkOptions.page.isFC = true;
}).end();

Luke


Sam Sherlock wrote:
> solved it myself, just whilst collecting the code to post.
> 
> Late night early morning splurge of coding to excited to sleep after see 
> this wonderful code
> 
> yep thats solved but I would like to be able to hide replace code in the 
> nested div
> 
> looking at the sifr example I see that after the version object you  
> have a function(htmlOptions) {...}
> 
> when I try this
> 
> //   
> $('#hdr').flash(sharkOptions.ufo, {version: 
> 7}).find('embed').each(function(){
>fc = new JSFCommunicator(this);
> $('#hdr').addClass('flash-replaced');
> sharkOptions.page.isFC = true;
> }).end();
> 
> it works though this is different from the sifr example since the class 
> is added to the #hdr from within the each call
> that might not be crucial anyway - just perplexing - would like to know 
> more to further my understanding though.
> 
> thx -S
> 
> On 11/11/06, *Luke Lutman* <[EMAIL PROTECTED] > 
> wrote:
> 
> Can you post the code (or a link to it)?
> 
> What error does it throw?
> 
> ...
> 
> Also, my text-replacement example
> (http://jquery.lukelutman.com/plugins/flash/example-text-replacement.html
> 
> )
> isn't fully cooked yet -- it's functional, but I'm planning to develop
> it as a proper plugin (soon, hopefully!). If you do want to try it, make
> sure you grab the fla, as that's custom too -- css (flash 7) and better
> anti-aliasing (flash 8).
> 
> Luke
> 
> Sam Sherlock wrote:
>  > astonishing stuff!!! That works a treat!
>  >
>  > I am also using the sifr jquery plugin (really feature filled
> site this)
>  > and have tried
>  > to alter the code to use your flash plugin instead.  I guess its one
>  > stage at a time!!
>  >
>  > However I am unable to set the version it aways throws an error
> whatever
>  > I do!?!
>  >
>  > I updated to jquery 1.0.3 (had to make other changes json - getJSON)
>  > this did not solve the issue
>  >
>  > any idea about that?  I think the issue with the version setting is
>  > causing some issue with using it instead of the sifr thingy since
> I need
>  > to have a htmloptions callback function
> 
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com 
> http://jquery.com/discuss/
> 
> 
> 
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Media plugins

2006-11-10 Thread Sam Sherlock
solved it myself, just whilst collecting the code to post.Late night early morning splurge of coding to excited to sleep after see this wonderful code 
yep thats solved but I would like to be able to hide replace code in the nested divlooking at the sifr example I see that after the version object you  have a function(htmlOptions) {...}when I try this 
//                    $('#hdr').flash(sharkOptions.ufo, {version: 7}).find('embed').each(function(){                   fc = new JSFCommunicator(this);                        $('#hdr').addClass('flash-replaced');
                        sharkOptions.page.isFC = true;                }).end();it works though this is different from the sifr example since the class is added to the #hdr from within the each callthat might not be crucial anyway - just perplexing - would like to know more to further my understanding though.
thx -SOn 11/11/06, Luke Lutman <[EMAIL PROTECTED]> wrote:
Can you post the code (or a link to it)?What error does it throw?...Also, my text-replacement example(http://jquery.lukelutman.com/plugins/flash/example-text-replacement.html
)isn't fully cooked yet -- it's functional, but I'm planning to developit as a proper plugin (soon, hopefully!). If you do want to try it, makesure you grab the fla, as that's custom too -- css (flash 7) and better
anti-aliasing (flash 8).LukeSam Sherlock wrote:> astonishing stuff!!! That works a treat!>> I am also using the sifr jquery plugin (really feature filled site this)> and have tried
> to alter the code to use your flash plugin instead.  I guess its one> stage at a time!!>> However I am unable to set the version it aways throws an error whatever> I do!?!>> I updated to jquery 
1.0.3 (had to make other changes json - getJSON)> this did not solve the issue>> any idea about that?  I think the issue with the version setting is> causing some issue with using it instead of the sifr thingy since I need
> to have a htmloptions callback function___jQuery mailing listdiscuss@jquery.com
http://jquery.com/discuss/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Media plugins

2006-11-10 Thread Luke Lutman
Can you post the code (or a link to it)?

What error does it throw?

...

Also, my text-replacement example 
(http://jquery.lukelutman.com/plugins/flash/example-text-replacement.html) 
isn't fully cooked yet -- it's functional, but I'm planning to develop 
it as a proper plugin (soon, hopefully!). If you do want to try it, make 
sure you grab the fla, as that's custom too -- css (flash 7) and better 
anti-aliasing (flash 8).

Luke

Sam Sherlock wrote:
> astonishing stuff!!! That works a treat!
> 
> I am also using the sifr jquery plugin (really feature filled site this) 
> and have tried
> to alter the code to use your flash plugin instead.  I guess its one 
> stage at a time!!
> 
> However I am unable to set the version it aways throws an error whatever 
> I do!?!
> 
> I updated to jquery 1.0.3 (had to make other changes json - getJSON) 
> this did not solve the issue
> 
> any idea about that?  I think the issue with the version setting is 
> causing some issue with using it instead of the sifr thingy since I need 
> to have a htmloptions callback function



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Media plugins

2006-11-10 Thread Sam Sherlock
astonishing stuff!!! That works a treat!I am also using the sifr jquery plugin (really feature filled site this) and have tried to alter the code to use your flash plugin instead.  I guess its one stage at a time!!
However I am unable to set the version it aways throws an error whatever I do!?!I updated to jquery 1.0.3 (had to make other changes json - getJSON) this did not solve the issueany idea about that?  I think the issue with the version setting is causing some issue with using it instead of the sifr thingy since I need to have a htmloptions callback function
{ anyway with powers like this jQuery is certain to take the web by storm. I keep laying awake at night pondering what 
popular apps like phpMyAdmin & phpList would be like if they were zested up with a little (or a lot of) jQuery majic. PhpMyAdmin with interface selectables, drag n drop etc, sortable tables and edit inplace. Oh my!! }
On 10/11/06, Luke Lutman <[EMAIL PROTECTED]> wrote:
Interesting... :-)It would be pretty easy to use those libraries alongside my plugin, but replicating what they dois 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.LukeSam Sherlock wrote:> Hi Luke,>> here is the state of play:>> jsfc - 
http://www.abdulqabiz.com/files/JSFC/example.html (src available to)>> also theres this -> 
http://weblogs.macromedia.com/flashjavascript/readme.html (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* <[EMAIL PROTECTED] 
[EMAIL PROTECTED]>>> 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  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  or  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 ca

Re: [jQuery] Media plugins

2006-11-10 Thread Sam Sherlock
On 10/11/06, Sam Sherlock <[EMAIL PROTECTED]> wrote:
yep I have jsfc working alongside jquery (mostly straight forward)see - http://www.sharkevaderproductions.com/v5/
 jquery (and a shed load of plugins)
 jsfc and ufo all playing nicelyif 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 On 10/11/06, Luke Lutman
 <[EMAIL PROTECTED]
> wrote: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 multipleflash movies (by pushing the JSFCommunicator objects into an Array?) if that's what your after.
LukeSam Sherlock wrote:> Hi Luke,>> here is the state of play:>> jsfc - 
http://www.abdulqabiz.com/files/JSFC/example.html
 (src available to)>> also theres this -> http://weblogs.macromedia.com/flashjavascript/readme.html
 (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* <[EMAIL PROTECTED] 
[EMAIL PROTECTED]>>> 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  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  or  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> 
discuss@jquery.com 
discuss@jquery.com>> http://jquery.com/discuss/ <

Re: [jQuery] Media plugins

2006-11-10 Thread Sam Sherlock
yep I have jsfc working alongside jquery (mostly straight forward)see - http://www.sharkevaderproductions.com/v5/ jquery (and a shed load of plugins)
 jsfc and ufo all playing nicelyif 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 On 10/11/06, Luke Lutman <[EMAIL PROTECTED]
> wrote: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 multipleflash movies (by pushing the JSFCommunicator objects into an Array?) if that's what your after.
LukeSam Sherlock wrote:> Hi Luke,>> here is the state of play:>> jsfc - http://www.abdulqabiz.com/files/JSFC/example.html
 (src available to)>> also theres this -> http://weblogs.macromedia.com/flashjavascript/readme.html (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* <[EMAIL PROTECTED] [EMAIL PROTECTED]>>> 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  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  or  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> discuss@jquery.com 
discuss@jquery.com>> http://jquery.com/discuss/  --

Re: [jQuery] Media plugins

2006-11-10 Thread Luke Lutman
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 - http://www.abdulqabiz.com/files/JSFC/example.html (src available to)
> 
> also theres this - 
> http://weblogs.macromedia.com/flashjavascript/readme.html (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* <[EMAIL PROTECTED] > 
> 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  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  or  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
> discuss@jquery.com 
> http://jquery.com/discuss/ 
> 
> 
> 
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/


-- 
zinc Roe Design
www.zincroe.com
(647) 477-6016

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Media plugins

2006-11-10 Thread Sam Sherlock
Hi Luke,here is the state of play:jsfc - http://www.abdulqabiz.com/files/JSFC/example.html (src available to)also theres this - 
http://weblogs.macromedia.com/flashjavascript/readme.html (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-SOn 10/11/06, Luke Lutman <[EMAIL PROTECTED]
> 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  element after it'sinserted 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 beforecreating your object, that's a whole 'nother ballgame.
Could you call an _javascript_ function from within the flash movie thatcreates 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 callingsomeFunction(), but would get a little hairy otherwise because
someFunction() wouldn't know which element in the DOM called it.If  or  fire onload events, it'd be possible to add acallback 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), sothat it'd come from the cache when inserted into the page (using theImage object's onload event to trigger the $().flash call).
Last but not least, you could wait for window.onload (instead ofdocument.ready), but there might be quite a gap between when the flashmovie finishes loading and window.onload is calledHope that helps!
LukeSam 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 listdiscuss@jquery.comhttp://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Media plugins

2006-11-10 Thread Luke Lutman
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  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  or  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
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Media plugins

2006-11-09 Thread Sam Sherlock
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 -SOn 10/11/06, 
Joel Birch <[EMAIL PROTECTED]> wrote:
Thanks Luke, this plugin is just awesome!Joel.On 10/11/2006, at 3:35 AM, Luke Lutman wrote:> Dang! You beat me to the punch, Mike. I've been working on (more or> less) the same thing, and
> was just finishing up my documentation and examples last night when> you posted yours... too bad> we didn't find out sooner.>> Here's my version:> 
http://jquery.lukelutman.com/plugins/flash/>> I've re-written the flash detection and embedding for jQuery (so> SWFObject isn't necessary), and> tried to build it to be as flexible as possible in terms of how the
> replacements are done.>> Like yours, basic replacements look like:>> $('#hello').flash({ src: 'hello.swf', width: 320, height: 240 });>> For more complicated stuff (like sIFR or your method of reading
> data from classnames), you can> pass a custom function, like so (off the top of my head):>> $('[EMAIL PROTECTED]"swf"]').flash(null, null, function(htmlOptions){>   $this = $(this);
>   htmlOptions.src = "">>   htmlOptions.width = this.className.match(/w\:(\d+/))[1];>   htmlOptions.height = this.className.match(/h\:(\d+/))[1];>   $this.before($.fn.flash.transform(htmlOptions));
> });>> Or you can change the default:> $.fn.flash.replace = function(htmlOptions) {>   // custom code here ...> };>> I'm curious to know what you think :-)>
> Cheers,> Luke>> Mike Alsup wrote:>> I've just posted some convenience plugins for dealing with Quicktime,>> Flash, and mp3 media.>> Source and demos can be found here:  
http://malsup.com/jquery/media/ Mike ___>> jQuery mailing list>> 
discuss@jquery.com>> http://jquery.com/discuss/>>> --> zinc Roe Design> 
www.zincroe.com> (647) 477-6016>> ___> jQuery mailing list> discuss@jquery.com> 
http://jquery.com/discuss/>>___jQuery mailing listdiscuss@jquery.com
http://jquery.com/discuss/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Media plugins

2006-11-09 Thread Joel Birch
Thanks Luke, this plugin is just awesome!

Joel.


On 10/11/2006, at 3:35 AM, Luke Lutman wrote:

> Dang! You beat me to the punch, Mike. I've been working on (more or  
> less) the same thing, and
> was just finishing up my documentation and examples last night when  
> you posted yours... too bad
> we didn't find out sooner.
>
> Here's my version:
> http://jquery.lukelutman.com/plugins/flash/
>
> I've re-written the flash detection and embedding for jQuery (so  
> SWFObject isn't necessary), and
> tried to build it to be as flexible as possible in terms of how the  
> replacements are done.
>
> Like yours, basic replacements look like:
>
> $('#hello').flash({ src: 'hello.swf', width: 320, height: 240 });
>
> For more complicated stuff (like sIFR or your method of reading  
> data from classnames), you can
> pass a custom function, like so (off the top of my head):
>
> $('[EMAIL PROTECTED]"swf"]').flash(null, null, function(htmlOptions){
>   $this = $(this);
>   htmlOptions.src = $this.attr('href');
>   htmlOptions.width = this.className.match(/w\:(\d+/))[1];
>   htmlOptions.height = this.className.match(/h\:(\d+/))[1];
>   $this.before($.fn.flash.transform(htmlOptions));
> });
>
> Or you can change the default:
> $.fn.flash.replace = function(htmlOptions) {
>   // custom code here ...
> };
>
> I'm curious to know what you think :-)
>
> Cheers,
> Luke
>
> Mike Alsup wrote:
>> I've just posted some convenience plugins for dealing with Quicktime,
>> Flash, and mp3 media.
>> Source and demos can be found here:  http://malsup.com/jquery/media/
>>
>> Mike
>>
>> ___
>> jQuery mailing list
>> discuss@jquery.com
>> http://jquery.com/discuss/
>
>
> -- 
> zinc Roe Design
> www.zincroe.com
> (647) 477-6016
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>
>


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Media plugins

2006-11-09 Thread Mike Alsup
> I'm curious to know what you think :-)

That's excellent, Luke!   Very flexible and very powerful; nice work!

Mike

PS: Love the Beatles!

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Media plugins

2006-11-09 Thread Luke Lutman
Dang! You beat me to the punch, Mike. I've been working on (more or less) the 
same thing, and 
was just finishing up my documentation and examples last night when you posted 
yours... too bad 
we didn't find out sooner.

Here's my version:
http://jquery.lukelutman.com/plugins/flash/

I've re-written the flash detection and embedding for jQuery (so SWFObject 
isn't necessary), and 
tried to build it to be as flexible as possible in terms of how the 
replacements are done.

Like yours, basic replacements look like:

$('#hello').flash({ src: 'hello.swf', width: 320, height: 240 });

For more complicated stuff (like sIFR or your method of reading data from 
classnames), you can 
pass a custom function, like so (off the top of my head):

$('[EMAIL PROTECTED]"swf"]').flash(null, null, function(htmlOptions){
$this = $(this);
htmlOptions.src = $this.attr('href');
htmlOptions.width = this.className.match(/w\:(\d+/))[1];
htmlOptions.height = this.className.match(/h\:(\d+/))[1];
$this.before($.fn.flash.transform(htmlOptions));
});

Or you can change the default:
$.fn.flash.replace = function(htmlOptions) {
// custom code here ...
};

I'm curious to know what you think :-)

Cheers,
Luke

Mike Alsup wrote:
> I've just posted some convenience plugins for dealing with Quicktime,
> Flash, and mp3 media.
> Source and demos can be found here:  http://malsup.com/jquery/media/
> 
> Mike
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/


-- 
zinc Roe Design
www.zincroe.com
(647) 477-6016

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Media plugins

2006-11-09 Thread Kurt Mackey
That's correct, people who post things like Youtube videos on their
blogs generally annoy me.  Most readers won't (and probably shouldn't)
do anything with flash or other rich content.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Alsup
Sent: Thursday, November 09, 2006 6:43 AM
To: jQuery Discussion.
Subject: Re: [jQuery] Media plugins

> Excuse me, Kurt, would you please elaborate more on "for content
> that's going to be delivered in RSS feeds"?
> I am not sure that I fully understand your point.

I think he means that since the actual markup is just an anchor tag it
will appear that way in a feed.  Likewise if you have javascript
disabled.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Media plugins

2006-11-09 Thread Sean O

Mike,


Nice job.  Don't know why I didn't think of putting the source file in the
href to make it unobtrusive, Doh!  I like the clever use of classes for
options, and the regex too (still trying to wrap my brain around that).

___
SEAN O



malsup wrote:
> 
> I've just posted some convenience plugins for dealing with Quicktime,
> Flash, and mp3 media.
> Source and demos can be found here:  http://malsup.com/jquery/media/
> 
> Mike
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Media-plugins-tf2598874.html#a7258481
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Media plugins

2006-11-09 Thread Rafael Santos
I really appreciate it... thx man!2006/11/9, Mike Alsup <[EMAIL PROTECTED]>:
> Can it be modified to work with FLAM and WIMPY?Hi Sam,I've never used either of those but if they just use flash then Iwould think the flash plugin would work with them with little or nomodifications.
Mike___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Media plugins

2006-11-09 Thread Mike Alsup
> Can it be modified to work with FLAM and WIMPY?

Hi Sam,

I've never used either of those but if they just use flash then I
would think the flash plugin would work with them with little or no
modifications.

Mike

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Media plugins

2006-11-09 Thread Mike Alsup
> Excuse me, Kurt, would you please elaborate more on "for content
> that's going to be delivered in RSS feeds"?
> I am not sure that I fully understand your point.

I think he means that since the actual markup is just an anchor tag it
will appear that way in a feed.  Likewise if you have javascript
disabled.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Media plugins

2006-11-09 Thread Sam Collett
On 09/11/06, Mike Alsup <[EMAIL PROTECTED]> wrote:
> I've just posted some convenience plugins for dealing with Quicktime,
> Flash, and mp3 media.
> Source and demos can be found here:  http://malsup.com/jquery/media/
>
> Mike

Can it be modified to work with FLAM and WIMPY?

Details: 
http://jdfrey.wordpress.com/2006/11/07/podcast-players-%e2%80%93-mp3-files-played-on-your-site/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Media plugins

2006-11-09 Thread Patrick Hall
Oh word, I've been looking for something like this.

I send you karma cookies.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Media plugins

2006-11-09 Thread Dan Atkinson

I really like what you've done there. It's neat and very clean!

malsup wrote:
> 
> I've just posted some convenience plugins for dealing with Quicktime,
> Flash, and mp3 media.
> Source and demos can be found here:  http://malsup.com/jquery/media/
> 
> Mike
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Media-plugins-tf2598874.html#a7254142
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Media plugins

2006-11-08 Thread Cheng Zhang
Excuse me, Kurt, would you please elaborate more on "for content  
that's going to be delivered in RSS feeds"?
I am not sure that I fully understand your point.
Thanks.

- Cheng

On Nov 9, 2006, at 10:14 AM, Kurt Mackey wrote:

> That's really nice, especially for content that's going to be  
> delivered
> in RSS feeds (and elsewhere).
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:discuss- 
> [EMAIL PROTECTED] On
> Behalf Of Mike Alsup
> Sent: Wednesday, November 08, 2006 6:10 PM
> To: jQuery Discussion.
> Subject: [jQuery] Media plugins
>
> I've just posted some convenience plugins for dealing with Quicktime,
> Flash, and mp3 media.
> Source and demos can be found here:  http://malsup.com/jquery/media/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Media plugins

2006-11-08 Thread Kurt Mackey
That's really nice, especially for content that's going to be delivered
in RSS feeds (and elsewhere).

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Alsup
Sent: Wednesday, November 08, 2006 6:10 PM
To: jQuery Discussion.
Subject: [jQuery] Media plugins

I've just posted some convenience plugins for dealing with Quicktime,
Flash, and mp3 media.
Source and demos can be found here:  http://malsup.com/jquery/media/

Mike

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Media plugins

2006-11-08 Thread Chris W. Parker
On Wednesday, November 08, 2006 4:10 PM Mike Alsup <> said:

> I've just posted some convenience plugins for dealing with Quicktime,
> Flash, and mp3 media.
> Source and demos can be found here:  http://malsup.com/jquery/media/

Cool!

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/