Does swfobject.createSWF() not return an <object> that can be stored for use later?

24 views
Skip to first unread message

c.wrinn

unread,
Nov 19, 2009, 5:28:23 PM11/19/09
to SWFObject
I'm trying to update VideoBox to use SWFObject 2.2 and when I do

this.so = swfobject.createSWF(att, par, id);

this.so is [undefined].

The used to store a new SWFObject in this.so and inject it later.

Getify Solutions, Inc.

unread,
Nov 19, 2009, 10:48:32 PM11/19/09
to swfo...@googlegroups.com
Please read the documentation carefully. Also, consider using the
code-generator to help get the new syntax code generated for you.

http://code.google.com/p/swfobject/wiki/documentation

http://code.google.com/p/swfobject/wiki/api

http://code.google.com/p/swfobject/wiki/generator

In particular to your code question, it's probably returning undefined
because you are making the call before the DOM is ready, so you won't have
an object created yet, swfobject will queue the call to create the object
until domready.

--Kyle






--------------------------------------------------
From: "c.wrinn" <c.w...@gmail.com>
Sent: Thursday, November 19, 2009 4:28 PM
To: "SWFObject" <swfo...@googlegroups.com>
Subject: Does swfobject.createSWF() not return an <object> that can be
stored for use later?
> --
>
> You received this message because you are subscribed to the Google Groups
> "SWFObject" group.
> To post to this group, send email to swfo...@googlegroups.com.
> To unsubscribe from this group, send email to
> swfobject+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/swfobject?hl=.
>
>
>

c.wrinn

unread,
Nov 20, 2009, 9:24:43 AM11/20/09
to SWFObject
The call is not being made before the dom is ready. The call is being
made on a click event, long after domready, the class' constructor
isn't even run until DOMReady for the exact reason you refer to.

I have been reading the documentation, which specifically reads
"Returns the newly created object element", yet I still get
"undefined".

On Nov 19, 9:48 pm, "Getify Solutions, Inc." <get...@gmail.com> wrote:
> Please read the documentation carefully. Also, consider using the
> code-generator to help get the new syntax code generated for you.
>
> http://code.google.com/p/swfobject/wiki/documentation
>
> http://code.google.com/p/swfobject/wiki/api
>
> http://code.google.com/p/swfobject/wiki/generator
>
> In particular to your code question, it's probably returning undefined
> because you are making the call before the DOM is ready, so you won't have
> an object created yet, swfobject will queue the call to create the object
> until domready.
>
> --Kyle
>
> --------------------------------------------------
> From: "c.wrinn" <c.wr...@gmail.com>

c.wrinn

unread,
Nov 20, 2009, 11:13:41 AM11/20/09
to SWFObject
Nevermind, I got this working. Videobox is effectively converted from
SWFObject 1.5 to 2.2 :) going to post this in a bit.

andreas

unread,
Jan 12, 2010, 1:58:10 PM1/12/10
to SWFObject
Hi,

can you share your solution?

thanks,
Andreas

Christopher Wrinn

unread,
Jan 12, 2010, 2:47:55 PM1/12/10
to swfo...@googlegroups.com
> --
> You received this message because you are subscribed to the Google Groups "SWFObject" group.
> To post to this group, send email to swfo...@googlegroups.com.
> To unsubscribe from this group, send email to swfobject+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/swfobject?hl=en.
>
>
>
>

Andreas,

Attached is the updated VideoBox, updated to use SWFObject 2.2. I had
meant to post this but got sidetracked at work. It works for me on the
projects I have used it on so far.

videobox.js

andreas

unread,
Jan 13, 2010, 11:04:31 AM1/13/10
to SWFObject
Hi Christopher,

thank you very much for sharing this.
It works perfectly for me as well.
Excellent work! I really appreciate it.

My Best,
Andreas

On Jan 12, 8:47 pm, Christopher Wrinn <c.wr...@gmail.com> wrote:


> On Tue, Jan 12, 2010 at 12:58 PM, andreas <xepi...@gmail.com> wrote:
> > Hi,
>
> > can you share your solution?
>
> > thanks,
> > Andreas
>
> > On Nov 20 2009, 5:13 pm, "c.wrinn" <c.wr...@gmail.com> wrote:
> >> Nevermind, I got this working. Videobox is effectively converted from
> >> SWFObject 1.5 to 2.2 :) going to post this in a bit.
>
> > --
> > You received this message because you are subscribed to the Google Groups "SWFObject" group.
> > To post to this group, send email to swfo...@googlegroups.com.
> > To unsubscribe from this group, send email to swfobject+...@googlegroups.com.

> > For more options, visit this group athttp://groups.google.com/group/swfobject?hl=en.


>
> Andreas,
>
> Attached is the updated VideoBox, updated to use SWFObject 2.2. I had
> meant to post this but got sidetracked at work. It works for me on the
> projects I have used it on so far.
>

>  videobox.js
> 12KViewDownload

Reply all
Reply to author
Forward
0 new messages