Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 4th, 2013, 12:56 PM
bertdog911 bertdog911 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 2 bertdog911 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 35 m 10 sec
Reputation Power: 0
1151 conflict

I am creating a map shipwreck game where there are 600+ buttons on a map .They each when clicked pull data from an excel spreadsheet (xml) about ship .Right now i have one lake done.If you highlight a point there is a dynamic text box that displayed the name of the ship and if you click they are all displayed .It works on this frame.Well if i try to use the same code for the next frame it freaks out.maybe i should separate all the lakes into separate swfs and switch between them with buttons.Right now i have it set up to show all the great lakes and each lake is a button.each lake has its own frame and u select which one you want from the main screen.once in there is a back button that brings you back to frame one.

I need to figure what i am doing wrong.I am coding everything on the timeline if that matters? well here is my code.
Code:
stop(); var clipArray:Array = [s_1,s_2,s_3,s_4,s_5,s_6,s_7,s_8,s_9,s_10,s_11,s_12,s_13, s_14,s_15,s_16,s_17,s_18,s_19,s_20,s_21,s_22,s_23,s_24,s_25,s_26,s_27,s_28,s_29,s_30,s_31,s_32,s_33,  s_34,s_35,s_36,s_37,s_38,s_39,s_40,s_41,s_42,s_43,s_44,s_45, s_46,s_47,s_48,s_49,s_50,s_51,s_52,s_53,s_54,s_55,s_56,s_57,s_58,s_59,s_60,s_61,s_62,s_63,s_64,s_65,  s_66,s_67, s_68,s_69,s_70,s_71,s_72,s_73,s_74,s_75,s_76,s_77,s_78,s_79,s_80,s_81,s_82,s_83,s_84,s_85,s_86,s_87,  s_88,s_89,s_90,s_91,s_92,s_93,s_94,s_95,s_96,s_97,s_98,s_99,s_100,s_101,s_102,s_103,s_104,s_105,s_10  6,s_107,s_108,s_109,s_110,s_111,s_112,s_113,s_114,s_115,s_116,s_117,s_118,s_119,s_120,s_121,s_122,s_  123,s_124,s_125,s_126,s_127,s_128,s_129,s_130,s_131,s_132,s_133,s_134,s_135,s_136,s_137,s_138,s_139,  s_140,s_141,s_142,s_143,s_144,s_145,s_146,s_147,s_148,s_149,s_150,s_151,s_152,s_153,s_154,s_155,s_15  6,s_157,s_158,s_159,s_160,s_161,s_162,s_163,s_164,s_165,s_166,s_167,s_168,s_169,s_170,s_171,s_172,s_  173,s_174,s_175,s_176,s_177,s_178,s_179,s_180,s_181,s_182,s_183,s_184,s_185,s_186,s_187,s_188,s_189,  s_190,s_191,s_192,s_193,s_194,s_195,s_196,s_197,s_198,s_199,s_200,s_201,s_202,s_203,s_204,s_205,s_20  6,s_207,s_208,s_209,s_210,s_211,s_212,s_213,s_214,s_215,s_216,s_217,s_218,s_219,s_220,s_221,s_222,s_  223,s_224,s_225,s_226,s_227,s_228,s_229,s_230,s_231,s_232,s_233,s_234,s_235,s_236,s_237,s_238,s_239,  s_240,s_241,s_242,s_243,s_244,s_245,s_246,s_247,s_248,s_249,s_250,s_251,s_252,s_253,s_254,s_255,s_25  6,s_257,s_258,s_259,s_260,s_261,s_262,s_263,s_264,s_265,s_266,s_267,s_268,s_269,s_270,s_271,s_272,s_  273,s_274,s_275,s_276,s_277,s_278,s_279,s_280,s_281,s_282,s_283,s_284,s_285,s_286,s_287,s_288,s_289,  s_290,s_291,s_292,s_293,s_294,s_295,s_296,s_297,s_298,s_299,s_300,s_301,s_302,s_303,s_304,s_305,s_30  6,s_307,s_308,s_309,s_310,s_311,s_312,s_313,s_314,s_315,s_316,s_317,s_318,s_319,s_320,s_321,s_322,s_  323,s_324,s_325,s_326,s_327,s_328,s_329,s_330,s_331,s_332,s_333,s_334,s_335,s_336,s_337,s_338,s_339,  s_340,s_341,s_342,s_343,s_344,s_345,s_346,s_347,s_348,s_349,s_350,s_351,s_352,s_353,s_354,s_355,s_35  6,s_357,s_358,s_359,s_360,s_361,s_362,s_363,s_364,s_365,s_366,s_367,s_368,s_369,s_370,s_371,s_372,s_  373,s_374,s_375,s_376,s_377,s_378,s_379,s_380,s_381,s_382,s_383,s_384,s_385,s_386,s_387,s_388,s_389,  s_390,s_391,s_392,s_393,s_394,s_395,s_396,s_397,s_398,s_399,s_400,s_401,s_402,s_403,s_404,s_405,s_40  6,s_407,s_408,s_409,s_410,s_411,s_412,s_413,s_414,s_415,s_416,s_417,s_418,s_419,s_420,s_421,s_422,s_  423,s_424,s_425,s_426,s_427,s_428,s_429,s_430,s_431,s_432,s_433,s_434,s_435,s_436,s_437,s_438,s_439,  s_440,s_441,s_442,s_443,s_444,s_445,s_446,s_447,s_448,s_449,s_450,s_451,s_452,s_453,s_454,s_455,s_45  6,s_457,s_458,s_459,s_460,s_461,s_462,s_463,s_464,s_465,s_466,s_467,s_468,s_469,s_470,s_471,s_472,s_  473,s_474,s_475,s_476,s_477,s_478,s_479, s_480,s_481,s_482,s_483,s_484,s_485,s_486,s_487,s_488,s_489,s_490,s_491,s_492,s_493,s_494,s_495,s_49  6,s_497,s_498,s_499,s_500,s_501,s_502,s_503,s_504, s_505,s_506,s_507,s_508,s_509,s_510,s_511,s_512,s_513,s_514,s_515,s_516,s_517,s_518,s_519,s_520,s_52  1,s_522,s_523,s_524,s_525,s_526,s_527,s_528,s_529,s_530,s_531,s_532,s_533,s_534,s_535,s_536,s_537,s_  538,s_539,s_540,s_541,s_542,s_543,s_544,s_545,s_546,s_547,s_548,s_549,s_550,s_551,s_552,s_553,s_554,  s_555,s_556,s_557,s_558,s_559,s_560,s_561,s_562,s_563,s_564,s_565,s_566,s_567,s_568,s_569,s_570,s_57  1,s_572,s_573,s_574,s_575,s_576,s_577,s_578,s_579,s_580,s_581,s_582,s_583,s_584,s_585,s_586,s_587,s_  588,s_589,s_590,s_591,s_592,s_593,s_594,s_595,s_596,s_597,s_598,s_599,s_600,s_601,s_602,s_603,s_604,  s_605,s_606,s_607,s_608,s_609,s_610,s_611,s_612,s_613,s_614,s_615,s_616,s_617,s_618,s_619,s_620,s_62  1,s_622,s_623,s_624,s_625,s_626,s_627,s_628,s_629,s_630,s_631,s_632,s_633,s_634,s_635,s_636,s_637,s_  638,s_639,s_640,s_641,s_642,s_643,s_644,s_645,s_646,s_647,s_648,s_649,s_650,s_651,s_652,s_653,s_654,  s_655,s_656,s_657,s_658,s_659,s_660,s_661,s_662,s_663,s_664,s_665,s_666,s_667,s_668,s_669,s_670,s_67  1,s_672,s_673,s_674,s_675,s_676,s_677,s_678,s_679,s_680,s_681,s_682,s_683,s_684,s_685,s_686,s_687,s_  688,s_689,s_690,s_691,s_692,s_693,s_694,s_695,s_696,s_697,s_698,s_699,s_700]; 

