views:

38

answers:

1

Hi,

I am adding multiple flash objects(swf) in HTML. When I try to find any of these objects (using 'document[swf_id]'), the browser returns 'null' unless the object of interest is acted upon. (Implicitly as I understood, I would always get 'null' if I have interacted with none of the objects).

Can somebody help me to know the reason? Am I missing something or is it a normal behaviour?

Thanks for your time.

SachinJadhav.

PS: I am using ExtJS with its media library.

A: 

Ok, this is not the best place for yours question. My way is add swf by SWFObject. I give them name and later looking using JS in DOM.

Better ask JavaScript Gurus ;)

Konrad
There are a lot of javascript gurus around here in SO. Why turn people away?
Amarghosh
And I believe that all he needs is to have a name or id parameter on each of the object/embed tags. It doesn't take a guru to say that. OP hasn't clarified his question yet.
Amarghosh
'id' attribute is set for all these objects.The same 'id' I try to use for later retrieval. But got null.Rather if I act upon(any action) this object before retrieval I get what I want.
SachinJadhav
Is there any chance that you are trying to access it before page is loaded? I'm not a js expert but I believe IE supports window[] syntax and FF supports document[] syntax. Make sure you have the `id` in the object tag and `name` in the embed tag set appropriately.
Amarghosh
I don't mean that. I think this is more JS problem not Flash. It should have many more tags like JavaScript.
Konrad
Yes, I have set an id properly. And I am using 'document[swf_id]') implies FF.About sequence of execution, I can not act upon the swf object unless page is loaded.I have observed when I act upon the object(swf) of interest. I can find it out without any trouble. In the sense if I have dummy alert message in an swf, It works completely fine. But I want to find out this object of interest without acting upon it manually.
SachinJadhav
post the js code that returns null unless "acted upon" - i believe it's happening before the page is loaded.
Amarghosh