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.

HTML Forum


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



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
redirect to URL after SWF is finished playing
Old 02-01-2008, 11:50 AM redirect to URL after SWF is finished playing
Experienced Talker

Posts: 39
Trades: 0
hello

I have been given a SWF which I cannot edit but require my webpage to redirect to a URL after the file is finished playing?

can this be done as a parameter of the SWF object or in javascript or by another means?

cheers

paul
69me is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-01-2008, 12:03 PM Re: redirect to URL after SWF is finished playing
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,935
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Theoretically, it could be done via the built-in setTimeout function and the window.location.href properly, if you can time the length of time it takes to play the Flash file. If you can't edit the Flash file, it would be about the only way to pull this off:

http://www.elated.com/articles/javas...d-setinterval/
http://www.javascriptmall.com/learn/lesson11.htm

That should get you started. Interesting question, though. Definitely not a normal situation. (I like that.)
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 02-01-2008, 01:03 PM Re: redirect to URL after SWF is finished playing
Average Talker

Posts: 27
Trades: 0
Flash has the ability to call JavaScript functions (or any external code, so long as the code it's calling can interface with Flash), which would allow this to work, but as you've stated that you can't edit the Flash file, this will likely be more problematic.

You could always embed the Flash file into another one, giving you some degree of support for what you want to do.

Using JavaScript timing wouldn't be an overly good idea as your Flash file may take longer for one person to download than another, meaning there's a relatively good chance of the timing going out of sync, meaning the JavaScript may execute before the file is finished playing.

JavaScript can also obtain Flash file information via TGetProperty, but I'm not sure how this works.
You'd need to use it to obtain the progress of the Flash file, meaning you'd be able to detect when the frame count for the movie and the current frame count are the same (meaning the file has played through).
This would require you to check a lot though, so it might do more harm than good unless you're willing to check every few seconds rather than in real time.
Nuvo is offline
Reply With Quote
View Public Profile
 
Old 02-04-2008, 06:57 AM Re: redirect to URL after SWF is finished playing
Experienced Talker

Posts: 39
Trades: 0
cool thanks for the advice....thnk ill try putting it within another SWF
69me is offline
Reply With Quote
View Public Profile
 
Old 02-04-2008, 07:45 AM Re: redirect to URL after SWF is finished playing
Novice Talker

Posts: 5
Trades: 0
Well you could always set a Meta Refresh allowing time for the flash to load and play, although this is not the best way to do it.

Matt
mattmoo is offline
Reply With Quote
View Public Profile
 
Old 03-07-2008, 07:22 AM Re: redirect to URL after SWF is finished playing
Experienced Talker

Posts: 39
Trades: 0
Yeah I put the SWF inside another SWF and that worked just perfect.

Thanks agiain for all the advice!

Regards

Paul
69me is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to redirect to URL after SWF is finished playing
 

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.83213 seconds with 12 queries