Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 05-18-2012, 10:56 PM   #1
aolba
Member
 
Join Date: Sep 2002
Posts: 78
Default After reload a swf I get TypeError: Error #1034: Type Coercion failed

I have a game in a swf. everything works fine the first time it loads... but if I unload and reload the swf. I get this:

Code:
TypeError: Error #1034: Type Coercion failed: cannot convert com.client.games.shootGame.rowManager::Cell@3d3b5ca1 to com.client.games.shootGame.rowManager.Cell.
I track the code to the breaking point:
Code:
private function _createGrid():void {
	
				
	for (var i:uint = 0; i < _cellsTall; i++) {	
		var _row:Vector.<Cell>;
		_row = new Vector.<Cell>;				
		for (var j:uint = 0; j < _cellsWide; j++) {					
			thisCell = new Cell(new Cell_display() as MovieClip, _cellWidth, _cellHeight);					
			_row.push( thisCell );
		}
		pushRow(_row);
	}
	dispatchEvent(new RowManagerEvent(RowManagerEvent.UPDATED_DIMENSIONS));
}
if I understand the error it says that the var " thisCell " is not an apropiated kind to insert inside the vector array " _row ". Is so weird...the var is the right kind... but this beat me today.

I hope someone has and idea or have this issue before.
aolba is offline   Reply With Quote
Old 05-19-2012, 01:52 AM   #2
ASWC
Super Moderator
 
ASWC's Avatar
 
Join Date: Dec 2007
Location: Greenville, SC
Posts: 6,528
Default

Has to do with ApllicationDomain. Your main app already has a loaded definition for that class and will not accept the enforcement of a new one unless you apply the proper ApplicationDomain (thus enforcing that the first definition is kept).
__________________
aswebcreations
Super Duper!
ASWC is offline   Reply With Quote
Old 05-21-2012, 12:14 AM   #3
aolba
Member
 
Join Date: Sep 2002
Posts: 78
Default

I will take a look to that idea. Thanks.
aolba is offline   Reply With Quote
Old 05-21-2012, 04:38 PM   #4
aolba
Member
 
Join Date: Sep 2002
Posts: 78
Default

Thanks. It seems like the problem was related to that subject. It was resolved online, but when I preview the file in the Flash IDE...I get the error.
aolba is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:42 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.