2
   

How to stop flash playing til all img loaded on HTML pg

 
 
kita
 
Reply Tue 24 Feb, 2004 02:06 pm
Some help please...
I have a small animation in a straight Hhtmlpage. Sadly the page has a rather large background img attached using CSS. How do I stop the flash animation from playing until all the images have loaded? At the moment it starts before the background img has loaded and has already finished playing by the time the background img becomes visible. onLoad doesn't seem to make any difference.

Thanks
k.
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 2 • Views: 2,058 • Replies: 9
No top replies

 
Craven de Kere
 
  1  
Reply Tue 24 Feb, 2004 02:10 pm
Can you preload the background image?

Can you put the flash in an IFRAME and force it to wait before it displays?

What did you do with onload? There are ways that could help.

And lastly, do you hate your visitors? ;-) Why the user-unfriendliness in the page?

Welcome to A2K.
0 Replies
 
kita
 
  1  
Reply Tue 24 Feb, 2004 02:44 pm
Urgh! Not me... would never have developed it this way myself. Working with DTP designers who don't have a clue and have already had to tell them that several things won't be "user-friendly" - if only they'd consult on design process Smile Thought I could MAKE it work by optimising the daylights out of it (didn't think 6k was toooo bad).
Just didn't count on arb flash bit causing issues.

Funnily bg img in style sheet does't seem to preload in the same way as say navbar imgs do. But maybe 'cos it's just bigger?

How well is iframe supported (there's a question I've wanted to ask for a long time) and how would you "force it to wait"?

Is there any way to specify that Flash does't play until ALL images have loaded?

Thanks for the lightning fast reply
k.
0 Replies
 
Craven de Kere
 
  1  
Reply Tue 24 Feb, 2004 02:50 pm
kita wrote:
Thought I could MAKE it work by optimising the daylights out of it (didn't think 6k was toooo bad).


6k isn't too bad.

Quote:
Funnily bg img in style sheet does't seem to preload in the same way as say navbar imgs do. But maybe 'cos it's just bigger?


Do you preload it or are you talking about normal cache?

Quote:
How well is iframe supported (there's a question I've wanted to ask for a long time)


About as well as CSS is. I'm thinking 4ish browsers. So if you are using flash and CSS, you are probably already excluding the browsers that do not support IFRAMES.

Quote:
and how would you "force it to wait"?


Lots of ways to do that. One would be to write the IFRAme after a certain number of seconds, one would be to load a page in the Iframe that redirects to the one with flash after a few seconds....

Quote:
Is there any way to specify that Flash does't play until ALL images have loaded?


Hmm, other than onload not that I know of off the top of my head. It would depend on the browsers. Onload should work for this.

But you can, of course, make the images preload and delay the execution of the flash based on a set amount of time.

I just don't think the browsers will report when the images are done in a way that a Javascript can use to execute the flash.
0 Replies
 
Craven de Kere
 
  1  
Reply Tue 24 Feb, 2004 03:01 pm
Can you PM me a link to the page?

I'm wondering if there's something simple that can be done to the page to eliminate the need for complex solutions.
0 Replies
 
Craven de Kere
 
  1  
Reply Tue 24 Feb, 2004 03:27 pm
Ok, forget all I've said so far. From looking at your pages you have only oen problem with both issues.

Multiple onload calls are conflicting.

See my script on your other thread for a way to solve it and if you need help let me know.
0 Replies
 
kita
 
  1  
Reply Tue 24 Feb, 2004 03:32 pm
Probably is an easier way, just ended up trying different things and confusing the hell out of myself in the end! Which is why I ended up here after trying to search on Net for a solution.

At the moment I've put the bg img on the Flash detection pg. Not great, but I figured if I could load it before I even got to the page where it was a problem... was getting desperate.

Edit (moderator): Link removed

Hope this makes things clearer - sometimes it's difficult to explain (and of course too much caffiene doesn't help either)

k.
0 Replies
 
Craven de Kere
 
  1  
Reply Tue 24 Feb, 2004 03:47 pm
Ok, here's your solution, I just wrote it for you to cut down on the explaining time.

Basically what it does is write out the flash code after the page loads.

So replace your flash code with this:

Code:<script type='text/javascript'>
<!--
info=" <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="384" height="186">" +
" <param name="movie" value="acs_anim.swf">" +
" <param name="quality" value="high">" +
" <embed src="acs_anim.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="384" height="186"></embed></object>"

if ((document.getElementById || document.all) && document.images) {

document.write(info)
}
// -->
</script>


Tell mw how that goes. If you want we'll tackle onload conflicts later.
0 Replies
 
kita
 
  1  
Reply Wed 25 Feb, 2004 02:53 am
flash doesn't show on page
Hey ho,
Still applying head to wall.

When I replace the flash script it disappears. What have I done now?
0 Replies
 
Craven de Kere
 
  1  
Reply Wed 25 Feb, 2004 11:52 am
Please edit out those links.
I posted functional code for all the things you've asked for here:

http://www.able2know.com/forums/viewtopic.php?p=575561#575561
0 Replies
 
 

Related Topics

Webdevelopment and hosting - Question by harisit2005
Showing an Ico File - Discussion by Brandon9000
how to earn money in internet - Discussion by rizwanaraj
The version 10 bug. Worse then Y2K! - Discussion by Nick Ashley
CSS Border style colors - Question by meesa
There is no Wisdom in Crowds - Discussion by ebrown p
THANK YOU CRAVEN AND NICK!!! - Discussion by dagmaraka
I'm the developer - Discussion by Nick Ashley
 
  1. Forums
  2. » How to stop flash playing til all img loaded on HTML pg
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 04/25/2024 at 11:25:36