// import classes import flash.external.*; import mx.transitions.*; // attach movie clips and place on stage _root.attachMovie("map_off", "map", 1, {_x:76.0, _y:13.4}); _root.attachMovie("washington_mc", "wa", 2, {_x:25, _y:0}); _root.attachMovie("oregon_mc", "ore", 3, {_x:6, _y:36}); _root.attachMovie("california_mc", "ca", 4, {_x:.7, _y:91.5}); _root.attachMovie("nevada_mc", "nv", 5, {_x:39, _y:101.5}); _root.attachMovie("utah_mc", "ut", 6, {_x:96.3, _y:112.7}); _root.attachMovie("colorado_mc", "co", 7, {_x:149.9, _y:134.2}); _root.attachMovie("texas_mc", "tx", 8, {_x:169.3, _y:202.2}); _root.attachMovie("minnesota_mc", "mn", 9, {_x:279.6, _y:26.6}); _root.attachMovie("missouri_mc", "mi", 10, {_x:294.1, _y:145.1}); _root.attachMovie("wisconsin_mc", "wi", 11, {_x:320.5, _y:56.7}); _root.attachMovie("tenn_mc", "tn", 13, {_x:357.1, _y:189.1}); _root.attachMovie("illinois_mc", "il", 14, {_x:338.9, _y:115.8}); _root.attachMovie("alabama_mc", "al", 15, {_x:380.2, _y:216.8}); _root.attachMovie("georgia_mc", "ga", 16, {_x:408.2, _y:213.3}); _root.attachMovie("florida_mc", "fl", 17, {_x:391.4, _y:267.9}); _root.attachMovie("northcarolina_mc", "nc", 18, {_x:422.4, _y:177.1}); _root.attachMovie("ny_mc", "ny", 19, {_x:454.1, _y:58.6}); _root.attachMovie("penn_mc", "pa", 20, {_x:448.1, _y:103.2}); _root.attachMovie("maryland_mc", "md", 21, {_x:464.1, _y:134.8}); _root.attachMovie("delaware_mc", "de", 22, {_x:502.3, _y:132.4}); _root.attachMovie("nh_mc", "nh", 23, {_x:523.6, _y:48.1}); _root.attachMovie("mass_mc", "ma", 24, {_x:516.7, _y:80}); _root.attachMovie("conn_mc", "ct", 25, {_x:517.5, _y:93.4}); _root.attachMovie("ohio_mc", "oh", 26, {_x:405.5, _y:113.8}); _root.attachMovie("nj", "nj", 27, {_x:504.5, _y:109}); _root.attachMovie("rhodeisland_mc", "ri", 28, {_x:534.6, _y:92.8}); _root.attachMovie("michigan_mc", "mich", 29, {_x:344.1, _y:47.9}); // create button array, then loop through and assign onRollover and onRollout var buttonList:Array = new Array(wa, ore, ca, nv, ut, co, tx, mn, wi, tn, il, al, ga, fl, nc, ny, pa, md, de, nh, ct, oh, nj, oh, ri, ma, mich); for (var i:Number = 0; i < buttonList.length; i++) { var mcBtn:MovieClip = buttonList[i]; mcBtn.stop(); mcBtn.onRollOver = function():Void { this.gotoAndStop("onRollover"); new Tween(this, "_xscale", Regular.easeOut, this._xscale, 150, 0.3, true); new Tween(this, "_yscale", Regular.easeOut, this._yscale, 150, 0.3, true); this.swapDepths(500); }; mcBtn.onRollOut = function():Void { this.gotoAndStop("onRollout"); new Tween(this, "_xscale", Regular.easeOut, this._xscale, 100, 0.3, true); new Tween(this, "_yscale", Regular.easeOut, this._yscale, 100, 0.3, true); }; } // assign buttons to javascript functions in html form // washington wa.onRelease = function() { ExternalInterface.call("selectWashington"); }; // oregon ore.onRelease = function() { ExternalInterface.call("selectOregon"); }; // california ca.onRelease = function() { ExternalInterface.call("selectCalifornia"); }; // nevada nv.onRelease = function() { ExternalInterface.call("selectNevada"); }; // utah ut.onRelease = function() { ExternalInterface.call("selectUtah"); }; // colorado co.onRelease = function() { ExternalInterface.call("selectColorado"); }; // texas map.texas.onRelease = function() { ExternalInterface.call("selectTexas"); }; // minnesota map.minnesota.onRelease = function() { ExternalInterface.call("selectMinnesota"); }; // missouri map.missouri.onRelease = function() { ExternalInterface.call("selectMissouri"); }; // wisconsin map.wisconsin.onRelease = function() { ExternalInterface.call("selectWisconsin"); }; // illonois map.illinois.onRelease = function() { ExternalInterface.call("selectIllinois"); }; // tennessee map.tenn.onRelease = function() { ExternalInterface.call("selectIllinois"); }; // pennsylvania map.penn.onRelease = function() { ExternalInterface.call("selectIllinois"); }; // michigan map.michigan.onRelease = function() { ExternalInterface.call("selectIllinois"); }; // ohio map.ohio.onRelease = function() { ExternalInterface.call("selectIllinois"); }; // north carolina map.northcarolina.onRelease = function() { ExternalInterface.call("selectIllinois"); }; // alabama map.alabama.onRelease = function() { ExternalInterface.call("selectIllinois"); }; // georgia map.georgia.onRelease = function() { ExternalInterface.call("selectIllinois"); }; // florida map.florida.onRelease = function() { ExternalInterface.call("selectIllinois"); }; // maryland map.maryland.onRelease = function() { ExternalInterface.call("selectIllinois"); }; // delaware map.tenn.onRelease = function() { ExternalInterface.call("selectIllinois"); }; // newjersey nj.onRelease = function() { ExternalInterface.call("selectIllinois"); }; // connecticut ct.onRelease = function() { ExternalInterface.call("selectIllinois"); }; // rhodeisland ri.onRelease = function() { ExternalInterface.call("selectIllinois"); }; // new hampshire nh.onRelease = function() { ExternalInterface.call("selectIllinois"); }; // new york ny.onRelease = function() { ExternalInterface.call("selectIllinois"); }; // mass ma.onRelease = function() { ExternalInterface.call("selectIllinois"); };