RequireJS Module Loading

708 views
Skip to first unread message

Pete Otaqui

unread,
Feb 4, 2011, 4:35:49 AM2/4/11
to SWFObject
Hi,

My team and I are looking for a flash embedding library which we can
deliver as a RequireJS module. We have a current, custom-built
library in place, but we are very keen on adopting community-developed
software where possible.

We are about to start some more detailed investigation into how
SwfObject will interact with RequireJS (we're also using jQuery, which
is important) - but an initial look at the code brought up a concern
about the fact that SwfObject tries to do its own onLoad & domReady
management.

RequireJS and jQuery both do this, and in fact RequireJS has some
special detection in it to use jQuery's API for "ready" events/.

In an ideal world, SwfObject would be configurable, so one could
disable it's attempts at managing load / ready events.

Would the community be interested in a patch for this? Does anyone
have any thoughts about ramifications, for example throwing an error
if load management is disabled and onDomLoad is called?

Thanks

Pete

ps - we're also very keen on testing. Is there any interest in
working on some unit / acceptance tests for SwfObject?

Sam Sherlock

unread,
Feb 4, 2011, 10:32:11 AM2/4/11
to swfo...@googlegroups.com
There is a section on the wiki [1]  listing other lib that use swfobject, one of these is a jquery plugin [2]

swfobject does do its own onLoad & domReady
management. This ensures that it works stand alone.
and on the widest array of browsers, plugin versions and platforms

Kyle (getify) [4] - from boxing day last year:

We've talked about doing a bug-patch 2.3 release, but at present the need for the release (ie, problems without workarounds) hasn't justified the work to do so, so we're in a slowed down maintenance phase for the time being.

As far as I (and I believe the other co-maintainers of the project) am concerned, SWFObject 2.2 still represents the most robust, standards-compliant, and flexible solution for SWF embedding.

We provide the markup-generator to assist web authors in creating the best markup/code for their site scenario. We also have several popular SWF-centric projects that we've coordinated compatibility with, including SWFFit and others. We think this represents a solid and stable ecosystem for SWF-in-HTML publishing use-cases.
(Kyle also made labJS load and block - which is simular to requireJS I think; perhaps he has tried labJS with swfobject)

the code is available via svn [5]; the testsuite [3];

you could submit a patch with relevent info to the issues [6] - but bear in mind Kyle's words above

1) http://code.google.com/p/swfobject/wiki/links
2) http://jquery.thewikies.com/swfobject/
3) http://code.google.com/p/swfobject/wiki/test_suite
4) http://groups.google.com/group/swfobject/browse_thread/thread/b779a27a60367dc8/b23c5b9fc9fc144f?hl=en_US#b23c5b9fc9fc144f
5) http://code.google.com/p/swfobject/source/checkout
6) http://code.google.com/p/swfobject/issues

hth  - S





--
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.


Philip Hutchison

unread,
Aug 20, 2012, 6:04:58 PM8/20/12
to swfo...@googlegroups.com
SWFObject is fully compatible with IE 7 and 8.  If it isn't working for you, you might have a typo or syntax error. Post your code and we may be able to help.



On Sun, Aug 19, 2012 at 6:14 PM, flexnroses <melike...@gmail.com> wrote:
hi, I was working on an app supporting html5/flash video. I realized that RequireJS is a great way to load up the swfobject library. The problem was IE 7, and 8. They both weren't able to use swfobject to create the swf element. What I realized was I could simply omit swfobject and use the object tag. I ended up just loading the swfobject in the script tag before RequireJS and that did the magic. 

swfobject had a big purpose, and that was the policy IE had on plugins by deactivating them initially from the user. I believe the policy on IE is gone and has been for several years. The other reason was to detect if flash player was supported. What if you just use this jquery plugin instead http://jquery.lukelutman.com/plugins/flash/?

--
You received this message because you are subscribed to the Google Groups "SWFObject" group.
To view this discussion on the web visit https://groups.google.com/d/msg/swfobject/-/Y3UV7nRxQ2YJ.
Reply all
Reply to author
Forward
0 new messages