-
1. Re: Navigating using a loader script and how to modify script to use labels instead of frame numbers?
kglad Dec 24, 2011 8:19 AM (in response to marisol_Q)stop();
import flash.display.Loader;
import flash.events.MouseEvent;
import flash.net.URLRequest;
var myLoader:Loader = new Loader();
swf1.addEventListener(MouseEvent.CLICK, loadMySWF);
swf2.addEventListener(MouseEvent.CLICK, loadMySWF);
swf3.addEventListener(MouseEvent.CLICK, loadMySWF);
swf4.addEventListener(MouseEvent.CLICK, loadMySWF);
swf5.addEventListener(MouseEvent.CLICK, loadMySWF);
swf6.addEventListener(MouseEvent.CLICK, loadMySWF);
swf7.addEventListener(MouseEvent.CLICK, loadMySWF);
swf8.addEventListener(MouseEvent.CLICK, loadMySWF);
function loadMySWF(event:MouseEvent):void{
var newPage:URLRequest = new URLRequest(event.target.name +".swf");
myLoader.load(newPage);
addChild(myLoader);
}
stop();
home_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_1);
function fl_ClickToGoToAndStopAtFrame_1(event:MouseEvent):void
{
gotoAndStop("home");
}
stop();
experience_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_41);
function fl_ClickToGoToAndStopAtFrame_41(event:MouseEvent):void
{
gotoAndStop(41);
}
stop();
user's default email program (if they have one):
navigateToURL(new URLRequest("mailto:somebody@anywhere.com?cc=cc@anywhere.com&bcc=bcc@anywhere.com&subject=I am the email subject&body=I am the email body"));
-
2. Re: Navigating using a loader script and how to modify script to use labels instead of frame numbers?
marisol_Q Dec 24, 2011 8:30 AM (in response to marisol_Q)Thanks. I feel more confident now that you've reviewed my script. Final question to clarify. Is this how I would use the label instead of a frame number?
stop();
home_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStop"home");
function fl_ClickToGoToAndStopAt"home"(event:MouseEvent):void
{
gotoAndStop("home");
}
-
3. Re: Navigating using a loader script and how to modify script to use labels instead of frame numbers?
kglad Dec 24, 2011 8:35 AM (in response to marisol_Q)no, just use the code i suggested. you're getting confused by a function name:
// this
home_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_1);
function fl_ClickToGoToAndStopAtFrame_1(event:MouseEvent):void
{
gotoAndStop("home");
}
// works the same as
home_btn.addEventListener(MouseEvent.CLICK, f);
function f(event:MouseEvent):void
{
gotoAndStop("home");
}
// use any function name you find helpful (and that hasn't been used before)


