1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| //vars
var loadit:Loader = new Loader();
//fonctions
function home(e:Event) {
loadit.unload();
loadit.load(new URLRequest("Module - News.swf"));
}
function bio(e:Event) {
loadit.unload();
loadit.load(new URLRequest("Module - Bio.swf"));
}
function portfolio(e:Event) {
loadit.unload();
loadit.load(new URLRequest("Module - Portfolio.swf"));
}
function mediacenter(e:Event) {
loadit.unload();
loadit.load(new URLRequest("Module - MediaCenter.swf"));
}
function contact(e:Event) {
loadit.unload();
loadit.load(new URLRequest("Contact.swf"));
}
//Boutons
buttonhome.addEventListener(MouseEvent.CLICK, home);
buttonbio.addEventListener(MouseEvent.CLICK, bio);
buttonportfolio.addEventListener(MouseEvent.CLICK, portfolio);
buttonmediacenter.addEventListener(MouseEvent.CLICK, mediacenter);
buttoncontact.addEventListener(MouseEvent.CLICK, contact);
//Zone de placement du fichier
loadArea1.addChild(loadit); |
Partager