dcsimg
A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: swf crashes IE on 32 bit systems

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Posts
    4

    swf crashes IE on 32 bit systems

    i hate internet explorer
    i just finished a huge project with 100 fla's and THEN i checked to see weather it worked on all browsers on 32 bit systems
    turns out it doesnt work on any version of internet explorer on a 32 bit machine, but works just fine on the 32 bit version of IE on windows 7 64

    theres got to be some element in my fla on the stage that is crashing IE
    on one computer it doesnt crash, it just flips through the frames and doesnt spawn the menucaller instances on the stage, so its probably something in menucaller.as

    menucaller.as
    Code:
    package
    {
    	
    	//import url classes in begining of package
    	import flash.display.Stage;
    	import flash.display.StageDisplayState;
    	import flash.display.MovieClip;
    	import flash.events.MouseEvent;
    	import flash.events.*;
    	import flash.utils.Timer;
    	import com.greensock.*;
    	
    	public class menucaller extends MovieClip
    	{
    				
    		//menu items created once and added/removed to the stage as needed
    		var tigr:mysqlurl = new(mysqlurl);
    		var mips:mysqlurl = new(mysqlurl);
    		var orygenes:mysqlurl = new(mysqlurl);
    		var gramene:mysqlurl = new(mysqlurl);
    		
    		//bools to see if the mouse is in a place that should keep the menu up
    		var tigr_on:Boolean = new Boolean(false);
    		var mips_on:Boolean = new Boolean(false);
    		var orygenes_on:Boolean = new Boolean(false);
    		var gramene_on:Boolean = new Boolean(false);
    		/*
    		var tigr.text_txt:textField = new(textField);
    		var mips.text_txt:textField = new(textField);
    		var orygenes.text_txt:textField = new(textField);
    		var gramene.text_txt:textField = new(textField);
    		*/
    		var text_txt_on:Boolean = new Boolean(false);
    		var offclicker_mc_on:Boolean = new Boolean(false);
    		var menuUp:Boolean = new Boolean(false);
    		var stageWidth;
    		var stageHeight;
    		
    		// few miliseconds wait before checking mouse position to remove menu
    		var removeMenuTimer:Timer = new Timer(30, 1);		
    		var tweenOffTimer:Timer = new Timer(350, 1);		
    
    		//constructor
    		public function menucaller()
    		{
    			
    			stageWidth=650//stage.width;
    			stageHeight=550//stage.height;
    
    			//menu items text set
    			tigr.site_txt.text = "TIGR";
    			mips.site_txt.text = "MIPS";
    			orygenes.site_txt.text = "ORYGENES";
    			gramene.site_txt.text = "GRAMENE";
    			
    			//menu times names set for remove child by name
    			tigr.name="tigr";
    			mips.name="mips";
    			orygenes.name="orygenes";
    			gramene.name="gramene";
    			
    			//mouse overs that create menu or keep it up
    			tigr.addEventListener(MouseEvent.MOUSE_OVER, tigr_overHandler);
    			mips.addEventListener(MouseEvent.MOUSE_OVER, mips_overHandler);
    			orygenes.addEventListener(MouseEvent.MOUSE_OVER, orygenes_overHandler);
    			gramene.addEventListener(MouseEvent.MOUSE_OVER, gramene_overHandler);
    			text_txt.addEventListener(MouseEvent.MOUSE_OVER, text_txt_overHandler);
    			offclicker_mc.addEventListener(MouseEvent.MOUSE_OVER, offclicker_mc_overHandler);
    			
    			addEventListener(MouseEvent.MOUSE_OVER, self_overHandler);
    			//addEventListener(Event.EXIT_FRAME,onExit);
    
    			//mouse outs that decide weather to remove menu
    			tigr.addEventListener(MouseEvent.MOUSE_OUT, tigr_outHandler);
    			mips.addEventListener(MouseEvent.MOUSE_OUT, mips_outHandler);
    			orygenes.addEventListener(MouseEvent.MOUSE_OUT, orygenes_outHandler);
    			gramene.addEventListener(MouseEvent.MOUSE_OUT, gramene_outHandler);
    			text_txt.addEventListener(MouseEvent.MOUSE_OUT, text_txt_outHandler);
    			offclicker_mc.addEventListener(MouseEvent.MOUSE_OUT, offclicker_mc_outHandler);
    
    			// few miliseconds wait before checking mouse position to remove menu
    			removeMenuTimer.addEventListener(TimerEvent.TIMER, removeMenuTimerEnd);
    			tweenOffTimer.addEventListener(TimerEvent.TIMER, tweenOffTimerEnd);
    
    		}
    		
    		/*
    		function onExit(event:Event) 
    		{
    			this.parent.removeChild(this);
    		}
    		*/
    		//mouse overs that create menu or keep it up
    		private function tigr_overHandler(event:MouseEvent):void
    		{
    			tigr_on=true;
    			return;
    		}
    		private function mips_overHandler(event:MouseEvent):void
    		{
    			mips_on=true;
    			return;
    		}
    		private function orygenes_overHandler(event:MouseEvent):void
    		{
    			orygenes_on=true;
    			return;
    		}
    		private function gramene_overHandler(event:MouseEvent):void
    		{
    			gramene_on=true;
    			return;
    		}
    		private function offclicker_mc_overHandler(event:MouseEvent):void
    		{
    			offclicker_mc_on=true;
    			return;
    		}
    		private function self_overHandler(event:MouseEvent):void
    		{
    			//event.currentTarget.parent.addChild(event.currentTarget);
    			event.currentTarget.parent.setChildIndex(MovieClip(event.currentTarget), (event.currentTarget.parent.numChildren - 1));
    			//event.currentTarget.parent.swapChildren(event.currentTarget.name, event.currentTarget.parent.getChildAt(event.currentTarget.parent.numChildren - 1).name);
    			return;
    		}
    		private function text_txt_overHandler(event:MouseEvent):void
    		{
    			//this.parent.parent.setChildIndex(MovieClip(evt.target.parent), (this.parent.parent.numChildren - 1));
    			//event.currentTarget.parent.swapChildren(event.currentTarget.parent.name, event.currentTarget.parent.parent.getChildAt(event.currentTarget.parent.parent.numChildren - 1).name);
    			text_txt_on=true;
    			if(!menuUp)
    			{
    				menuUp=true;
    				addChild(tigr);
    				tigr.x=this.mouseX;
    				tigr.y=this.mouseY+tigr.height*0+550;
    				addChild(mips);
    				mips.x=this.mouseX;
    				mips.y=this.mouseY+mips.height*5+550;
    				addChild(orygenes);
    				orygenes.x=this.mouseX;
    				orygenes.y=this.mouseY+orygenes.height*10+550;
    				addChild(gramene);
    				gramene.x=this.mouseX;
    				gramene.y=this.mouseY+gramene.height*15+550;
    				if((stageHeight-4*tigr.height)>(parent.mouseY))
    				{
    					if((stageWidth-tigr.width)>(parent.mouseX))
    					{
    						//tween menu to mouse position
    						//trace: trace(x,y,stageWidth, stageHeight , parent.mouseX , parent.mouseY)
    						TweenLite.to(tigr, .35, {y:this.mouseY+tigr.height*0});
    						TweenLite.to(mips, .35, {y:this.mouseY+mips.height*1});
    						TweenLite.to(orygenes, .35, {y:this.mouseY+orygenes.height*2});
    						TweenLite.to(gramene, .35, {y:this.mouseY+gramene.height*3});
    					}
    					else
    					{
    						//tween menu to stageWidth-tigr.width mouseY
    						TweenLite.to(tigr, .35, {x:(stageWidth-tigr.width-x), y:this.mouseY+tigr.height*0});
    						TweenLite.to(mips, .35, {x:(stageWidth-tigr.width-x), y:this.mouseY+mips.height*1});
    						TweenLite.to(orygenes, .35, {x:(stageWidth-tigr.width-x), y:this.mouseY+orygenes.height*2});
    						TweenLite.to(gramene, .35, {x:(stageWidth-tigr.width-x), y:this.mouseY+gramene.height*3});
    
    					}
    				}
    				else
    				{
    					if((stageWidth-tigr.width)>(parent.mouseX))
    					{
    						//tween menu to mouseX stageHeight-4*tigr.height
    						TweenLite.to(tigr, .35, {x:this.mouseX, y:(stageHeight-4*tigr.height-y)});
    						TweenLite.to(mips, .35, {x:this.mouseX, y:(stageHeight-3*tigr.height-y)});
    						TweenLite.to(orygenes, .35, {x:this.mouseX, y:(stageHeight-2*tigr.height-y)});
    						TweenLite.to(gramene, .35, {x:this.mouseX, y:(stageHeight-1*tigr.height-y)});
    					}
    					else
    					{
    						//tween menu to stageWidth-tigr.width 4*tigr.height
    						TweenLite.to(tigr, .35, {x:(stageWidth-tigr.width-x), y:(stageHeight-4*tigr.height-y)});
    						TweenLite.to(mips, .35, {x:(stageWidth-tigr.width-x), y:(stageHeight-3*tigr.height-y)});
    						TweenLite.to(orygenes, .35, {x:(stageWidth-tigr.width-x), y:(stageHeight-2*tigr.height-y)});
    						TweenLite.to(gramene, .35, {x:(stageWidth-tigr.width-x), y:(stageHeight-1*tigr.height-y)});
    
    					}
    				}
    			}
    			return;
    		}
    		
    		//mouse outs that decide weather to remove menu
    		private function tigr_outHandler(event:MouseEvent):void
    		{
    			tigr_on=false;
    			removeMenuTimer.start();
    			return;
    		}
    		private function mips_outHandler(event:MouseEvent):void
    		{
    			mips_on=false;
    			removeMenuTimer.start();
    			return;
    		}
    		private function orygenes_outHandler(event:MouseEvent):void
    		{
    			orygenes_on=false;
    			removeMenuTimer.start();
    			return;
    		}
    		private function gramene_outHandler(event:MouseEvent):void
    		{
    			gramene_on=false;
    			removeMenuTimer.start();
    			return;
    		}
    		private function offclicker_mc_outHandler(event:MouseEvent):void
    		{
    			offclicker_mc_on=false;
    			removeMenuTimer.start();
    			return;
    		}
    		private function text_txt_outHandler(event:MouseEvent):void
    		{
    			text_txt_on=false;
    			removeMenuTimer.start();
    			return;
    		} 
    		
    		//called at the end of miliseconds timer 
    		private function removeMenu():void
    		{
    			if(menuUp)
    			{
    				TweenLite.to(tigr, .35, {y:tigr.y+tigr.height*0+550});
    				TweenLite.to(mips, .35, {y:mips.y+mips.height*1+550});
    				TweenLite.to(orygenes, .35, {y:orygenes.y+orygenes.height*2+550});
    				TweenLite.to(gramene, .35, {y:gramene.y+gramene.height*3+550});
    				tweenOffTimer.start();
    			}
    			return;
    		}
    		function tweenOffTimerEnd(event:TimerEvent):void 
    		{
    			removeChild(getChildByName("tigr"));
    			removeChild(getChildByName("mips"));
    			removeChild(getChildByName("orygenes"));
    			removeChild(getChildByName("gramene"));
    			menuUp=false;
    			return;
    		}
    		function removeMenuTimerEnd(event:TimerEvent):void 
    		{
    			if((!offclicker_mc_on)&&(!text_txt_on)&&(!tigr_on)&&(!mips_on)&&(!orygenes_on)&&(!gramene_on))
    			{	
    				//remove comment mark to debug
    				//trace("offclicker_mc_on "+offclicker_mc_on+"\ntext_txt_on "+text_txt_on+"\ntigr_on "+tigr_on+"\nmips_on "+mips_on+"\norygenes_on "+orygenes_on+"\ngramene_on "+gramene_on);
    				removeMenu();
    			}
    			return;
    		}
    	}
    }
    Last edited by chopficaro2; 11-30-2011 at 03:09 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center