ok, so i'm working on an intro page for a site that basically just has their logo, commercial, and "Skip Intro" button on it. the commercial video is an FLV file, and i can't figure out for the life of me how to get it to redirect to the homepage after the video is done playing.
i'm sort of a n00b when it comes to Flash, and i tried searching for tutorials on how to do this, but couldn't find anything.
Registered: Jan 2005
Location: Yawbs,Giaks,and Automobiles
don't know much Flash, but if you want a quick out,
define an 'id' for your flash object on the page, create a script, and have it continuosly listen to the flash object until the readystate == complete. when complete, have the page redirect to the 2nd page?
there should be a better way to do this. this is just a quick out.
___________________
May-23-2007 19:18
AnomalyConcept
Supreme tranceaddict
Registered: Jun 2005
Location: Chicagoish, USA
ActionScript to replace the document location.
(maybe that's what the previous link was, I didn't check.)
HTH. Personally, I don't like using Flash on websites, but I can see why a Flash intro would be helpful.
May-23-2007 19:20
LeopoldStotch
Suapremae tranecadictt
Registered: Jan 2005
Location: Yawbs,Giaks,and Automobiles
^^that could work too ..
or
code:
Script LANGUAGE="VBScript"
Sub [name of object]_OnReadyState(lReadyState)
'check for complete, if so, then redirect
End Sub
/SCRIPT
haven't tried to see if it works.
___________________
May-23-2007 19:25
pvdAngel
Lavenderism...
Registered: Feb 2006
Location: Inside My Mind
Man, I really need to get back into ActionScripting. Only got up to Lesson 2 in 'Training From The Source'.
___________________
May-23-2007 19:34
Boomer187
Spicy Hotdog
Registered: Aug 2001
Location: USA
or a dirty sleezy bad way of doing it is using header redirect. You might know how long the movie is, so use this to redirect them after that amount of time is over hehe
code:
< HEAD>
< META HTTP-EQUIV="refresh"
CONTENT="15;URL=http://www.thewebsite.com">
< /HEAD>
that redirects after 15 seconds.
May-23-2007 19:35
LeopoldStotch
Suapremae tranecadictt
Registered: Jan 2005
Location: Yawbs,Giaks,and Automobiles
quote:
Originally posted by Boomer187
or a dirty sleezy bad way of doing it is using header redirect. You might know how long the movie is, so use this to redirect them after that amount of time is over hehe
code:
< HEAD>
< META HTTP-EQUIV="refresh"
CONTENT="15;URL=http://www.thewebsite.com">
< /HEAD>
that redirects after 15 seconds.
that's the homeless man's way out of this.
___________________
May-23-2007 19:41
Boomer187
Spicy Hotdog
Registered: Aug 2001
Location: USA
quote:
Originally posted by LeopoldStotch
that's the homeless man's way out of this.
i know, I lol'd when I thought of it. hehe
May-23-2007 20:05
PEZ68
Progressive Resistance
Registered: May 2002
Location: 1€/j (soldes)
If you're using AS2 & NetStream class:
code:
var netConn:NetConnection = new NetConnection();
netConn.connect(null);
var netStream:NetStream = new NetStream(netConn);
netStream.onStatus = function(infoObject) {
if (infoObject.code == "NetStream.Buffer.Empty") {
//end of video, redirect here
}
};
maVideo.attachVideo(netStream);
netStream.setBufferTime(2);
netStream.play("yourvideo.flv");