Sinisterly
Flash redirect - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Design (https://sinister.li/Forum-Design)
+--- Forum: Web Design (https://sinister.li/Forum-Web-Design)
+--- Thread: Flash redirect (/Thread-Flash-redirect)



Flash redirect - zomgwtfbbq - 06-20-2013

I made a swf file with AfterEffects at the end of the movie I want to redirect it to my website using the following code in the last keyframe:
Code:
navigateToURL(new URLRequest("http://www.hacksuite.com"), "_self"); stop();
This doesn't work, it will just loop continuosly, what am I doing wrong?

http://hacksuite.com/preview.swf


RE: Flash redirect - zomgwtfbbq - 06-20-2013

Wait what? I was asking something, but glad you like it, lol. Biggrin


RE: Flash redirect - noize - 06-25-2013

That's a nice animation. Biggrin

How about this:

Code:
getURL("http://hacksuite.com","_self")

P.S: any chance to see an ActionScript tutorial?


RE: Flash redirect - bluedog.tar.gz - 06-25-2013

Just make a timed html/php/js redirect if the swf is always ending at the same time.

If you want to redirect in 60 seconds;

HTML
<meta HTTP-EQUIV="REFRESH" content="60; url=http://www.yourdomain.com/index.html">

Plain JS
setTimeout("window.location='http://www.yourdomain.com/index.html' ",60);
window.location="http://www.yourdomain.com/index.html";


RE: Flash redirect - noize - 06-25-2013

(06-25-2013, 11:00 PM)bluedog.tar.gz Wrote: Just make a timed html/php/js redirect if the swf is always ending at the same time.

If you want to redirect in 60 seconds;

HTML
<meta HTTP-EQUIV="REFRESH" content="60; url=http://www.yourdomain.com/index.html">

Plain JS
setTimeout("window.location='http://www.yourdomain.com/index.html' ",60);
window.location="http://www.yourdomain.com/index.html";

The SWF isn't always ending at the same time. Just tried on two different machines and time required was substancially different. However, you could add HTML/JS/PHP redirects in a HTML/PHP page, not in a SWF file. I think the OP wanted to do it from the SWF file.


RE: Flash redirect - zomgwtfbbq - 06-26-2013

(06-25-2013, 11:00 PM)bluedog.tar.gz Wrote: Just make a timed html/php/js redirect if the swf is always ending at the same time.

If you want to redirect in 60 seconds;

HTML
<meta HTTP-EQUIV="REFRESH" content="60; url=http://www.yourdomain.com/index.html">

Plain JS
setTimeout("window.location='http://www.yourdomain.com/index.html' ",60);
window.location="http://www.yourdomain.com/index.html";
That's not going to work of course. What if the video is loading slowly? This will make the redirect jump in when the video hasn't finished yet.
(06-25-2013, 11:15 PM)noize Wrote:
(06-25-2013, 11:00 PM)bluedog.tar.gz Wrote: Just make a timed html/php/js redirect if the swf is always ending at the same time.

If you want to redirect in 60 seconds;

HTML
<meta HTTP-EQUIV="REFRESH" content="60; url=http://www.yourdomain.com/index.html">

Plain JS
setTimeout("window.location='http://www.yourdomain.com/index.html' ",60);
window.location="http://www.yourdomain.com/index.html";

The SWF isn't always ending at the same time. Just tried on two different machines and time required was substancially different. However, you could add HTML/JS/PHP redirects in a HTML/PHP page, not in a SWF file. I think the OP wanted to do it from the SWF file.
Yes indeed, so the redirect starts when the video has really ended. I can't see what I'm doing wrong...anyone?

(06-25-2013, 10:50 PM)noize Wrote: That's a nice animation. Biggrin

How about this:

Code:
getURL("http://hacksuite.com","_self")

P.S: any chance to see an ActionScript tutorial?
Oops missed this reply, will try it right away.

Thanks noize that works! Biggrin