Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
embedded swf with JS but white box appears quickly
Old 09-06-2008, 03:18 PM embedded swf with JS but white box appears quickly
Skilled Talker

Posts: 90
Name: Ed
Trades: 0
Hi,

I was informed that it is better to embed your swf files with Javascript and have done so. The only thing that is bugging me right now about this is that right before the flash file loads and plays there's a white box that appears where the swf is going to be. I set the background color in the FLA to black and it still hasn't helped this situation. Everytime I add in bgcolor = "#000000" }; to the javascript it permanently puts a black box in place of my swf. Is their anyway of correcting this issue?

Code:
<script type="text/javascript" src="ufo.js"></script>

<script type="text/javascript">
    var FO = { movie:"lilisparties3.swf", width:"580", height:"364",
    majorversion:"6", build:"40" };
    UFO.create(FO, "flash_logo");
    
</script>
mrflume is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-06-2008, 04:18 PM Re: embedded swf with JS but white box appears quickly
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
I'd suggest the script we can't see is creating the place holder in the DOM too early in the whole process.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-06-2008, 05:56 PM Re: embedded swf with JS but white box appears quickly
Skilled Talker

Posts: 90
Name: Ed
Trades: 0
not sure I understand..
mrflume is offline
Reply With Quote
View Public Profile
 
Old 09-06-2008, 06:27 PM Re: embedded swf with JS but white box appears quickly
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
This is a 2 step process.
First, the script must modify the DOM representation of the document, and create a placeholder (the white box) and put the Flash movie reference in it.
Then, the browser has to load and launch the flash movie.

The white box you see is this little delay between the creation of the box, and the start of the flash movie.
Don't know what you could do to avoid this though. I would have tried just what you did...
__________________
Only a biker knows why a dog sticks his head out the window.

Last edited by tripy; 09-06-2008 at 06:29 PM..
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 09-06-2008, 08:41 PM Re: embedded swf with JS but white box appears quickly
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
setting the background colour of the container to transparent would stop it appearing.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to embedded swf with JS but white box appears quickly
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.20995 seconds with 12 queries