-
navigateToURL problem
I've got a slide show going on and the client wants it when it reaches the final slide, the next click of the right arrow button takes you to a URL. Thought I had it down in an if statement but it's not working. Can someone look at my code and comment on a possible fix? Thanks.
--
var slides:Array=[slide1_mc,slide2_mc,slide3_mc,slide4_mc,slide5_mc, slide6_mc,slide7_mc,slide8_mc,slide9_mc,slide10_mc ,slide11_mc,slide12_mc,slide13_mc,slide14_mc,slide 15_mc,slide16_mc,slide17_mc,slide18_mc,slide19_mc, slide20_mc,slide21_mc,slide22_mc,slide23_mc,slide2 4_mc];
var showingIndex:int=0;
rightArrow_btn.addEventListener(MouseEvent.MOUSE_D OWN, slide_right);
leftArrow_btn.addEventListener(MouseEvent.MOUSE_DO WN, slide_left);
function slide_right(event:MouseEvent):void {
if (showingIndex==23) {
return;
navigateToURL(new URLRequest("this.html"), '_self');
}
outTween=new Tween(slides[showingIndex],"alpha",None.easeNone,1,0,1,true);
inTween=new Tween(slides[showingIndex+1],"alpha",None.easeNone,0,1,1,true);
showingIndex++;
copy_mc.nextFrame();
}
Adam Bell
dzign@datatv.com
--
Over 90% of all websites
suck......
Join the minority.
-
When you use a return, it ejects out of the function and doesn't run any other code - so if you move that down underneath the navigateToURL() it should work.
-
Adam Bell
dzign@datatv.com
--
Over 90% of all websites
suck......
Join the minority.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|