stop(); 
var xml:XML;
 var urlLoader = new URLLoader(); urlLoader.addEventListener(Event.COMPLETE,onXMLLoaded); 

urlLoader.load(new  URLRequest("Superior.xml")); 

stage.addEventListener(MouseEvent.MOUSE_MOVE,followBall); 

 function followBall(event:MouseEvent):void { 

text_field_10.x=mouseX; text_field_10.y=mouseY; } 

function onXMLLoaded(e:Event):void{        xml =  new XML(e.target.data);  	  	for (var i:int = 0; i < clipArray.length; i++) { 	clipArray[i].buttonMode = true; 	clipArray[i].addEventListener(MouseEvent.CLICK, clickHandler); 	clipArray[i].addEventListener(MouseEvent.ROLL_OVER, hover ); 	clipArray[i].addEventListener(MouseEvent.ROLL_OUT, nohover); 	} 	function clickHandler(event:MouseEvent):void { 	for (var i:int = 0; i < clipArray.length; i++) { 		if (event.currentTarget == clipArray[i]) { 			text_field_1.text = xml..ship.Vessel_Name.text()[i];  			 text_field_2.text = xml..ship.Built_in.text()[i];  			 text_field_3.text = xml..ship.Type_of_ship.text()[i];  			 text_field_4.text = xml..ship.Date_of_Loss.text()[i];  			 text_field_5.text = xml..ship.Type_of_loss.text()[i]; 			 text_field_6.text = xml..ship.Cargo.text()[i];  			 text_field_7.text = xml..ship.Loss_of_Life.text()[i];; 		} 	} } 	function hover(event:MouseEvent):void { 	for (var i:int = 0; i < clipArray.length; i++) { 		if (event.currentTarget == clipArray[i]) { 			text_field_10.text ="  " + xml..ship.Vessel_Name.text()[i]; 		} 	} } 	function nohover(event:MouseEvent):void { 	for (var i:int = 0; i < clipArray.length; i++) { 		if (event.currentTarget == clipArray[i]) { 			text_field_10.text = " "; 		} 	} } } backbut.addEventListener(MouseEvent.CLICK, gotoFrame1);   function gotoFrame1(event:MouseEvent):void {   gotoAndStop(1); }

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > 1151 conflict

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap