flash callbacks

G

gert

How does it work ?

So far i have this ?

var isIE = navigator.appName.indexOf("Microsoft") != -1;
return (isIE) ? window['flowplayer'] : document['flowplayer'];

How do i capter a flash callback event in javascript ?
Can't seem to find any dom tree sign's of a flowplayer object ?
 
S

Stevo

gert said:
How does it work ?

So far i have this ?

var isIE = navigator.appName.indexOf("Microsoft") != -1;
return (isIE) ? window['flowplayer'] : document['flowplayer'];

How do i capter a flash callback event in javascript ?
Can't seem to find any dom tree sign's of a flowplayer object ?

There are three ways JavaScript can be called/handled from Flash to
JavaScript. You can create a FS-command JS function with a special name
(based on the name of the object), or you can add a listener to the
object, or you can use Adobe's ExternalInterface (Flash 7+ player only I
think).

You're really best looking for this in Adobe's forums though. You'll get
full tutorials there.
 
G

gert

gert said:
How does it work ?
So far i have this ?
var isIE = navigator.appName.indexOf("Microsoft") != -1;
return (isIE) ? window['flowplayer'] : document['flowplayer'];
How do i capter a flash callback event in javascript ?
Can't seem to find any dom tree sign's of a flowplayer object ?

There are three ways JavaScript can be called/handled from Flash to
JavaScript. You can create a FS-command JS function with a special name
(based on the name of the object), or you can add a listener to the
object, or you can use Adobe's ExternalInterface (Flash 7+ player only I
think).

You're really best looking for this in Adobe's forums though. You'll get
full tutorials there.

yep ExternalInterface is the one i am looking for an is used in
flowplayer and as far as i understand form the adobe forums i have to
do this in FF

document['flowplayer'].nameofcallback=function(v){alert(v)}

but that doesn't work ? Actualy there is no document['flowplayer'] at
all ?
 
S

Stevo

gert said:
How does it work ?

So far i have this ?

var isIE = navigator.appName.indexOf("Microsoft") != -1;
return (isIE) ? window['flowplayer'] : document['flowplayer'];

How do i capter a flash callback event in javascript ?
Can't seem to find any dom tree sign's of a flowplayer object ?

I've had that problem. I had to ensure that the Flash didn't script out
for it's first half second or so, meanwhile I create the variable it
expects to exist like this:

window.flowplayer=document.getElementById('flowplayer');

So, you create the object, and then create the variable as quickly as
you can (during the half second or so that the Flash promises not to
script out). It's a bug in the external interface.
 
G

gert

aha <param name="allowScriptAccess" value="always"/> now i can see
some flash stuff in my dom tree appearing :)
 
G

gert

<script type="text/javascript">
player.write() //document.write(...) my flowplayer object with id flv
window.flv=document.getElementById('flv');
flv.onClipDone=function(clip){alert(clip)} // I wish this would work
</script>

I can see __flash__argumentsToXML prototypes in my dom tree and my flv
flowplayer object but no sign of any flowplayer callbacks ? What does
SWFObject do what i don't do ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,145
Messages
2,570,824
Members
47,369
Latest member
FTMZ

Latest Threads

Top