Closed GoogleCodeExporter closed 9 years ago
This is a generic Flash issue, please read more about it in Q7 of our FAQ:
http://code.google.com/p/swfobject/wiki/SWFObject_2_0_faq_web_authors
Original comment by bobbyvandersluis
on 18 Apr 2008 at 11:56
I'm so sorry, but Q7 Makes absolutely no sense to me? The javascript is
compressed so
i cant really read it but when I debug function c(i){g.getElementById(i)} where
g is
declared at the beginning of the script as = document, then for sure the code
has a
bug or is not catching the if g.get.. is undefined try something else. Anyhow I
think
I'll just revert back to an older version of swfobject cause it work n if it
aint
broke.... Thanks anyways guys and keep up the good work. I will revisit the code
later.
Original comment by ojemuy...@gmail.com
on 18 Apr 2008 at 1:07
maybe i'm actually doing it all wrong?
<div id="Template_ctl04_test_fl">
<a href="http://www.adobe.com/go/getflashplayer">
<img alt="Get Adobe Flash player"
src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"
/>
</a>
</div>
<script type="text/javascript">
<!--
window.addEvent('load', function(e){
var flashvars = {quality: "high"};
var params = {};
var attributes = {id: "Template_ctl04_test_fl"};
swfobject.embedSWF("http://www.amnac.com/client/maidstone/maid12.swf",
"Template_ctl04_test_fl", "950", "150", "8.0.0", false, flashvars, params,
attributes);
});
//-->
</script>
Original comment by ojemuy...@gmail.com
on 18 Apr 2008 at 1:09
Well, you don't have to debug the JavaScript code, just read the article linked
in
Q7: http://www.adobe.com/go/kb400730
So if your id used by your SWF is "Template_ctl04_test_fl", you should do
something like:
<script type="text/javascript">window.Template_ctl04_test_fl =
document.forms[0].Template_ctl04_test_fl;</script>
Or do the form trick:
<form><form></form>
What is not clear about this?
Original comment by bobbyvandersluis
on 18 Apr 2008 at 1:17
<script type="text/javascript">window.Template_ctl04_test_fl
=document.forms[0].Template_ctl04_test_fl;</script>
<noscript><div>Browser does not support script.</div></noscript>
<script type="text/javascript">
<!--
window.addEvent('load', function(e){
var flashvars = {quality: "high", wmode: "transparency"};
var params = {};
var attributes = {id: "Template_ctl04_test_fl"};
swfobject.embedSWF("http://www.amnac.com/client/maidstone/maid12.swf",
"Template_ctl04_test_fl", "950", "150", "8.0.0", false, flashvars, params,
attributes);
});
//-->
</script>
<noscript><div>Browser does not support script.</div></noscript>
Naa still no joy!
Original comment by ojemuy...@gmail.com
on 18 Apr 2008 at 1:53
- Put the script blocks in the head of your HTML document
- Get rid of the noscript blocks, SWFObject uses semantically marked up content
as
base markup and only enhances your page with Flash if enough support is
available
- Get rid of your window.addEvent('load', function(e){ } construct, because
swfobject.embedSWF already does the loading for you
- Because your SWF reference will only be available after it is loaded, you
better
use the following code after your embedSWF call:
function fixReference() {
window.Template_ctl04_test_fl
=document.forms[0].Template_ctl04_test_fl;
}
swfobject.addDomLoadEvent(fixReference);
If you still have issues after this, please up a test page and post the link +
your
issue description at the SWFObject discussion group:
http://groups.google.com/group/swfobject
This issue DB is for generic SWFObject bugs only, and there are multiple people
reading + helping out in the discussion group + it's better to capture all
helpouts
here for better knowledge share.
Original comment by bobbyvandersluis
on 18 Apr 2008 at 2:10
No worries. I'm using an ascx .net control in a content management system that
doesn't contain an id in the head tag. A bit of an overkill puting this in the
head
after swfobject as it will reference on everypage within the website. Thanks so
much
for your time though.
Regards femi.
Original comment by ojemuy...@gmail.com
on 18 Apr 2008 at 2:29
Original issue reported on code.google.com by
ojemuy...@gmail.com
on 18 Apr 2008 at 11:15Attachments: