Link to home
Start Free TrialLog in
Avatar of Alex500
Alex500

asked on

access load swf outside of loader function

hi all i am making an image gallery on a website and there are 5 different galleries in five separate swf files. What i would like to do is tween between the different swfs once they are loaded. So far I have loaded the swfs and can add tweener effects from within the onCompleteHandler load event function but when i try to remove child or tween outside of the load event function  i get


1120: Access of undefined property loadEvent.
package {
	
	//Import relevant ActionScript Libs
	import flash.events.*;
	import flash.display.*;
	import flash.filters.BlurFilter;
	import flash.net.URLRequest;
	import flash.display.Loader;
	import flash.events.ProgressEvent;
	import flash.display.Sprite;
	
	
	//Tweener Lib
	import caurina.transitions.*;
	import caurina.transitions.properties.FilterShortcuts;
	FilterShortcuts.init();

	
	
	public class goodTimesAS3 extends MovieClip {
		
		
					//Load in MovieClips and instantiate (BACKGROUNDS)
					private var entrance:entranceBg_mc = new entranceBg_mc();
					private var desk:deskBg_mc = new deskBg_mc();
					private var studio:studioBg_mc = new studioBg_mc();
					private var drawing:drawingBg_mc = new drawingBg_mc();
					private var shrine:shrineBg_mc = new shrineBg_mc();
					
					
					//Load in MovieClips and instantiate (LOGO & CONTENT)
					private var logo:goodLogo_mc = new goodLogo_mc();
					private var deskInfo:deskInfo_mc =  new deskInfo_mc();
					private var rightArrow:rightArrow_mc = new rightArrow_mc();
					private var rightArrow2:rightArrow_mc = new rightArrow_mc();
					private var leftArrow:leftArrow_mc = new leftArrow_mc();
					private var leftArrow2:leftArrow_mc = new leftArrow_mc();
					private var merchDoor:studioDoorCutout_mc = new studioDoorCutout_mc();
					
					private var mercText:mercText_mc = new mercText_mc();
					
					//Load in people MovieClips
					private var saira:saira_mc = new saira_mc();
					private var nick:nick_mc = new nick_mc();
					private var jamie:jamie_mc = new jamie_mc();
					private var nikole:nikole_mc = new nikole_mc();
					private var danny:danny_mc = new danny_mc();
					
					private var saira2:saira_mc = new saira_mc();
					private var nick2:nick_mc = new nick_mc();
					private var jamie2:jamie_mc = new jamie_mc();
					private var nikole2:nikole_mc = new nikole_mc();
					private var danny2:danny_mc = new danny_mc();
					
					
					private var maskWindow:mask_mc = new mask_mc();
					private var maskWindow2:mask_mc = new mask_mc();
					
					private var sairaContent:sairaContent_mc = new sairaContent_mc();
					private var nickContent:nickContent_mc = new nickContent_mc();
					private var jamieContent:jamieContent_mc = new jamieContent_mc();
					private var nikoleContent:nikoleContent_mc = new nikoleContent_mc();
					private var dannyContent:dannyContent_mc = new dannyContent_mc();
					
					
					
					
					//Start blur settings for desk
					private var myBlurFilter = new BlurFilter (10,10,3);
					
					
					//Set string var for people tween
					private var currentPage:String = "nikoleContent";
	
					
					public function goodTimesAS3() {
						
						//Position and add elements to the stage
						stage.addChild(desk);
						desk.x = 606.15;
						desk.y = 390.10;
						desk.width = 1720;
						desk.height = 1150.80

						stage.addChild(entrance);
						entrance.x = 597;
						entrance.y = 398;
						
						stage.addChild(logo);
						logo.x = 580;
						logo.y = 274;
						//Add event listener for entrance animation to begin (Runs function goInside)
						logo.addEventListener(MouseEvent.MOUSE_OVER, goInside);
						
						
						//Add studio bg to stage
						stage.addChild(studio);
						studio.x = 1200;
						studio.y = 0;
						
						
						stage.addChild(rightArrow);
						rightArrow. x = 1161.3;
						rightArrow. y = 349.10;
						rightArrow.addEventListener(MouseEvent.CLICK, moveRight);
						
						
						
						
						
				}
				
				public function goInside(e): void {
					
						//Remove Logo
						stage.removeChild(logo);
						logo.removeEventListener(MouseEvent.MOUSE_OVER, goInside);
						
						
						//Scale entrance and drop alpha
						Tweener.addTween (entrance, {_Blur_blurX: 10, _Blur_blurY: 10, _Blur_quality:2, time:0.4, transition:"easeOutSine"});
						Tweener.addTween (entrance, {width:1660 , height:1110, time:0.4, transition:"easeOutSine"});
						Tweener.addTween (entrance, {alpha:0, time:0.6, transition:"easeOutSine"});
						
						//Fade desk in and scale oncomplete run enter content funtion
						Tweener.addTween (desk, {width:1260, height:843, time:0.4, delay: 0.1, transition:"easeOutSine", onComplete: enterContent});
						
					
					
					}
					
					
				//Display Content	
				public function enterContent() {
					
						stage.addChild(deskInfo);
						deskInfo.x = 241.30;
						deskInfo.y = 74.20;
						deskInfo.filters = [myBlurFilter];
						Tweener.addTween (deskInfo, {_Blur_blurX: 0, _Blur_blurY: 0, _Blur_quality:2, time:0.8, transition:"easeOutSine"});
						Tweener.addTween (deskInfo, {x:190.30, time:0.8, transition:"easeOutSine"});
						
						//Add arrow to stage and attach event listener
						stage.addChild(leftArrow);
						leftArrow. x = 40;
						leftArrow. y = 349.10;
						leftArrow.addEventListener(MouseEvent.CLICK, moveLeft);
						
				}
				
				
			public function moveLeft(e): void {
				
				stage.removeChild(deskInfo);
				
				
				stage.addChild(shrine);
				shrine.x = -1292.40;
				shrine.y = -28.35;
				Tweener.addTween(desk, {x:1828, time:0.6, transition:"easeOutSine"});
				Tweener.addTween(deskInfo, {x:1828, time:0.6, transition:"easeOutSine"});
				Tweener.addTween(shrine, {x:-50.10, time:0.6, transition:"easeOutSine", onComplete: addGallery});
				Tweener.addTween (shrine, {_Blur_blurX: 10, _Blur_blurY: 10, _Blur_quality:2, time:0, transition:"easeOutSine"});
				Tweener.addTween (shrine, {_Blur_blurX: 0, _Blur_blurY: 0, _Blur_quality:2, time:0.6, transition:"easeOutSine"});
				
				
				
				
			}
			
			
			
		public function addGallery() {
					
					stage.addChild(rightArrow2);
					rightArrow2. x = 1161.3;
					rightArrow2. y = 349.10;
					
					
					
					stage.addChild(danny2);
						danny2.x = 160;
						danny2.y = 300;
						danny2.addEventListener(MouseEvent.CLICK, clickHandlerOne2);
							function clickHandlerOne2(e:MouseEvent):void {
									
								}
						
						stage.addChild(jamie2);
						jamie2.x = 160;
						jamie2.y = 400;
						jamie2.addEventListener(MouseEvent.CLICK, clickHandlerTwo2);
							function clickHandlerTwo2(e:MouseEvent):void {
								
								
								//////////////////////////
							
									
								}
						
						
						stage.addChild(saira2);
						saira2.x = 230;
						saira2.y = 290;
							saira2.addEventListener(MouseEvent.CLICK, clickHandlerThree2);
								function clickHandlerThree2(e:MouseEvent):void {
										
									}
						
						
						stage.addChild(nick2);
						nick2.x = 230;
						nick2.y = 390;
						nick2.addEventListener(MouseEvent.CLICK, clickHandlerFour2);
								function clickHandlerFour2(e:MouseEvent):void {
										
									}
						
						stage.addChild(nikole2);
						nikole2.x = 160;
						nikole2.y = 220;
						nikole2.addEventListener(MouseEvent.CLICK, clickHandlerFive2);
								function clickHandlerFive2(e:MouseEvent):void {
										
									}
					
					
					
					/*Load in external swf */
				var loadSwf:Loader = new Loader();
				var requestSwf:URLRequest = new URLRequest("photo_gallery.swf");
				loadSwf.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
				loadSwf.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
				

				loadSwf.load(requestSwf);
				
				
				
				var loadSwfNick:Loader = new Loader();
				var requestSwfNick:URLRequest = new URLRequest("photo_galleryNick.swf");
				loadSwfNick.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandlerNick);
				//loadSwfNick.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandlerNick);
				

				loadSwfNick.load(requestSwfNick);
				
				
				
				/* Add swf to stage */
				function onCompleteHandler (loadEvent:Event) {
					
					
					
					stage.addChild(loadEvent.currentTarget.content);
					loadEvent.currentTarget.content.mask = maskWindow;
					loadEvent.currentTarget.content.x = 400;
					loadEvent.currentTarget.content.y = 200;
					loadEvent.currentTarget.content.alpha = 0;
					Tweener.addTween(loadEvent.currentTarget.content, {alpha:1, time:0.6, transition:"easeOutSine"});
					
					
					
					
					maskWindow.x = 400;
					maskWindow.y = 200;
					
					rightArrow2.addEventListener(MouseEvent.CLICK, backRight)
					
					//stage.removeChild(loadEvent.currentTarget.content);
				}
				
				/* Progress tracking*/
				function onProgressHandler(mProgress:ProgressEvent) {
					var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
					trace (percent);
				}
				
				
				
				function onCompleteHandlerNick (loadEvent:Event) { 
				
				stage.addChild(loadEvent.currentTarget.content);
				loadEvent.currentTarget.content.mask = maskWindow2;
				maskWindow2.x = 400;
				maskWindow2.y = -250;
				
				
				loadEvent.currentTarget.content.x = 400;
				loadEvent.currentTarget.content.y = -250;
				
				
				
				}
				
				}	
			
			
			
			
			
			public function backRight(e): void {
				
				stage.removeChild(rightArrow2);
				rightArrow2.removeEventListener(MouseEvent.CLICK, backRight)
				
				
				stage.addChild(deskInfo);
				deskInfo.x = 241.30;
				deskInfo.y = 74.20;
				deskInfo.alpha = 0;
				deskInfo.filters = [myBlurFilter];
				Tweener.addTween (deskInfo, {_Blur_blurX: 0, _Blur_blurY: 0, _Blur_quality:2, time:0.8, delay:0.6, transition:"easeOutSine"});
				Tweener.addTween (deskInfo, {x:190.30, alpha:1, time:0.8, delay:0.6, transition:"easeOutSine"});
				
				
				//loadEvent.parent.removeChild(loadEvent.currentTarget.content);
				
				
				Tweener.addTween(shrine, {x:-1292.40, time:0.6, transition:"easeOutSine", onComplete: function() { stage.removeChild(shrine); }});
				Tweener.addTween(desk, {x:606.15, time:0.6, transition:"easeOutSine"});
				
				
				
				
				
				
				
			}
				
				
			public function moveRight(e): void {
				
						//Remove Desk Content
						stage.removeChild(deskInfo);
						stage.removeChild(rightArrow);
						stage.removeChild(leftArrow);
						
						
						//Blur studio
						studio.filters = [myBlurFilter];
						//Animate between backgrounds		
						Tweener.addTween(studio, {x:0, time:0.6, transition:"easeOutSine"});
						Tweener.addTween(studio, {_Blur_blurX: 0, _Blur_blurY: 0, _Blur_quality:2, time:0.6, delay:0.3, transition:"easeOutSine"});
						Tweener.addTween(desk, {x:-632.15, _Blur_blurX: 10, _Blur_blurY: 10, _Blur_quality:2, time:0.6, transition:"easeOutSine", onComplete: studioContent  });

				
			}
			
			
			
			public function studioContent() {
				
								
						stage.addChild(leftArrow);
						leftArrow. x = 40;
						leftArrow. y = 349.10;
						leftArrow.addEventListener(MouseEvent.CLICK, backDesk);
						rightArrow.removeEventListener(MouseEvent.MOUSE_OVER, moveRight);
						leftArrow.removeEventListener(MouseEvent.CLICK, moveLeft);
						
						
						
				
				
				
							stage.addChild(dannyContent);
							dannyContent.alpha = 0;
							dannyContent.x = 330;
							dannyContent.y = 20;
							
							stage.addChild(jamieContent);
							jamieContent.alpha = 0;
							jamieContent.x = 330;
							jamieContent.y = 20;
							
							stage.addChild(sairaContent);
							sairaContent.alpha = 0;
							sairaContent.x = 330;
							sairaContent.y = 20;
							
							stage.addChild(nickContent);
							nickContent.alpha = 0;
							nickContent.x = 330;
							nickContent.y = 20;
							
							stage.addChild(nikoleContent);
							nikoleContent.alpha = 1;
							nikoleContent.x = 330;
							nikoleContent.y = 20;
							
							
							
				
						stage.addChild(danny);
						danny.x = 160;
						danny.y = 300;
						danny.addEventListener(MouseEvent.CLICK, clickHandlerOne);
							function clickHandlerOne(e:MouseEvent):void {
									moveOut("dannyContent");
								}
						
						stage.addChild(jamie);
						jamie.x = 160;
						jamie.y = 400;
						jamie.addEventListener(MouseEvent.CLICK, clickHandlerTwo);
							function clickHandlerTwo(e:MouseEvent):void {
									moveOut("jamieContent");
								}
						
						
						stage.addChild(saira);
						saira.x = 230;
						saira.y = 290;
							saira.addEventListener(MouseEvent.CLICK, clickHandlerThree);
								function clickHandlerThree(e:MouseEvent):void {
										moveOut("sairaContent");
									}
						
						
						stage.addChild(nick);
						nick.x = 230;
						nick.y = 390;
						nick.addEventListener(MouseEvent.CLICK, clickHandlerFour);
								function clickHandlerFour(e:MouseEvent):void {
										moveOut("nickContent");
									}
						
						stage.addChild(nikole);
						nikole.x = 160;
						nikole.y = 220;
						nikole.addEventListener(MouseEvent.CLICK, clickHandlerFive);
								function clickHandlerFive(e:MouseEvent):void {
										moveOut("nikoleContent");
									}
									
									
						stage.addChild(merchDoor);
						merchDoor.x = 855.45;
						merchDoor.y = 375;
						merchDoor.addEventListener(MouseEvent.CLICK, merchLoad);
						
				
			}
			
			
				public function merchLoad (e): void {
				
						stage.addChild(drawing);
						drawing.x = 17.30;
						drawing.y = 10.65;
						drawing.alpha = 0;
						
						Tweener.addTween(drawing, {alpha:1, time:0.6, transition:"easeOutSine"});
						
						stage.addChild(mercText);
						mercText.x = 477;
						mercText.y = 264;
						mercText.alpha = 0;
						
						Tweener.addTween(mercText, {alpha:1, time:0.6, delay:0.6, transition:"easeOutSine"});
						
						
						
						leftArrow.removeEventListener(MouseEvent.CLICK, backDesk);
						
						stage.addChild(leftArrow2);
						leftArrow2. x = 40;
						leftArrow2. y = 349.10;
						leftArrow2.addEventListener(MouseEvent.CLICK, backStudio)
						
						
				
				}
				
				
					public function backStudio(e): void {
						
						stage.removeChild(mercText);
						stage.removeChild(leftArrow2);
						
						Tweener.addTween(drawing, {alpha:0, time:0.6, transition:"easeOutSine", onComplete: function() { stage.removeChild(drawing); }});
						leftArrow2.removeEventListener(MouseEvent.CLICK, backStudio)
						leftArrow.addEventListener(MouseEvent.CLICK, backDesk);
						
					}
			
		
			function moveOut (page:String) {
											
				if (page!=currentPage) {
												
					if (currentPage== "nikoleContent") { 
					
					Tweener.addTween(nikoleContent, { onComplete:function() { this.alpha = 0; moveIn(page);}});
					
				}
														
														
					if (currentPage== "sairaContent") { 
					
					Tweener.addTween(sairaContent, { onComplete:function() { this.alpha = 0; moveIn(page);}});
					
				}
														
					if (currentPage== "nickContent") { 
					
					Tweener.addTween(nickContent, { onComplete:function() { this.alpha = 0; moveIn(page);}});
					
				}
				
					if (currentPage== "jamieContent") { 
					
					Tweener.addTween(jamieContent, { onComplete:function() { this.alpha = 0; moveIn(page);}});
					
				}
				
					if (currentPage== "dannyContent") { 
					
					Tweener.addTween(dannyContent, { onComplete:function() {  this.alpha = 0; moveIn(page);}});
					
					
							}
											
					}
										
				}
				
				function moveIn (next:String) {
									
					if (next=="nikoleContent") {
						Tweener.addTween(nikoleContent, {x:330, time:0.6, transition:"easeOutSine"});
						Tweener.addTween(nikoleContent, {alpha:1, time:0.3, delay:0.3, transition:"easeOutSine"});
					}
					if (next=="sairaContent") {
						Tweener.addTween(sairaContent, {x:330, time:0.6, transition:"easeOutSine"});
						Tweener.addTween(sairaContent, {alpha:1, time:0.3, delay:0.3, transition:"easeOutSine"});
					}
					if (next=="nickContent") {
						Tweener.addTween(nickContent, {x:330, time:0.6, transition:"easeOutSine"});
						Tweener.addTween(nickContent, {alpha:1, time:0.3, delay:0.3, transition:"easeOutSine"});
					}
					
					if (next=="jamieContent") {
						Tweener.addTween(jamieContent, {x:330, time:0.6, transition:"easeOutSine"});
						Tweener.addTween(jamieContent, {alpha:1, time:0.3, delay:0.3, transition:"easeOutSine"});
					}
					
					if (next=="dannyContent") {
						Tweener.addTween(dannyContent, {x:330, time:0.6, transition:"easeOutSine"});
						Tweener.addTween(dannyContent, {alpha:1, time:0.3, delay:0.3, transition:"easeOutSine"});
					}
									
					
					currentPage=next;
									
									
			}
			
			public function backDesk(e): void {
				
					currentPage = "nikoleContent";
					
					stage.removeChild(merchDoor);
					merchDoor.removeEventListener(MouseEvent.CLICK, merchLoad);
				
					stage.removeChild(dannyContent);
					stage.removeChild(nikoleContent);
					stage.removeChild(nickContent);
					stage.removeChild(sairaContent);
					stage.removeChild(jamieContent);
					
					stage.removeChild(danny);
					stage.removeChild(nikole);
					stage.removeChild(nick);
					stage.removeChild(saira);
					stage.removeChild(jamie);
					
					
					
					
					
					
					leftArrow.removeEventListener(MouseEvent.CLICK, backDesk);
					leftArrow.addEventListener(MouseEvent.CLICK, moveLeft);
					
					//Blur studio
					desk.filters = [myBlurFilter];
					//Animate between backgrounds		
					Tweener.addTween(desk, {x:606.15, time:0.6, transition:"easeOutSine"});
					Tweener.addTween(desk, {_Blur_blurX: 0, _Blur_blurY: 0, _Blur_quality:2, time:0.6, delay:0.3, transition:"easeOutSine"});
					Tweener.addTween(studio, {x:1200, _Blur_blurX: 10, _Blur_blurY: 10, _Blur_quality:2, time:0.6, transition:"easeOutSine", onComplete: contentAdd});
					
					stage.addChild(rightArrow);
					rightArrow. x = 1161.3;
					rightArrow. y = 349.10;
					
					function contentAdd () {
					
					stage.addChild(deskInfo);
					deskInfo.x = 241.30;
					deskInfo.y = 74.20;
					deskInfo.filters = [myBlurFilter];
					Tweener.addTween (deskInfo, {_Blur_blurX: 0, _Blur_blurY: 0, _Blur_quality:2, time:0.8, transition:"easeOutSine"});
					Tweener.addTween (deskInfo, {x:190.30, time:0.8, transition:"easeOutSine"});
					
					
					}
				
				}
				
			
		
		}

}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Randy Poole
Randy Poole
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Alex500
Alex500

ASKER

sweet good result however now when i try to tween between the movie clips using a string var and my tweener lib i get this error



TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Stage@56e11191 to flash.display.MovieClip.  at MethodInfo-152()
Avatar of Alex500

ASKER

sorry not movieclips they are swfs
A movieclip is a swf. Change Stage to this.root
Avatar of Alex500

ASKER

I don't quite follow I have attached my script to try and show what i am trying to do
public function addGallery() {
					
					stage.addChild(rightArrow2);
					rightArrow2. x = 1161.3;
					rightArrow2. y = 349.10;
					
					
					
					stage.addChild(danny2);
						danny2.x = 160;
						danny2.y = 300;
						danny2.addEventListener(MouseEvent.CLICK, clickHandlerOne2);
							function clickHandlerOne2(e:MouseEvent):void {
									trace("ALEX");
								}
						
						stage.addChild(jamie2);
						jamie2.x = 160;
						jamie2.y = 400;
						jamie2.addEventListener(MouseEvent.CLICK, clickHandlerTwo2);
							function clickHandlerTwo2(e:MouseEvent):void {
								
								trace("ALEX");
								//////////////////////////
							
									
								}
						
						
						stage.addChild(saira2);
						saira2.x = 230;
						saira2.y = 290;
							saira2.addEventListener(MouseEvent.CLICK, clickHandlerThree2);
								function clickHandlerThree2(e:MouseEvent):void {
										MovieClip(parent).moveOutSwf("myLoadedClipSaira");
									}
						
						
						stage.addChild(nick2);
						nick2.x = 230;
						nick2.y = 390;
						nick2.addEventListener(MouseEvent.CLICK, clickHandlerFour2);
								function clickHandlerFour2(e:MouseEvent):void {
										MovieClip(parent).moveOutSwf("myLoadedClipNick");
									}
						
						stage.addChild(nikole2);
						nikole2.x = 160;
						nikole2.y = 220;
						nikole2.addEventListener(MouseEvent.CLICK, clickHandlerFive2);
								function clickHandlerFive2(e:MouseEvent):void {
										trace("ALEX");
									}
					
					
					
					
					
					
					/*Load in external swf */
				var loadSwf:Loader = new Loader();
				var requestSwf:URLRequest = new URLRequest("photo_gallery.swf");
				loadSwf.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
				loadSwf.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
				loadSwf.load(requestSwf);
				
				var loadSwfNick:Loader = new Loader();
				var requestSwfNick:URLRequest = new URLRequest("photo_galleryNick.swf");
				loadSwfNick.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandlerNick);
				loadSwfNick.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandlerNick);
				loadSwfNick.load(requestSwfNick);
				
				
				var loadSwfSaira:Loader = new Loader();
				var requestSwfSaira:URLRequest = new URLRequest("photo_gallerySaira.swf");
				loadSwfSaira.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandlerSaira);
				loadSwfSaira.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandlerSaira);
				loadSwfSaira.load(requestSwfSaira);
				
				
				var loadSwfDanny:Loader = new Loader();
				var requestSwfDanny:URLRequest = new URLRequest("photo_galleryDanny.swf");
				loadSwfDanny.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandlerDanny);
				loadSwfDanny.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandlerDanny);
				loadSwfDanny.load(requestSwfDanny);
				
	
	
	
	
	
	
	
	
	
	
	
				
				/* Add swf to stage */
				function onCompleteHandler (loadEvent:Event) {
					stage.addChild(loadEvent.currentTarget.content);
					myLoadedClip = loadEvent.currentTarget.content;
					loadEvent.currentTarget.content.mask = maskWindow;
					loadEvent.currentTarget.content.x = 400;
					loadEvent.currentTarget.content.y = 200;
					loadEvent.currentTarget.content.alpha = 0;
					Tweener.addTween(loadEvent.currentTarget.content, {alpha:1, time:0.6, transition:"easeOutSine"});
					maskWindow.x = 400;
					maskWindow.y = 200;
					rightArrow2.addEventListener(MouseEvent.CLICK, backRight)
				}
				
				/* Progress tracking*/
				function onProgressHandler(mProgress:ProgressEvent) {
					var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
					trace (percent);
				}
				
				
				
				
				
				
				
				
				
				/*NICK*/
				function onCompleteHandlerNick (loadEvent:Event) {
					stage.addChild(loadEvent.currentTarget.content);
					myLoadedClipNick = loadEvent.currentTarget.content;
					loadEvent.currentTarget.content.mask = maskWindow2;
					loadEvent.currentTarget.content.x = 400;
					loadEvent.currentTarget.content.y = -500;
					loadEvent.currentTarget.content.alpha = 0;
					Tweener.addTween(loadEvent.currentTarget.content, {alpha:1, time:0.6, transition:"easeOutSine"});
					maskWindow2.x = 400;
					maskWindow2.y = -500;
					
				}
				
				/* Progress tracking*/
				function onProgressHandlerNick(mProgress:ProgressEvent) {
					var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
					trace (percent);
				}
				
				
				
				/*Saira*/
				function onCompleteHandlerSaira (loadEvent:Event) {
					stage.addChild(loadEvent.currentTarget.content);
					myLoadedClipSaira = loadEvent.currentTarget.content;
					loadEvent.currentTarget.content.mask = maskWindow3;
					loadEvent.currentTarget.content.x = 400;
					loadEvent.currentTarget.content.y = -500;
					loadEvent.currentTarget.content.alpha = 0;
					Tweener.addTween(loadEvent.currentTarget.content, {alpha:1, time:0.6, transition:"easeOutSine"});
					maskWindow3.x = 400;
					maskWindow3.y = -500;
					
				}
				
				/* Progress tracking*/
				function onProgressHandlerSaira(mProgress:ProgressEvent) {
					var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
					trace (percent);
				}
				
				
				
				
				
				/*Danny*/
				function onCompleteHandlerDanny (loadEvent:Event) {
					stage.addChild(loadEvent.currentTarget.content);
					myLoadedClipDanny = loadEvent.currentTarget.content;
					loadEvent.currentTarget.content.mask = maskWindow4;
					loadEvent.currentTarget.content.x = 400;
					loadEvent.currentTarget.content.y = -500;
					loadEvent.currentTarget.content.alpha = 0;
					Tweener.addTween(loadEvent.currentTarget.content, {alpha:1, time:0.6, transition:"easeOutSine"});
					maskWindow4.x = 400;
					maskWindow4.y = -500;
					
				}
				
				/* Progress tracking*/
				function onProgressHandlerDanny(mProgress:ProgressEvent) {
					var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
					trace (percent);
				}
				
		
				
		}	
			
			/*Tween Swfs*/
			
			function moveOutSwf (page:String) {
											
				if (page!=currentPage) {
												
					if (currentPage== "myLoadedClip") { 
					
					Tweener.addTween(myLoadedClip, {y:900, time:0.5, transition:"easeOutSine", onComplete:function() { this.y = -500; moveInSwf(page); }});
					Tweener.addTween(maskWindow, {y:900, time:0.5, transition:"easeOutSine"});
					
				}
														
														
					if (currentPageSwf== "myLoadedClipNick") { 
					
					Tweener.addTween(myLoadedClipNick, {y:900, time:0.5, transition:"easeOutSine", onComplete:function() { this.y = -500; moveInSwf(page); }});
					Tweener.addTween(maskWindow2, {y:900, time:0.5, transition:"easeOutSine"});
				}
														
					if (currentPageSwf== "myLoadedClipSaira") { 
					
					Tweener.addTween(myLoadedClipSaira, {y:900, time:0.5, transition:"easeOutSine", onComplete:function() { this.y = -500; moveInSwf(page); }});
					Tweener.addTween(maskWindow3, {y:900, time:0.5, transition:"easeOutSine"});
				}
				
					if (currentPageSwf== "myLoadedClipDanny") { 
					
					Tweener.addTween(myLoadedClipDanny, {y:900, time:0.5, transition:"easeOutSine", onComplete:function() { this.y = -500; moveInSwf(page); }});
					Tweener.addTween(maskWindow4, {y:900, time:0.5, transition:"easeOutSine"});
				}
				
											
					}
										
				}
				
				function moveInSwf (next:String) {
									
					if (next=="myLoadedClip") {
						Tweener.addTween(myLoadedClip, {y:400, time:0.6, transition:"easeOutSine"});
						Tweener.addTween(myLoadedClip, {alpha:1, time:0.3, delay:0.3, transition:"easeOutSine"});
						Tweener.addTween(maskWindow, {y:400, time:0.6, transition:"easeOutSine"});
					}
					if (next=="myLoadedClipNick") {
						Tweener.addTween(myLoadedClipNick, {y:400, time:0.6, transition:"easeOutSine"});
						Tweener.addTween(myLoadedClipNick, {alpha:1, time:0.3, delay:0.3, transition:"easeOutSine"});
						Tweener.addTween(maskWindow2, {y:400, time:0.6, transition:"easeOutSine"});
					}
					if (next=="myLoadedClipSaira") {
						Tweener.addTween(myLoadedClipSaira, {y:400, time:0.6, transition:"easeOutSine"});
						Tweener.addTween(myLoadedClipSaira, {alpha:1, time:0.3, delay:0.3, transition:"easeOutSine"});
						Tweener.addTween(maskWindow3, {y:400, time:0.6, transition:"easeOutSine"});
					}
					
					if (next=="myLoadedClipDanny") {
						Tweener.addTween(myLoadedClipDanny, {y:400, time:0.6, transition:"easeOutSine"});
						Tweener.addTween(myLoadedClipDanny, {alpha:1, time:0.3, delay:0.3, transition:"easeOutSine"});
						Tweener.addTween(maskWindow4, {y:400, time:0.6, transition:"easeOutSine"});
					}
					
					
									
					
					currentPageSwf=next;
									
									
			}

Open in new window

Maybe upload a zip of the project so I can reproduce it here.
Avatar of Alex500

ASKER

Cool its in there. the file you want to open is goodtimes as3
Avatar of Alex500

ASKER

you can download here

alexandervince.com/GoodTimesAS3copy.zip


for some reason it would not let me attach the site here
What do I need to do in order to reproduce the problem?
Avatar of Alex500

ASKER

load the swf and then go on the logo to go inside, then when inside click the left arrow. on that page there should be some thumbnails of different people on the far left if you click some of those, two of them are active you should get the error
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Alex500

ASKER

Great Help, cheers!