Q. How can I make an image or swf file load after a specified number of seconds?
A. Use the simple but effective flash_timer.swf file by Sam Burdge. Whoopeee!
Ever wanted a particular Flash movie or image to load up / start playing after the rest of your page has loaded, or after a set amount of time? This tutorial, and the support files provided with it will make it very easy indeed. The flash_timer.swf file will load a swf or image into your page after a number of seconds that you specify.
Example:
Check out this basic example to see a swf (called test.swf) load after a 10 second delay: Example 1
You can view the source code of the example to see how it works.
Usage:
- Download the source files using the link below, and unzip the archive.
- Embed the swf file 'flash_timer.swf' into your webpage. In my example I have used the swfObject method to embed the file, but you can use whichever method you prefer. For more information about this you can check this useful tutorial by Jeroen Wijering.
- Set the height, width & background colour of the swf according to those of the file you want to load in.
- Pass the two variables that the file requires to work: myswf – the file that will be loaded & mysecs – the number of seconds delay before the file is loaded. You can pass the variables in the url string, for example:
flash_timer.swf?myswf=my_movie.swf&mysecs=5
(This will load the movie 'my_movie.swf' after a 5 second delay.)
You can also pass the variables as flashvars, for example:
flashvars="myswf=example.jpg&mysecs=10"
(This will load the image 'example.jpg' after a 10 second delay.)
I hope you find this useful, if you do or if you have any questions, please feel free to leave a comment on this page (no emails please, I won't reply unless you are offering me hard cash!!). The flash_timer.swf file is only 1kb, so it will not effect the overall loading time of your page, it can be embedded at any height/width dimensions and works from flash player 7 upwards.
Download Source:
The download contains the all important flash_timer.swf plus a working example (index.html). The size of the zip is 6kb. Enjoy!!
Hi, thanks for this great plugin. Unfortunatly I can’t seem to get it to work. I followed the instructions. But I can not see an example image inthe options page, and when I insert all the option values after update options the option boxes are empty again. Any idea how this can be? I’m onWP 2.5
Hi Printer,
Sorry, it was my mistake…I hadn’t updated one of the plugin files correctly. Please download again and re-install and it should work.
Sam
Ah, thanks! the optionpage is working now. I seem to run in to another problem now. when I refresh my site it goes blank(empty). the dashboard ist working though. i have this code in my ‘index’ now:
ID,’start’)} ?><a href=”" rel=”bookmark” title=”Permanent Link to “>ID,’end’)} ?>
this should be correct is it?
ow, i see the code did not displayed corect in my comment.
The code should be something like:
< ?php if(function_exists('wp_flash_titles'))
{wp_flash_titles($post->ID,’start’)} ?>
<a href=”< ?php the_permalink() ? rel="nofollow">” rel=”bookmark”>
< ?php the_title(); ?>
</a>
< ?php if(function_exists('wp_flash_titles'))
{wp_flash_titles($post->ID,’end’)} ?>
Hi,
I am trying to use the plugin once again. The saving options problem seems to be fixed, thanks. BUT when I activate and try to use the plugin, only the first two posts on my home page get flash titles and all the others are completely missing. I have about 20 posts showing on my homepage btw.
Any advice? Thanks!
Hi Stephen
It could be one of a few things causing this. Let’s start with the basics, have you tried emptying your browser’s cache and refreshing the page?
Does this behaviour occur on all pages of your site (monthly archives, single category pages, etc) or just on the home page? Do the titles that aren’t appearing contain any special html characters (@!”‘, etc.)?
Sam
Thanks for the reply. I see that it seems to be browser specific. In Safari it looks fine and in Firefox 3 beta I am having the problem of no titles after the first two.
Thanks for the plugin, it’s great!
I was wondering… how to configure the plugin if you want the background to be transparent?
Hi Brian
I hadn’t thought to add an option for transparent…I’ll have to add that feature in the next release! For now you could use this workaround…
change the line of the plugin’s code:
so.write(”flash_title_’.$flash_title_id.’”);
to:
so.addParam(”wmode”,”transparent”);
so.write(”flash_title_’.$flash_title_id.’”);
Hope this works for you…
Sam
Hey, great plug-in but sadly it won’t work in my site. The options panel don’t show the fonts.
How do I fix that? =(
BTW I’m using WP 2.5.1
Thanks.
I already figured out the problem. I upgraded the swfobject.js file. Thanks for the plugin.
I just couldn’t get it to work……
Hi, it is me again. Just wondering if you will be updating your plugin to work with the new Firefox? Thanks!
Hi Sam, I followed the instructions but I cant see it working both on Index and Single.
That’s the blog: http://www.laondagrafika.com/blog/
Thanks!
ID,’start’) ?>
<a href=”" rel=”bookmark”>
ID,’end’) ?>
thats the code I put on that files.
Hi! GREAT plugin idea! i desperately want to use it.
The trouble is that when i install the plugin, i get this error message:
Plugin could not be activated because it triggered a fatal error.
When i go to the plugin page under Options, i see various errors like:
WordPress database error: [Table 'untolden_wrdp1.wp_flashtitles' doesn't exist]
There are numerous similar errors. i checked my database, and it looks like the tables that the plugin needs aren’t getting installed.
Any suggestions? i’m running ver 2.2.2.
THANKS!!
Hi. Great plugin
Got one problem: There’s a “free space” before the title, means title, date and post don’t begin at the same beginning *lol* know what I mean? Visit my site to check, I can also send a screenshot if wanted (I don’t know how long this plugin will be activated). How can I fix this? Thanks a lot!
zulu
It’s me again! Another problem: The flash titles don’t link to full post as they used to do before, so I uninstalled the plugin now. But screenshot is ready to send
[...] WP Flash Title è questo il nome del plugin che permette tutto questo. [...]
Hi Sam! Contratulations for the plugin, I think is amazing!
You know? Im using the default theme for wordpress, the original code says:
< div class=”post” id=”post-” >
< a href=”" rel=”bookmark” title=”Permanent Link to ” >
But when i replace this code for:
ID,’start’)} ?>
<a href=”” rel=”bookmark”>
ID,’end’)} ? >
… then the theme no work.
I dunno where Im mistake. Can you help me? Thank you so much and sorry for my english language, still is very poor.
Hi again Sam…. i found my mistake, i forgot write class=”storytitle” in the code… is ok now… thank you so much again… your plugin is cool