package AS{ import flash.display.MovieClip; import flash.display.Loader; import flash.net.URLRequest; import caurina.transitions.properties.FilterShortcuts; import caurina.transitions.Tweener; public class Main extends MovieClip { public static var aantal = 1; public static var Background:Loader; public static var Kop:Loader; public static var Text:Loader; public static var LinksofRechts = 0; public function Main():void { var mckop:MovieClip = new MovieClip; var mc:MovieClip = new MovieClip; trace("Main starts"); trace(aantal); Background = new Loader(); var url:URLRequest = new URLRequest("Media/"+aantal+".png"); var url3:String = "Media/1.png"; var urlReq3:URLRequest = url; Background.load(urlReq3); Background.x = 445; Background.y = 164; Background.alpha = 0; Tweener.addTween(Background, {alpha:1 , time: 5, transition:"easeInSine"}); //Background.visible = false; addChild(Background); //this.addChildAt( Background, 0 ); var pictLdr:Loader = new Loader(); var pictURL:String = "Media/kop1.png" pictLdr.x = 430; pictLdr.y = 520; pictLdr.alpha = 0; var pictURLReq:URLRequest = new URLRequest(pictURL); Tweener.addTween(pictLdr, {alpha:1 , time: 5, transition:"easeInSine"}); pictLdr.load(pictURLReq); addChild(pictLdr); trace(aantal); } // laat verwijderd de huidige afbeelding en ververst het met de volgende afbeelding //dit gebeurd door middel van 1t/m 10 public static function refreshPicture() { Tweener.addTween(Background, {x:200 ,y:900 ,alpha:1 , time:0.5, transition:"easeInExpo"}); Background.unload();// unload huidige afbeelding var url:URLRequest = new URLRequest("Media/"+aantal+".png"); if (LinksofRechts == 0) { Background.alpha = 0 ; Tweener.addTween(Background, {x:445 ,y:164 ,alpha:1 , time:0.6, transition:"easeOutCubic"}); //Tweener.addTween(Background, {blurX:2 ,quality:2, time:0.6, transition:"linear"}); Background.load(url); trace("links"); //trace(LinksofRechts) if (aantal == 0) { //b1.visible = true; } } } } }