Hi
I have a swf intro on my homepage but i’m having a lot of issues with the wat the replay intro button works, not sure if its a cache issue or - well to be honest i’m lost. My site is beta.vertumotors.com - the actionscript is below.
What I would like to do is when the slideshow is complete (a movieclip on frame 1 of the parent swf I need the playhead to gotoandstop at frame 2 of the parent. This works but sometimes frame 2 overlaps the slideshow and the timing is different each tome the movie playbacks - at a total loss with this one and any pointers or solutions would be very greatly appreciated.
Here’s my code:
Actions Frame 1
// basic navigation
var myIntro:MovieClip = new slideshow();
this.addChild(myIntro);
myIntro.x = 480;
myIntro.y = 170;
var mySound:Sound = new music();
var myChannel:SoundChannel = new SoundChannel();
myChannel = mySound.play();
function setMute(vol){
var sTransform:SoundTransform = new SoundTransform(1,0);
sTransform.volume = vol; SoundMixer.soundTransform = sTransform;
}
var Mute:Boolean = false;
mute_btn.addEventListener (MouseEvent.CLICK,toggleMuteBtn);
function toggleMuteBtn(event:Event){
if(Mute){
Mute = false; setMute(1);
mutte.gotoAndStop(1);
}
else{ Mute = true; setMute(0);
mutte.gotoAndStop(2);
}
}
gotoStopBtn.addEventListener(MouseEvent.CLICK, onGotoStopClick, false, 0, true);
function onGotoStopClick(evt:MouseEvent):void {
gotoAndStop(2);
myChannel.stop();
setMute(1);
myIntro.visible = false;
}
gotoPlayBtn.addEventListener(MouseEvent.CLICK, onGotoPlayClick, false, 0, true);
function onGotoPlayClick(evt:MouseEvent):void {
my_so.clear();
gotoAndStop(1);
myVideo.visible = false;
myPoster.visible = false;
}
gotoPlayBtn.visible = false;
//initialize the shared object – get it if it exists on this computer
var my_so:SharedObject = SharedObject.getLocal("visited", "/");
//check to see if the visited info object exists and act accordingly
if (my_so.data.newVisitor != undefined) {
//object exists: return user
//replace "frame-for-return-user" with the frame number that skips your intro animation
this.gotoAndPlay(2);
myIntro.visible=false;
myChannel.stop();
} else {
//object doesn't exist: new user
//set the newVisitor attribite of the my_so.data object to indicate this is not a new visitor next time they come to the site
my_so.data.newVisitor = "no";
this.gotoAndStop(1);
}
Slideshow Last Frame:
stop();
MovieClip(root).gotoAndStop(2);
Kind regards
Rachel