Javascript injection

1 view
Skip to first unread message

Eric Priou

unread,
Jun 28, 2007, 9:50:22 AM6/28/07
to flash-th...@googlegroups.com
Hi guys,

I saw the javascript injection idea implemented.
NIce ;)

BTW, I would propose to change the way to get a reference to the swf :
This :
" getFlash: function(){" +
// returns the first flash movie in document
" return document.getElementsByTagName('embed')[0]; " +
" },

by that :

" getFlash: function(id){" +
// returns the first flash movie in document
" var d = document;
" return id ? d.getElementById(id) : d.getElementsByTagName('embed')[0]; " +
" },

That way we'll be able to handle multiple swf output.
In conjuntion with the start and stop new feature, that will be great.
What do you think  ?
---
Eric Priou aka erixtekila
Oregano XMLSocket server forum : http://www.v-i-a.net/forum


aemkei

unread,
Jun 28, 2007, 10:11:36 AM6/28/07
to flash-thunderbolt
Multiple swf output sounds good! I like the way you deal with the
optional parameter. So if there is only one swf in the movie we do not
have to care about it's ID. Great!

But we have to somehow pass the optional parameter to every
ThunderBolt function call. Maybe as the latest parameter?

eg:

set: function(target, value, id){
this.getFlash(id).set(this.getFullTarget(target), value);
},

stop: function(id){
this.getFlash(id).stop();
},

- Martin

Eric Priou

unread,
Jun 28, 2007, 10:18:12 AM6/28/07
to flash-th...@googlegroups.com
Multiple swf output sounds good! I like the way you deal with the
optional parameter. So if there is only one swf in the movie we do not
have to care about it's ID. Great!

But we have to somehow pass the optional parameter to every
ThunderBolt function call. Maybe as the latest parameter?

eg:

set: function(target, value, id){
this.getFlash(id).set(this.getFullTarget(target), value);
},

stop: function(id){
this.getFlash(id).stop();
},

Obviously yes.
Do you want me to add those features or will you do it ?

See ya.

aemkei

unread,
Jun 28, 2007, 11:04:25 AM6/28/07
to flash-thunderbolt
Feel free to put your hands on it :)

Eric Priou

unread,
Jun 28, 2007, 11:19:02 AM6/28/07
to flash-th...@googlegroups.com
Feel free to put your hands on it :)
OK, I was feeling lazy :-P
Reply all
Reply to author
Forward
0 new messages