Frame 1
_global.debug = true;
if (_global.debug) {
var raceData = "DDORTaV88A8B8D8F80929a49a596979a8999b89b7989792998M5727475737F6B696A6a867686E667JIH77ILaJaLK67F6964656A6E61707a1747G6747a77KMKG47371707E6A68676A6173727a3767G6707A67646362666768696A6F657IKJaIJLaOQPMLOA849D90AE9895989C93A7Aa3AF9b1A0AF90A1A2A5Aa4A2A1A2A3A4A3Aa0AE9C9B95909UOJ5717C6A6867656468627HLJHINSRM7727C6A696F6374727F6C6B6A6D6074767G77a67b5727D6965636a6696B6C6D617a07D6A66606F5a3676B6F61747JOTSOLaQ88E80919294989B9E9aD9E9F92A3A6A5A4A2Ab3Ad4A2A3Af2A1AD979F8TLJI57E69656463616F5067637KNKJMQSMH17A636164686B6aA6aD627HKaJLJ57E6561636A6D6E6aC6D607E6b07aE6964616a568696A6B6D60767HJNRVUTOaR982979D90AE9C9B9D9F92A3Aa4A5A4A3A1AF91AaF9D98959/ZBAD7ObNObPObPObMLaNPQRT88A8B8A8aC82989A9792909D8aC8A8aD8F8497999A9B9a79b99B9D9E9aF9aD9B949C8QI67GH6717C686b663616a26a36a4676A6F677PA8E8aD8E83999B9D9C9B9A97909VQOMK47F6B6A6B6A65626E5C5aF5a06F5E5a0656C6GR98RJGHLQRUSOG27aIQRPNLKbMOQUB809294989B9E9D9C9896929a397989C9F94Aa1AD9C9E91A2A3A4A3A1A99E8SH573757GIH47E686664656a46a1606a164686E647LTB8D8F81979A9C9D9E9B94998PH5717E6D6A686a664626E5B5C5D5163626a46A60767HJMLKaMaOPONaOQRQPMLKMNORT88B82979B9D9B9A989a49F8B8C8D8092969E92AaE9B9A9E91A3A4Aa3AF96988N7767a5707863626b16E5C5B5E566F6HMNORUC8E809295999B9A959F8ULGHG57F6A67656a465646b3626F5E5F52666C647HJILNQTaNI473777MQSRaPa/ADOePOcNOMKNOTROSa88UPOPU3979694988PB8A8bSIGaIL4707IPaKG77RTMKTD819a2919aE8RSB8F8D898OISUZ0AE7PZ261877GOGJG07F6B6aF6JLH6757JUB8a88UE8F888aSC859F819E8PZB9E7OZ3618QPZA9E7SRKZF518MZ2AE73949b39A87747KNVUSaI670757QF8E8NHNaOPQbT88A898TRE8a39C89819D8B8TLKaJ27D677OSOH77aSB8C8E819598969F8PIbVA8F888A8TPQNOQMN67H37076707C617IH5727KST88C809aC8b19C898F8E8Z4AE798J47ZF518RZ3AE798B8PMSVD82988Ta88NIPQORPJNOaSOMaJLQSPQTQ88TF8a2959D8UaE819F8A8OKaH47C6A667RaL6777RA8D8a094939F8D888SU98F819B8ZD9E7NPNZ361837E6C65747GIa77071757PQJKM9809a2939VOTD8C8B8b88Z99E7U88UJIGZ5618Z2AE7B8E8C8E8F8UPS88RUaI674737R88VUQPNbO/5AOaPRTVA8B8D8E80919293949596979a89a99bA9aB9aA9a997949E8UK57F6B6765646567696a86a96C6074777ILNPaRPaK77F676160616265696E62767GJLNOPOMKI5717D6764626164676A6E63767HIHG27C64606C5b16860757ILNPQRbSRQPQaUE8893A8Aa4AD9B9D9F93Aa2A0Aa2A4A3A0AF90A2A4Ab3Aa2A4A3A4A3A2A0AD969F8TJ17861606a3676a86aB6F64777KNRUaTSMG17D6B6bA686968696B6C6E6174777HIKJI7727B636C575aA5F566D62777HJ770786F595559546E677LRV88aVUaVa98C8F82979C91A6A7A6A3A1AF9a1A3A4A3Ao4A3Aa0AB919UJ37B646F5B5aE52666a5676B61777JORUbRK0756E5D5A5B5E52676E667JOQRaQM67A626F5E5F5365686C607274767a57470786069575A5D536B647IOQTU8898aVaUa88B849D94A8Aa6A4A3A1AF9C9D90A4A7A5A1AC98959/Z9AD7OfPObPOaPObNdOaRSU88A8C8F84989E90AF9D99949F8B898VbA8F83989C9D9E9bD9E9D9dC99939B8PH37E6A6763626a3626f16263676B637N982979B9C9E9F9E9D9B9aC9A95909A8QJ37D67606C5D5F5062606F5D5E5aF5b1636a9637JQRQRTU88V88TRMH77aGaIaKaMaNPSVA80959A90A4A9Aa7A2AB96929E8C8aE859E95A7Aa4Aa3A1A0AC9994909C8VOIG4727a07aC696461606a162616a0616a368617K8829A9F91A2AD9896989B99949A8L27A6462616E5C5E50616aE5D5E5D5F5a163676D647IMPRSTUbTRQPOaNaMaLaMLNPRVC839D94AAAa7A3AD959E898USaUC8691A8A9A8A3A2A1AE9C9D9E9F989C8O7707C6A656F5A585A5C506364636162676E667KSC8497999a89A9B9aA98959D8RJ47F6A6665636b463626E5aF5E506b163676D637HMQU98A8a88SOJIJaKa";
var raceTime = 6380;
gameData = "<gamedata duration=\"300\" randomseed=\"1981876811\"> <tracks> <track id=\"1\" maxtime=\"300\" ghosttime=\"6380\">DDORTaV88A8B8D8F80929a49a596979a8999b89b7989792998M5727475737F6B696A6a867686E667JIH77ILaJaLK67F6964656A6E61707a1747G6747a77KMKG47371707E6A68676A6173727a3767G6707A67646362666768696A6F657IKJaIJLaOQPMLOA849D90AE9895989C93A7Aa3AF9b1A0AF90A1A2A5Aa4A2A1A2A3A4A3Aa0AE9C9B95909UOJ5717C6A6867656468627HLJHINSRM7727C6A696F6374727F6C6B6A6D6074767G77a67b5727D6965636a6696B6C6D617a07D6A66606F5a3676B6F61747JOTSOLaQ88E80919294989B9E9aD9E9F92A3A6A5A4A2Ab3Ad4A2A3Af2A1AD979F8TLJI57E69656463616F5067637KNKJMQSMH17A636164686B6aA6aD627HKaJLJ57E6561636A6D6E6aC6D607E6b07aE6964616a568696A6B6D60767HJNRVUTOaR982979D90AE9C9B9D9F92A3Aa4A5A4A3A1AF91AaF9D98959/ZBAD7ObNObPObPObMLaNPQRT88A8B8A8aC82989A9792909D8aC8A8aD8F8497999A9B9a79b99B9D9E9aF9aD9B949C8QI67GH6717C686b663616a26a36a4676A6F677PA8E8aD8E83999B9D9C9B9A97909VQOMK47F6B6A6B6A65626E5C5aF5a06F5E5a0656C6GR98RJGHLQRUSOG27aIQRPNLKbMOQUB809294989B9E9D9C9896929a397989C9F94Aa1AD9C9E91A2A3A4A3A1A99E8SH573757GIH47E686664656a46a1606a164686E647LTB8D8F81979A9C9D9E9B94998PH5717E6D6A686a664626E5B5C5D5163626a46A60767HJMLKaMaOPONaOQRQPMLKMNORT88B82979B9D9B9A989a49F8B8C8D8092969E92AaE9B9A9E91A3A4Aa3AF96988N7767a5707863626b16E5C5B5E566F6HMNORUC8E809295999B9A959F8ULGHG57F6A67656a465646b3626F5E5F52666C647HJILNQTaNI473777MQSRaPa/ADOePOcNOMKNOTROSa88UPOPU3979694988PB8A8bSIGaIL4707IPaKG77RTMKTD819a2919aE8RSB8F8D898OISUZ0AE7PZ261877GOGJG07F6B6aF6JLH6757JUB8a88UE8F888aSC859F819E8PZB9E7OZ3618QPZA9E7SRKZF518MZ2AE73949b39A87747KNVUSaI670757QF8E8NHNaOPQbT88A898TRE8a39C89819D8B8TLKaJ27D677OSOH77aSB8C8E819598969F8PIbVA8F888A8TPQNOQMN67H37076707C617IH5727KST88C809aC8b19C898F8E8Z4AE798J47ZF518RZ3AE798B8PMSVD82988Ta88NIPQORPJNOaSOMaJLQSPQTQ88TF8a2959D8UaE819F8A8OKaH47C6A667RaL6777RA8D8a094939F8D888SU98F819B8ZD9E7NPNZ361837E6C65747GIa77071757PQJKM9809a2939VOTD8C8B8b88Z99E7U88UJIGZ5618Z2AE7B8E8C8E8F8UPS88RUaI674737R88VUQPNbO/5AOaPRTVA8B8D8E80919293949596979a89a99bA9aB9aA9a997949E8UK57F6B6765646567696a86a96C6074777ILNPaRPaK77F676160616265696E62767GJLNOPOMKI5717D6764626164676A6E63767HIHG27C64606C5b16860757ILNPQRbSRQPQaUE8893A8Aa4AD9B9D9F93Aa2A0Aa2A4A3A0AF90A2A4Ab3Aa2A4A3A4A3A2A0AD969F8TJ17861606a3676a86aB6F64777KNRUaTSMG17D6B6bA686968696B6C6E6174777HIKJI7727B636C575aA5F566D62777HJ770786F595559546E677LRV88aVUaVa98C8F82979C91A6A7A6A3A1AF9a1A3A4A3Ao4A3Aa0AB919UJ37B646F5B5aE52666a5676B61777JORUbRK0756E5D5A5B5E52676E667JOQRaQM67A626F5E5F5365686C607274767a57470786069575A5D536B647IOQTU8898aVaUa88B849D94A8Aa6A4A3A1AF9C9D90A4A7A5A1AC98959/Z9AD7OfPObPOaPObNdOaRSU88A8C8F84989E90AF9D99949F8B898VbA8F83989C9D9E9bD9E9D9dC99939B8PH37E6A6763626a3626f16263676B637N982979B9C9E9F9E9D9B9aC9A95909A8QJ37D67606C5D5F5062606F5D5E5aF5b1636a9637JQRQRTU88V88TRMH77aGaIaKaMaNPSVA80959A90A4A9Aa7A2AB96929E8C8aE859E95A7Aa4Aa3A1A0AC9994909C8VOIG4727a07aC696461606a162616a0616a368617K8829A9F91A2AD9896989B99949A8L27A6462616E5C5E50616aE5D5E5D5F5a163676D647IMPRSTUbTRQPOaNaMaLaMLNPRVC839D94AAAa7A3AD959E898USaUC8691A8A9A8A3A2A1AE9C9D9E9F989C8O7707C6A656F5A585A5C506364636162676E667KSC8497999a89A9B9aA98959D8RJ47F6A6665636b463626E5aF5E506b163676D637HMQU98A8a88SOJIJaKa</track> <track id=\"2\" maxtime=\"240\" ghosttime=\"6380\">DDORTaV88A8B8D8F80929a49a596979a8999b89b7989792998M5727475737F6B696A6a867686E667JIH77ILaJaLK67F6964656A6E61707a1747G6747a77KMKG47371707E6A68676A6173727a3767G6707A67646362666768696A6F657IKJaIJLaOQPMLOA849D90AE9895989C93A7Aa3AF9b1A0AF90A1A2A5Aa4A2A1A2A3A4A3Aa0AE9C9B95909UOJ5717C6A6867656468627HLJHINSRM7727C6A696F6374727F6C6B6A6D6074767G77a67b5727D6965636a6696B6C6D617a07D6A66606F5a3676B6F61747JOTSOLaQ88E80919294989B9E9aD9E9F92A3A6A5A4A2Ab3Ad4A2A3Af2A1AD979F8TLJI57E69656463616F5067637KNKJMQSMH17A636164686B6aA6aD627HKaJLJ57E6561636A6D6E6aC6D607E6b07aE6964616a568696A6B6D60767HJNRVUTOaR982979D90AE9C9B9D9F92A3Aa4A5A4A3A1AF91AaF9D98959/ZBAD7ObNObPObPObMLaNPQRT88A8B8A8aC82989A9792909D8aC8A8aD8F8497999A9B9a79b99B9D9E9aF9aD9B949C8QI67GH6717C686b663616a26a36a4676A6F677PA8E8aD8E83999B9D9C9B9A97909VQOMK47F6B6A6B6A65626E5C5aF5a06F5E5a0656C6GR98RJGHLQRUSOG27aIQRPNLKbMOQUB809294989B9E9D9C9896929a397989C9F94Aa1AD9C9E91A2A3A4A3A1A99E8SH573757GIH47E686664656a46a1606a164686E647LTB8D8F81979A9C9D9E9B94998PH5717E6D6A686a664626E5B5C5D5163626a46A60767HJMLKaMaOPONaOQRQPMLKMNORT88B82979B9D9B9A989a49F8B8C8D8092969E92AaE9B9A9E91A3A4Aa3AF96988N7767a5707863626b16E5C5B5E566F6HMNORUC8E809295999B9A959F8ULGHG57F6A67656a465646b3626F5E5F52666C647HJILNQTaNI473777MQSRaPa/ADOePOcNOMKNOTROSa88UPOPU3979694988PB8A8bSIGaIL4707IPaKG77RTMKTD819a2919aE8RSB8F8D898OISUZ0AE7PZ261877GOGJG07F6B6aF6JLH6757JUB8a88UE8F888aSC859F819E8PZB9E7OZ3618QPZA9E7SRKZF518MZ2AE73949b39A87747KNVUSaI670757QF8E8NHNaOPQbT88A898TRE8a39C89819D8B8TLKaJ27D677OSOH77aSB8C8E819598969F8PIbVA8F888A8TPQNOQMN67H37076707C617IH5727KST88C809aC8b19C898F8E8Z4AE798J47ZF518RZ3AE798B8PMSVD82988Ta88NIPQORPJNOaSOMaJLQSPQTQ88TF8a2959D8UaE819F8A8OKaH47C6A667RaL6777RA8D8a094939F8D888SU98F819B8ZD9E7NPNZ361837E6C65747GIa77071757PQJKM9809a2939VOTD8C8B8b88Z99E7U88UJIGZ5618Z2AE7B8E8C8E8F8UPS88RUaI674737R88VUQPNbO/5AOaPRTVA8B8D8E80919293949596979a89a99bA9aB9aA9a997949E8UK57F6B6765646567696a86a96C6074777ILNPaRPaK77F676160616265696E62767GJLNOPOMKI5717D6764626164676A6E63767HIHG27C64606C5b16860757ILNPQRbSRQPQaUE8893A8Aa4AD9B9D9F93Aa2A0Aa2A4A3A0AF90A2A4Ab3Aa2A4A3A4A3A2A0AD969F8TJ17861606a3676a86aB6F64777KNRUaTSMG17D6B6bA686968696B6C6E6174777HIKJI7727B636C575aA5F566D62777HJ770786F595559546E677LRV88aVUaVa98C8F82979C91A6A7A6A3A1AF9a1A3A4A3Ao4A3Aa0AB919UJ37B646F5B5aE52666a5676B61777JORUbRK0756E5D5A5B5E52676E667JOQRaQM67A626F5E5F5365686C607274767a57470786069575A5D536B647IOQTU8898aVaUa88B849D94A8Aa6A4A3A1AF9C9D90A4A7A5A1AC98959/Z9AD7OfPObPOaPObNdOaRSU88A8C8F84989E90AF9D99949F8B898VbA8F83989C9D9E9bD9E9D9dC99939B8PH37E6A6763626a3626f16263676B637N982979B9C9E9F9E9D9B9aC9A95909A8QJ37D67606C5D5F5062606F5D5E5aF5b1636a9637JQRQRTU88V88TRMH77aGaIaKaMaNPSVA80959A90A4A9Aa7A2AB96929E8C8aE859E95A7Aa4Aa3A1A0AC9994909C8VOIG4727a07aC696461606a162616a0616a368617K8829A9F91A2AD9896989B99949A8L27A6462616E5C5E50616aE5D5E5D5F5a163676D647IMPRSTUbTRQPOaNaMaLaMLNPRVC839D94AAAa7A3AD959E898USaUC8691A8A9A8A3A2A1AE9C9D9E9F989C8O7707C6A656F5A585A5C506364636162676E667KSC8497999a89A9B9aA98959D8RJ47F6A6665636b463626E5aF5E506b163676D637HMQU98A8a88SOJIJaKa</track> <track id=\"3\" maxtime=\"240\" ghosttime=\"6380\">DDORTaV88A8B8D8F80929a49a596979a8999b89b7989792998M5727475737F6B696A6a867686E667JIH77ILaJaLK67F6964656A6E61707a1747G6747a77KMKG47371707E6A68676A6173727a3767G6707A67646362666768696A6F657IKJaIJLaOQPMLOA849D90AE9895989C93A7Aa3AF9b1A0AF90A1A2A5Aa4A2A1A2A3A4A3Aa0AE9C9B95909UOJ5717C6A6867656468627HLJHINSRM7727C6A696F6374727F6C6B6A6D6074767G77a67b5727D6965636a6696B6C6D617a07D6A66606F5a3676B6F61747JOTSOLaQ88E80919294989B9E9aD9E9F92A3A6A5A4A2Ab3Ad4A2A3Af2A1AD979F8TLJI57E69656463616F5067637KNKJMQSMH17A636164686B6aA6aD627HKaJLJ57E6561636A6D6E6aC6D607E6b07aE6964616a568696A6B6D60767HJNRVUTOaR982979D90AE9C9B9D9F92A3Aa4A5A4A3A1AF91AaF9D98959/ZBAD7ObNObPObPObMLaNPQRT88A8B8A8aC82989A9792909D8aC8A8aD8F8497999A9B9a79b99B9D9E9aF9aD9B949C8QI67GH6717C686b663616a26a36a4676A6F677PA8E8aD8E83999B9D9C9B9A97909VQOMK47F6B6A6B6A65626E5C5aF5a06F5E5a0656C6GR98RJGHLQRUSOG27aIQRPNLKbMOQUB809294989B9E9D9C9896929a397989C9F94Aa1AD9C9E91A2A3A4A3A1A99E8SH573757GIH47E686664656a46a1606a164686E647LTB8D8F81979A9C9D9E9B94998PH5717E6D6A686a664626E5B5C5D5163626a46A60767HJMLKaMaOPONaOQRQPMLKMNORT88B82979B9D9B9A989a49F8B8C8D8092969E92AaE9B9A9E91A3A4Aa3AF96988N7767a5707863626b16E5C5B5E566F6HMNORUC8E809295999B9A959F8ULGHG57F6A67656a465646b3626F5E5F52666C647HJILNQTaNI473777MQSRaPa/ADOePOcNOMKNOTROSa88UPOPU3979694988PB8A8bSIGaIL4707IPaKG77RTMKTD819a2919aE8RSB8F8D898OISUZ0AE7PZ261877GOGJG07F6B6aF6JLH6757JUB8a88UE8F888aSC859F819E8PZB9E7OZ3618QPZA9E7SRKZF518MZ2AE73949b39A87747KNVUSaI670757QF8E8NHNaOPQbT88A898TRE8a39C89819D8B8TLKaJ27D677OSOH77aSB8C8E819598969F8PIbVA8F888A8TPQNOQMN67H37076707C617IH5727KST88C809aC8b19C898F8E8Z4AE798J47ZF518RZ3AE798B8PMSVD82988Ta88NIPQORPJNOaSOMaJLQSPQTQ88TF8a2959D8UaE819F8A8OKaH47C6A667RaL6777RA8D8a094939F8D888SU98F819B8ZD9E7NPNZ361837E6C65747GIa77071757PQJKM9809a2939VOTD8C8B8b88Z99E7U88UJIGZ5618Z2AE7B8E8C8E8F8UPS88RUaI674737R88VUQPNbO/5AOaPRTVA8B8D8E80919293949596979a89a99bA9aB9aA9a997949E8UK57F6B6765646567696a86a96C6074777ILNPaRPaK77F676160616265696E62767GJLNOPOMKI5717D6764626164676A6E63767HIHG27C64606C5b16860757ILNPQRbSRQPQaUE8893A8Aa4AD9B9D9F93Aa2A0Aa2A4A3A0AF90A2A4Ab3Aa2A4A3A4A3A2A0AD969F8TJ17861606a3676a86aB6F64777KNRUaTSMG17D6B6bA686968696B6C6E6174777HIKJI7727B636C575aA5F566D62777HJ770786F595559546E677LRV88aVUaVa98C8F82979C91A6A7A6A3A1AF9a1A3A4A3Ao4A3Aa0AB919UJ37B646F5B5aE52666a5676B61777JORUbRK0756E5D5A5B5E52676E667JOQRaQM67A626F5E5F5365686C607274767a57470786069575A5D536B647IOQTU8898aVaUa88B849D94A8Aa6A4A3A1AF9C9D90A4A7A5A1AC98959/Z9AD7OfPObPOaPObNdOaRSU88A8C8F84989E90AF9D99949F8B898VbA8F83989C9D9E9bD9E9D9dC99939B8PH37E6A6763626a3626f16263676B637N982979B9C9E9F9E9D9B9aC9A95909A8QJ37D67606C5D5F5062606F5D5E5aF5b1636a9637JQRQRTU88V88TRMH77aGaIaKaMaNPSVA80959A90A4A9Aa7A2AB96929E8C8aE859E95A7Aa4Aa3A1A0AC9994909C8VOIG4727a07aC696461606a162616a0616a368617K8829A9F91A2AD9896989B99949A8L27A6462616E5C5E50616aE5D5E5D5F5a163676D647IMPRSTUbTRQPOaNaMaLaMLNPRVC839D94AAAa7A3AD959E898USaUC8691A8A9A8A3A2A1AE9C9D9E9F989C8O7707C6A656F5A585A5C506364636162676E667KSC8497999a89A9B9aA98959D8RJ47F6A6665636b463626E5aF5E506b163676D637HMQU98A8a88SOJIJaKa</track> </tracks> <text id=\"trial_run_menu4\">back</text> <text id=\"track2\">track 2</text> <text id=\"start\">start</text> <text id=\"trial_run_info\">Pick a track to do a test run</text> <text id=\"qualify_time\">Qualifying time</text> <text id=\"time\">time</text> <text id=\"track3_time\">Track 3 time</text> <text id=\"race_instructions\">You will now race across all three tracks, 3 laps on each. Your aim is to set the best overall time to compete for the prize</text> <text id=\"handbreak\">Handbreak / Slide</text> <text id=\"did_not_qualify\">You did not qualify for the next race</text> <text id=\"race\">race</text> <text id=\"wait_for_high_score\">Wait for high score list...</text> <text id=\"trial_run_menu2\">track 2</text> <text id=\"did_qualify\">You have qualified for the next race</text> <text id=\"turn_right\">Turn right</text> <text id=\"finished\">finished</text> <text id=\"game_instructions_info\">Race Santa as fast as you can around the ice track. Hit the drop off points with your sled using a slide to drop off packets and increase the speed of your sled.</text> <text id=\"end_game\">end game</text> <text id=\"break\">Break / Reverse</text> <text id=\"total_time\">Total time</text> <text id=\"pick_game_mode_header\">pick game mode</text> <text id=\"track1\">track 1</text> <text id=\"track1_time\">Track 1 time</text> <text id=\"game_instructions_header\">game instructions</text> <text id=\"lap\">lap</text> <text id=\"pick_game_mode_menu3\">CONTROLS</text> <text id=\"sound\">sound</text> <text id=\"track3\">track 3</text> <text id=\"space_bar\">space bar</text> <text id=\"trial_run_menu1\">track 1</text> <text id=\"on\">on</text> <text id=\"trial_run_header\">trial run</text> <text id=\"gnomes\">Gnomes</text> <text id=\"pick_game_mode_info\">Choose a game mode to start playing</text> <text id=\"track2_time\">Track 2 time</text> <text id=\"pick_game_mode_menu2\">RACE - Race for the prizes</text> <text id=\"track\">track</text> <text id=\"trial_run_menu3\">track 3</text> <text id=\"game_instructions_controls\">controls</text> <text id=\"pick_game_mode_menu1\">TRIAL RUN - pick a track a practice</text> <text id=\"turn_left\">Turn left</text> <text id=\"off\">off</text> <text id=\"wait_for_next_track\">Please wait for next track</text></gamedata>";
}
_root.betweenRaceSplash._visible = false;
soundLabel.gotoAndStop(3);
_global.soundEnabled = true;
_root.gameView.setSound(_global.soundEnabled);
var inited = false;
onEnterFrame = function () {
if ((!inited) && (gameData != undefined)) {
gameView.parseGameData();
splash.popup.gotoAndPlay(2);
endGameLabel = _global.config.text.end_game.toUpperCase() + " X";
inited = true;
}
};
Instance of Symbol 121 MovieClip in Frame 1
on (press) {
_root.gameView.gameOver();
}
Instance of Symbol 136 MovieClip "soundLabel" in Frame 1
on (rollOver) {
gotoAndStop (2);
}
on (press) {
_global.soundEnabled = !_global.soundEnabled;
_root.gameView.setSound(_global.soundEnabled);
gotoAndStop((_global.soundEnabled ? 3 : 1));
}
on (rollOut) {
gotoAndStop((_global.soundEnabled ? 3 : 1));
}
Instance of Symbol 148 MovieClip in Frame 1
on (press) {
getURL ("http://www.midasplayer.com/", "_blank");
}
Symbol 31 MovieClip Frame 65
stop();
Symbol 31 MovieClip Frame 66
stop();
Symbol 53 MovieClip Frame 40
gotoAndPlay (11);
Symbol 56 MovieClip Frame 1
stop();
Symbol 56 MovieClip Frame 60
stop();
_visible = false;
Symbol 56 MovieClip Frame 100
stop();
Symbol 73 MovieClip [Reindeers] Frame 1
#initclip 20
Object.registerClass("Reindeers", Reindeers);
#endinitclip
Symbol 89 MovieClip [Sled] Frame 1
#initclip 15
Object.registerClass("Sled", Sled);
#endinitclip
Symbol 90 MovieClip [Map1] Frame 1
#initclip 16
Object.registerClass("Map1", Game);
#endinitclip
Symbol 102 MovieClip [Map3] Frame 1
#initclip 17
Object.registerClass("Map3", Game);
#endinitclip
Symbol 111 MovieClip [Map2] Frame 1
#initclip 18
Object.registerClass("Map2", Game);
#endinitclip
Symbol 113 MovieClip [GamePanel] Frame 1
#initclip 19
Object.registerClass("GamePanel", GamePanel);
#endinitclip
Symbol 126 MovieClip Frame 2
stop();
Symbol 130 MovieClip Frame 2
stop();
Symbol 130 MovieClip Frame 3
stop();
Symbol 144 Button
on (press) {
Constants.initReallyEasy();
_root.splash._visible = false;
_root.gameView.startGame();
}
Symbol 146 MovieClip Frame 1
stop();
Symbol 146 MovieClip Frame 59
instructionText.text = _global.config.text.game_instructions_header.toUpperCase() + "\r";
instructionText.text = instructionText.text + (_global.config.text.race_instructions + "\r");
instructionText.text = instructionText.text + (_global.config.text.game_instructions_info + "\r");
playButtonText.text = _global.config.text.race.toUpperCase();
stop();
Symbol 151 MovieClip Frame 30
infoText.text = _global.infoPopup_text;
infoNotice.text = _global.infoPopup_note;
stop();
Symbol 152 MovieClip [__Packages.Constants] Frame 0
class Constants
{
function Constants () {
}
static function initDefault() {
rotationFriction = 0.9;
rotSpeed = 0.6;
rotExtraSpeedHandbrake = 0.05;
rotExtraSpeed = 0.01;
acceleration = 0.08;
deceleration = 0.05;
handBrakeSpeed = 0.9;
handBrakeSlide = 0.85;
motionSpan = 0.15;
motionOffset = 0.81;
speedSpan = 0.06;
speedOffset = 0.92;
snowSpeedFriction = 0.96;
snowMotionFriction = 0.98;
}
static function initHighSkill() {
rotationFriction = 0.9;
rotSpeed = 0.5;
rotExtraSpeedHandbrake = 0.08;
rotExtraSpeed = 0.006;
acceleration = 0.08;
deceleration = 0.05;
handBrakeSpeed = 0.9;
handBrakeSlide = 0.85;
motionSpan = 0.08;
motionOffset = 0.91;
speedSpan = 0.06;
speedOffset = 0.92;
snowSpeedFriction = 0.96;
snowMotionFriction = 0.98;
}
static function initReallyEasy() {
rotationFriction = 0.8;
rotSpeed = 1.22;
rotExtraSpeedHandbrake = 0.03;
rotExtraSpeed = 0;
acceleration = 0.25;
deceleration = 0.2;
handBrakeSpeed = 0.98;
handBrakeSlide = 0.99;
motionSpan = 0;
motionOffset = 0.8;
speedSpan = 0;
speedOffset = 0.98;
snowSpeedFriction = 0.96;
snowMotionFriction = 0.98;
}
static var rotationFriction = 100.9;
static var rotSpeed = 0.6;
static var rotExtraSpeedHandbrake = 0.05;
static var rotExtraSpeed = 0.01;
static var acceleration = 0.08;
static var deceleration = 0.05;
static var handBrakeSpeed = 0.9;
static var handBrakeSlide = 0.85;
static var motionSpan = 0.15;
static var motionOffset = 0.81;
static var speedSpan = 0.06;
static var speedOffset = 0.92;
static var snowSpeedFriction = 0.96;
static var snowMotionFriction = 0.98;
}
Symbol 153 MovieClip [__Packages.Sled] Frame 0
class Sled extends MovieClip
{
function Sled () {
var _local1 = this;
super();
_local1.xPos = new timing.IFloat();
_local1.yPos = new timing.IFloat();
_local1.rotation = new timing.IRotFloat();
_local1.pos = new Vector2d(100, 100, 100);
_local1.motion = new Vector2d();
_local1.dirVec = new Vector2d();
}
function init(scale) {
var _local1 = this;
_local1.x = _local1._x * scale;
_local1.y = _local1._y * scale;
_local1.rot = _local1._rotation;
_local1.pos.reset(_local1.x, _local1.y);
_local1.xPos.set(_local1.x);
_local1.xPos.set(_local1.x);
_local1.yPos.set(_local1.y);
_local1.yPos.set(_local1.y);
_local1.rotation.set(_local1.rot);
_local1.rotation.set(_local1.rot);
}
function tick() {
var _local1 = this;
if (_local1.playerCar) {
_local1.rota = _local1.rota * Constants.rotationFriction;
if (!_local1.gameOver) {
if (_local1.turnLeft) {
if (_local1.handBrake || (_local1.gameOver)) {
_local1.rota = _local1.rota - (Constants.rotSpeed * ((_local1.motion.getNormal() * Constants.rotExtraSpeedHandbrake) + 0.6));
} else {
_local1.rota = _local1.rota - (Constants.rotSpeed * ((_local1.motion.getNormal() * Constants.rotExtraSpeed) + 0.6));
}
}
if (_local1.turnRight) {
if (_local1.handBrake || (_local1.gameOver)) {
_local1.rota = _local1.rota + (Constants.rotSpeed * ((_local1.motion.getNormal() * Constants.rotExtraSpeedHandbrake) + 0.6));
} else {
_local1.rota = _local1.rota + (Constants.rotSpeed * ((_local1.motion.getNormal() * Constants.rotExtraSpeed) + 0.6));
}
}
if (_local1.accelerate) {
_local1.speed = _local1.speed + Constants.acceleration;
}
if (_local1.brake) {
_local1.speed = _local1.speed - Constants.deceleration;
}
}
if (_local1.handBrake || (_local1.gameOver)) {
_local1.speed = _local1.speed * Constants.handBrakeSpeed;
}
_local1.dirVec.reset(Math.sin((_local1.rot / 180) * Math.PI), -Math.cos((_local1.rot / 180) * Math.PI), 0);
_local1.motion.addV(Math.sin((_local1.rot / 180) * Math.PI) * _local1.speed, (-Math.cos((_local1.rot / 180) * Math.PI)) * _local1.speed, 0);
var _local2 = _local1.motion.getUnitVec().dot(_local1.dirVec);
if (isNaN(_local2)) {
_local2 = 0;
}
_local2 = Math.abs(_local2);
if (_local1.handBrake || (_local1.gameOver)) {
_local2 = _local2 * Constants.handBrakeSlide;
}
_local1.motion.scaleVec((_local2 * Constants.motionSpan) + Constants.motionOffset);
_local1.speed = _local1.speed * ((_local2 * Constants.speedSpan) + Constants.speedOffset);
if (!_local1.onRoad) {
_local1.motion.scaleVec(Constants.snowSpeedFriction);
_local1.speed = _local1.speed * Constants.snowMotionFriction;
}
_local1.pos.addVec(_local1.motion);
_local1.rot = _local1.rot + _local1.rota;
_local1.x = _local1.pos.x / 5;
_local1.y = _local1.pos.y / 5;
_local1.xPos.set(_local1.x);
_local1.yPos.set(_local1.y);
_local1.rotation.set(_local1.rot);
} else {
_local1.xPos.set(_local1.x);
_local1.yPos.set(_local1.y);
_local1.rotation.set(_local1.rot);
}
}
function render(alpha) {
var _local1 = this;
var _local2 = alpha;
_local1._x = _local1.xPos.get(_local2);
_local1._y = _local1.yPos.get(_local2);
_local1._rotation = _local1.rotation.get(_local2);
}
function slideTo(newTime, newX, newY, newRot) {
var _local1 = this;
var _local2 = newTime - _local1.time;
_local1.xa = (_local1.xa * 0.75) + (((newX - _local1.x) / _local2) * 0.25);
_local1.ya = (_local1.ya * 0.75) + (((newY - _local1.y) / _local2) * 0.25);
_local1.rota = (_local1.rota * 0.75) + (((newRot - _local1.rot) / _local2) * 0.25);
_local1.time = newTime;
_local1.x = newX;
_local1.y = newY;
_local1.rot = newRot;
}
var turnLeft = false;
var turnRight = false;
var accelerate = false;
var brake = false;
var handBrake = false;
var x = 0;
var y = 0;
var time = 0;
var playerCar = false;
var onRoad = false;
var rot = 0;
var xa = 0;
var ya = 0;
var rota = 0;
var speed = 0;
var gameOver = false;
}
Symbol 154 MovieClip [__Packages.timing.Timeable] Frame 0
interface timing.Timeable{}
Symbol 155 MovieClip [__Packages.Game] Frame 0
class Game extends MovieClip
{
function Game () {
super();
}
function destroy() {
var _local1 = this;
_local1.isLive = null;
_local1.rein0.removeMovieClip();
_local1.rein1.removeMovieClip();
_local1.xCamPos = null;
_local1.yCamPos = null;
_local1.xArrowPos = null;
_local1.yArrowPos = null;
_local1.arrowRot = null;
_local1.reindeerXEncoder = null;
_local1.reindeerYEncoder = null;
_local1.reindeerRotEncoder = null;
_local1.sledXEncoder = null;
_local1.sledYEncoder = null;
_local1.reindeerXDecoder = null;
_local1.reindeerYDecoder = null;
_local1.reindeerRotDecoder = null;
_local1.sledXDecoder = null;
_local1.sledYDecoder = null;
_local1.mapComponents = null;
_local1.waypoints = null;
_local1.droppoints = null;
Key.removeListener(_local1);
Selection.removeListener(_local1);
_local1.dirArrow.removeMovieClip();
_local1.ghostDrag.removeMovieClip();
_local1.ghostCar.removeMovieClip();
_local1.p0 = null;
_local1.p1 = null;
_local1.spring = null;
_local1.timer = null;
}
function startRace(gamePanel, ghostData, ghostTime) {
var _local1 = this;
var _local3 = _root;
gamePanel.melodySound.start(0, 999999);
_local1.ghostTime = ghostTime;
_local1.gamePanel = gamePanel;
_local1.road._visible = false;
_local1.isLive = [true, true, true, true, true];
var _local2 = 0;
while (_local2 < 3) {
_local3["lapLight" + _local2].gotoAndStop(2);
_local2++;
}
_local3.lapLight0.gotoAndStop(1);
_local2 = 0;
while (_local2 < 5) {
_local3["packageLight" + _local2].gotoAndStop(2);
_local2++;
}
_local1.rein0 = _local1.attachMovie("Rein", _local1.rein0, 400);
_local1.rein1 = _local1.attachMovie("Rein", _local1.rein1, 401);
_local1.xCamPos = new timing.IFloat();
_local1.yCamPos = new timing.IFloat();
_local1.xArrowPos = new timing.IFloat();
_local1.yArrowPos = new timing.IFloat();
_local1.arrowRot = new timing.IRotFloat();
_local1.reindeerXEncoder = new Encoder(_local1.sampleInterval);
_local1.reindeerYEncoder = new Encoder(_local1.sampleInterval);
_local1.reindeerRotEncoder = new Encoder(_local1.sampleInterval);
_local1.sledXEncoder = new Encoder(_local1.sampleInterval);
_local1.sledYEncoder = new Encoder(_local1.sampleInterval);
if (ghostData != undefined) {
var raceSegments = ghostData.split("/");
_local1.reindeerXDecoder = new Decoder(raceSegments[0], _local1.sampleInterval);
_local1.reindeerYDecoder = new Decoder(raceSegments[1], _local1.sampleInterval);
_local1.reindeerRotDecoder = new Decoder(raceSegments[2], _local1.sampleInterval);
_local1.sledXDecoder = new Decoder(raceSegments[3], _local1.sampleInterval);
_local1.sledYDecoder = new Decoder(raceSegments[4], _local1.sampleInterval);
}
_local1.mapComponents = new Array();
_local1.waypoints = new Array();
_local1.droppoints = new Array();
for (var name in _local1) {
if ((name.substr(0, 2) == "wp") && ((name.length == 3) || (name.length == 4))) {
_local1.waypoints.push(name);
_local1[name]._visible = false;
} else if ((name.substr(0, 4) == "drop") && (name.length == 5)) {
_local1.droppoints.push(name);
} else {
_local1.mapComponents.push(name);
}
}
_local1.droppoints.sort();
_local1.waypoints.sort();
Key.addListener(_local1);
Selection.addListener(_local1);
_local1.dirArrow = _local1.attachMovie("Arrow", _local1.dirArrow, 500);
_local1.ghostDrag = _local1.attachMovie("Sled", _local1.ghostDrag, 98);
_local1.ghostDrag.game = _local1;
_local1.ghostDrag._alpha = 40;
_local1.ghostCar = _local1.attachMovie("Reindeers", _local1.ghostCar, 97);
_local1.ghostCar.game = _local1;
_local1.ghostCar._alpha = 40;
if (ghostData == undefined) {
_local1.ghostDrag._visible = false;
_local1.ghostCar._visible = false;
}
_local1.drag.game = _local1;
_local1.drag.init(1);
_local1.myCar.playerCar = true;
_local1.myCar.game = _local1;
_local1.myCar.init(5);
_local1.p0 = new Point();
_local1.p0.p.reset(_local1.myCar._x * 5, _local1.myCar._y * 5);
_local1.p1 = new Point();
_local1.p1.p.reset(_local1.drag._x * 5, _local1.drag._y * 5);
_local1.spring = new Spring(_local1.p0, _local1.p1);
_local1.reindeerXEncoder.encode(Math.floor(_local1.myCar.pos.x / 5));
_local1.reindeerYEncoder.encode(Math.floor(_local1.myCar.pos.y / 5));
_local1.reindeerRotEncoder.encode(Math.floor(_local1.myCar.rot));
_local1.sledXEncoder.encode(Math.floor(_local1.drag._x));
_local1.sledYEncoder.encode(Math.floor(_local1.drag._y));
_local1.ghostCar.pos.x = _local1.reindeerXDecoder.decode() * 5;
_local1.ghostCar.pos.y = _local1.reindeerYDecoder.decode() * 5;
_local1.ghostCar.rot = _local1.reindeerRotDecoder.decode();
_local1.ghostCar.x = _local1.ghostCar.pos.x / 5;
_local1.ghostCar.y = _local1.ghostCar.pos.y / 5;
_local1.ghostDrag.x = _local1.sledXDecoder.decode();
_local1.ghostDrag.y = _local1.sledYDecoder.decode();
_local2 = 0;
while (_local2 < 5) {
_local1.ghostCar.pos.x = _local1.reindeerXDecoder.decodeDiff() * 5;
_local1.ghostCar.pos.y = _local1.reindeerYDecoder.decodeDiff() * 5;
_local1.ghostCar.rot = _local1.reindeerRotDecoder.decodeDiff();
_local1.ghostCar.x = _local1.ghostCar.pos.x / 5;
_local1.ghostCar.y = _local1.ghostCar.pos.y / 5;
_local1.ghostDrag.x = _local1.sledXDecoder.decodeDiff();
_local1.ghostDrag.y = _local1.sledYDecoder.decodeDiff();
_local2++;
}
_local1.timer = new timing.Timer(_local1, 30);
_local1.lapstar.gotoAndPlay(1);
_local1.lapstar.star.label.text = "1";
}
function onKillFocus() {
var _local1 = this;
_local1.myCar.turnLeft = false;
_local1.myCar.turnRight = false;
_local1.myCar.accelerate = false;
_local1.myCar.brake = false;
_local1.myCar.handBrake = false;
}
function onKeyDown() {
toggleKey(Key.getCode(), true);
}
function onKeyUp() {
toggleKey(Key.getCode(), false);
}
function toggleKey(keyCode, down) {
}
function getTerrainAt(x, y) {
var _local2 = this;
var _local3 = y;
var _local1 = 0;
while (_local1 < _local2.mapComponents.length) {
if (_local2[_local2.mapComponents[_local1]].hitTest(x, _local3, true)) {
if (_local2.mapComponents[_local1].substr(0, 4) == "road") {
return(_local2.TERRAIN_ROAD);
}
}
_local1++;
}
return(_local2.TERRAIN_DEFAULT);
}
function getDropPointAt(x, y, scale) {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.droppoints.length) {
var _local3 = _local2[_local2.droppoints[_local1]]._x - x;
var yd = (_local2[_local2.droppoints[_local1]]._y - y);
if (((_local3 * _local3) + (yd * yd)) < ((2304 * scale) * scale)) {
return(_local1);
}
_local1++;
}
return(-1);
}
function getWaypointAt(x, y) {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.waypoints.length) {
var _local3 = _local2[_local2.waypoints[_local1]]._x - x;
var yd = (_local2[_local2.waypoints[_local1]]._y - y);
if (((_local3 * _local3) + (yd * yd)) < 10000) {
return(_local1);
}
_local1++;
}
return(-1);
}
function endNow() {
var _local1 = this;
_local1.gamePanel.melodySound.stop();
if (_local1.racing && (_local1.laps < 3)) {
_local1.laps = 3;
_local1.racing = false;
_local1.myCar.gameOver = true;
_local1.gamePanel.loseSound.start();
}
}
function tick(tick) {
var _local1 = this;
_local1.myCar.turnLeft = Key.isDown(37);
_local1.myCar.turnRight = Key.isDown(39);
_local1.myCar.accelerate = Key.isDown(38);
_local1.myCar.brake = Key.isDown(40);
_local1.myCar.handBrake = Key.isDown(32);
if (_local1.myCar.brake || (_local1.myCar.accelerate)) {
_local1.racing = true;
}
if (_local1.endIn > 0) {
_local1.endIn--;
if (_local1.endIn == 0) {
var raceResult = _local1.reindeerXEncoder.flush();
raceResult = raceResult + ("/" + _local1.reindeerYEncoder.flush());
raceResult = raceResult + ("/" + _local1.reindeerRotEncoder.flush());
raceResult = raceResult + ("/" + _local1.sledXEncoder.flush());
raceResult = raceResult + ("/" + _local1.sledYEncoder.flush());
_local1.reindeerXEncoder = undefined;
_local1.reindeerYEncoder = undefined;
_local1.reindeerRotEncoder = undefined;
_local1.sledXEncoder = undefined;
_local1.sledYEncoder = undefined;
_local1.gamePanel.nextRound(_local1.lapTime, raceResult);
}
}
if (_local1.racing) {
if (_local1.sledXDecoder != undefined) {
_local1.ghostCar.pos.x = _local1.reindeerXDecoder.decodeDiff() * 5;
_local1.ghostCar.pos.y = _local1.reindeerYDecoder.decodeDiff() * 5;
_local1.ghostCar.rot = _local1.reindeerRotDecoder.decodeDiffRot();
_local1.ghostCar.x = _local1.ghostCar.pos.x / 5;
_local1.ghostCar.y = _local1.ghostCar.pos.y / 5;
_local1.ghostDrag.x = _local1.sledXDecoder.decodeDiff();
_local1.ghostDrag.y = _local1.sledYDecoder.decodeDiff();
}
}
var dx = (_local1.ghostDrag._x - _local1.ghostCar._x);
var dy = (_local1.ghostDrag._y - _local1.ghostCar._y);
var dir = Math.atan2(dy, dx);
_local1.ghostDrag.rot = ((dir * 180) / Math.PI) - 90;
_local1.ghostCar.tick();
_local1.ghostDrag.tick();
_local1.myCar.tick();
_local1.drag.tick();
_local1.p1.p.reset(_local1.drag.x * 5, _local1.drag.y * 5);
_local1.p0.p.reset(_local1.myCar.pos.x, _local1.myCar.pos.y);
_local1.spring.tick();
_local1.p0.tick();
_local1.p1.tick();
var t = _local1[_local1.waypoints[_local1.nextWaypoint]];
var dx = ((_local1.myCar.pos.x / 5) - t._x);
var dy = ((_local1.myCar.pos.y / 5) - t._y);
var dir = Math.atan2(dy, dx);
_local1.xArrowPos.set((_local1.myCar.pos.x / 5) - (Math.cos(dir) * 90));
_local1.yArrowPos.set((_local1.myCar.pos.y / 5) - (Math.sin(dir) * 90));
_local1.arrowRot.set(((dir * 180) / Math.PI) - 90);
_local1.drag.x = _local1.p1.p.x / 5;
_local1.drag.y = _local1.p1.p.y / 5;
_local1.drag.rot = ((_local1.spring.getAngle() * 180) / Math.PI) - 90;
var rotDiff = (_local1.drag.rot - _local1.myCar.rot);
rotDiff = rotDiff - (Math.floor((rotDiff + 180) / 360) * 360);
_local1.myCar.rotA = _local1.myCar.rotA + ((rotDiff / _local1.spring.intensity) * 0.5);
_local1.myCar.motion.addVec(_local1.p0.m);
_local1.p0.m.reset(0, 0);
var xo = 191;
var yo = 91;
if (_local1.firstTick) {
_local1.xCam = _local1.myCar.xPos.value + (Math.sin((_local1.myCar.rot / 180) * Math.PI) * 100);
_local1.yCam = _local1.myCar.yPos.value - (Math.cos((_local1.myCar.rot / 180) * Math.PI) * 100);
_local1.xCamPos.set(_local1.xCam);
_local1.yCamPos.set(_local1.yCam);
_local1.xCamPos.set(_local1.xCam);
_local1.yCamPos.set(_local1.yCam);
} else {
_local1.xCam = (_local1.xCam * 0.92) + ((_local1.myCar.xPos.value + (Math.sin((_local1.myCar.rot / 180) * Math.PI) * 100)) * 0.08);
_local1.yCam = (_local1.yCam * 0.92) + ((_local1.myCar.yPos.value - (Math.cos((_local1.myCar.rot / 180) * Math.PI) * 100)) * 0.08);
_local1.xCamPos.set(_local1.xCam);
_local1.yCamPos.set(_local1.yCam);
}
var w = 440;
var h = 320;
var carTerrain = _local1.getTerrainAt((((w / 2) + _local1.myCar.x) - _local1.xCam) + xo, (((h / 2) + _local1.myCar.y) - _local1.yCam) + yo);
var sledTerrain = _local1.getTerrainAt((((w / 2) + _local1.drag.x) - _local1.xCam) + xo, (((h / 2) + _local1.drag.y) - _local1.yCam) + yo);
var touchedWaypoint = _local1.getWaypointAt(_local1.myCar.x, _local1.myCar.y);
var sledDouchedWaypoint = _local1.getWaypointAt(_local1.drag.x, _local1.drag.y);
var collidedDropPoint = _local1.getDropPointAt(_local1.myCar.x, _local1.myCar.y, 0.8);
var touchedDropPoint = _local1.getDropPointAt(_local1.drag.x, _local1.drag.y, 1.2);
_local1.spring.p1.m.scaleVec(1 - (_local1.spring.p1.getSlide() * 0.02));
if ((((_local1.spring.p1.isSkidding(_local1.drag.rot) && (_local1.skidTime == 0)) && (_local1.lastTime >= 0)) && (_local1.laps < 3)) && (_local1.racing)) {
if (Math.random() < 0.33333) {
_local1.gamePanel.skidSound0.start();
} else if (Math.random() < 0.5) {
_local1.gamePanel.skidSound1.start();
} else {
_local1.gamePanel.skidSound2.start();
}
_local1.skidTime = 20;
}
if (_local1.skidTime > 0) {
_local1.skidTime--;
}
_local1.frame++;
if (touchedDropPoint >= 0) {
if (_local1.isLive[touchedDropPoint]) {
_root["packageLight" + touchedDropPoint].gotoAndStop(1);
_local1[_local1.droppoints[touchedDropPoint]].gotoAndPlay(2);
_local1.spring.reduceRelativeWeight();
_local1.isLive[touchedDropPoint] = false;
if (Math.random() < 0.5) {
_local1.gamePanel.laughSound0.start(0, 0);
} else {
_local1.gamePanel.laughSound1.start(0, 0);
}
}
} else if (collidedDropPoint >= 0) {
if (_local1.isLive[collidedDropPoint]) {
_root["packageLight" + collidedDropPoint].gotoAndStop(3);
_local1[_local1.droppoints[collidedDropPoint]].gotoAndPlay(61);
_local1.isLive[collidedDropPoint] = false;
_local1.gamePanel.splatSound.start(0, 0);
}
}
var now = getTimer();
if (sledDouchedWaypoint == _local1.nextWaypoint) {
touchedWaypoint = _local1.nextWaypoint;
}
if (touchedWaypoint == _local1.nextWaypoint) {
_local1.nextWaypoint++;
if (_local1.nextWaypoint >= _local1.waypoints.length) {
_local1.nextWaypoint = 0;
_root["lapLight" + _local1.laps].gotoAndStop(2);
_local1.laps++;
_root["lapLight" + _local1.laps].gotoAndStop(1);
if (_local1.laps == 3) {
_local1.gamePanel.melodySound.stop();
if (_local1.lapTime < _local1.ghostTime) {
_local1.gamePanel.winSound.start();
} else {
_local1.gamePanel.loseSound.start();
}
_local1.dirArrow._visible = false;
_local1.myCar.gameOver = true;
_local1.endIn = 30;
_local1.lapstar.gotoAndPlay(66);
_local1.lapstar.star.label.text = "X";
} else {
_local1.lapstar.gotoAndPlay(1);
_local1.lapstar.star.label.text = "" + (_local1.laps + 1);
}
}
}
_local1.myCar.onRoad = carTerrain == _local1.TERRAIN_ROAD;
if (sledTerrain != _local1.TERRAIN_ROAD) {
_local1.p1.slowDown();
}
if (((_local1.lastTime >= 0) && (_local1.laps < 3)) && (_local1.racing)) {
_local1.lapTime = _local1.lapTime + (now - _local1.lastTime);
}
var _local3 = Math.floor(_local1.lapTime / 10);
var _local2 = Math.floor(_local3 / 100);
var minutes = Math.floor(_local2 / 60);
_local2 = _local2 % 60;
_local3 = _local3 % 100;
var btmilliseconds = Math.floor(_local1.bestTime / 10);
var btseconds = Math.floor(btmilliseconds / 100);
var btminutes = Math.floor(btseconds / 60);
btseconds = btseconds % 60;
btmilliseconds = btmilliseconds % 100;
_local1.gamePanel.raceInfoLabel.text = (((((("Checkpoints: " + (_local1.nextWaypoint + 1)) + "/") + _local1.waypoints.length) + " Laps: ") + _local1.laps) + "/") + 20;
_local1.gamePanel.raceInfoLabel.text = _local1.gamePanel.raceInfoLabel.text + (((((((" Lap Time: " + minutes) + ":") + ((_local2 < 10) ? "0" : "")) + _local2) + ":") + ((_local3 < 10) ? "0" : "")) + _local3);
_local1.gamePanel.raceInfoLabel.text = _local1.gamePanel.raceInfoLabel.text + (((((((" Best Time: " + btminutes) + ":") + ((btseconds < 10) ? "0" : "")) + btseconds) + ":") + ((btmilliseconds < 10) ? "0" : "")) + btmilliseconds);
var totalEncodedSide = _local1.sledXEncoder.getCodeLength();
totalEncodedSide = totalEncodedSide + _local1.sledYEncoder.getCodeLength();
totalEncodedSide = totalEncodedSide + _local1.reindeerRotEncoder.getCodeLength();
totalEncodedSide = totalEncodedSide + _local1.reindeerYEncoder.getCodeLength();
totalEncodedSide = totalEncodedSide + _local1.reindeerXEncoder.getCodeLength();
_root.timeLabel.text = ((((((((minutes < 10) ? "0" : "") + minutes) + ":") + ((_local2 < 10) ? "0" : "")) + _local2) + ":") + ((_local3 < 10) ? "0" : "")) + _local3;
_local1.gamePanel.raceInfoLabel.text = ("Encoded motion is " + totalEncodedSide) + " bytes";
_local1.gamePanel.raceInfoLabel.text = _local1.gamePanel.raceInfoLabel.text + (((((((" Lap Time: " + minutes) + ":") + ((_local2 < 10) ? "0" : "")) + _local2) + ":") + ((_local3 < 10) ? "0" : "")) + _local3);
_local1.lastTime = now;
_local1.firstTick = false;
if (_local1.racing) {
if (_local1.sledXEncoder != undefined) {
_local1.reindeerXEncoder.encodeDiff(Math.floor(_local1.myCar.xPos.get(1)));
_local1.reindeerYEncoder.encodeDiff(Math.floor(_local1.myCar.yPos.get(1)));
_local1.reindeerRotEncoder.encodeDiff(Math.floor(_local1.myCar.rotation.get(1)));
_local1.sledXEncoder.encodeDiff(Math.floor(_local1.drag.xPos.get(1)));
_local1.sledYEncoder.encodeDiff(Math.floor(_local1.drag.yPos.get(1)));
}
}
}
function render(tick, alpha) {
var _local1 = this;
_local1.myCar.render(alpha);
_local1.drag.render(alpha);
_local1.ghostCar.render(alpha);
_local1.ghostDrag.render(alpha);
var w = 440;
var h = 320;
_local1.dirArrow._x = _local1.xArrowPos.get(alpha);
_local1.dirArrow._y = _local1.yArrowPos.get(alpha);
_local1.dirArrow._rotation = _local1.arrowRot.get(alpha);
_local1._x = Math.floor((-_local1.xCamPos.get(alpha)) + (w / 2));
_local1._y = Math.floor((-_local1.yCamPos.get(alpha)) + (h / 2));
var xo = 191;
var yo = 91;
var _local2 = 0;
while (_local2 < 2) {
var point = {x:_local1.myCar["reinPoint" + _local2]._x, y:_local1.myCar["reinPoint" + _local2]._y};
_local1.myCar.localToGlobal(point);
var _local3 = {x:_local1.drag["reinPoint" + _local2]._x, y:_local1.drag["reinPoint" + _local2]._y};
_local1.drag.localToGlobal(_local3);
var x1 = ((point.x - _local1._x) - xo);
var y1 = ((point.y - _local1._y) - yo);
var x2 = ((_local3.x - _local1._x) - xo);
var y2 = ((_local3.y - _local1._y) - yo);
_local1["rein" + _local2]._x = x1;
_local1["rein" + _local2]._y = y1;
_local1["rein" + _local2]._xscale = x2 - x1;
_local1["rein" + _local2]._yscale = y2 - y1;
_local2++;
}
}
function crc32(data) {
var _local2 = 3988292384;
var _local1 = -1;
var _local3 = 0;
do {
_local1 = _local1 ^ (data.charCodeAt(_local3) & 255);
_local1 = (_local1 >> 1) ^ (_local2 * (_local1 & 1));
_local1 = (_local1 >> 1) ^ (_local2 * (_local1 & 1));
_local1 = (_local1 >> 1) ^ (_local2 * (_local1 & 1));
_local1 = (_local1 >> 1) ^ (_local2 * (_local1 & 1));
_local1 = (_local1 >> 1) ^ (_local2 * (_local1 & 1));
_local1 = (_local1 >> 1) ^ (_local2 * (_local1 & 1));
_local1 = (_local1 >> 1) ^ (_local2 * (_local1 & 1));
_local1 = (_local1 >> 1) ^ (_local2 * (_local1 & 1));
} while (_local3 < data.length);
return(~_local1);
}
function onEnterFrame() {
if (timer != undefined) {
timer.advanceTime();
}
}
var TERRAIN_DEFAULT = 0;
var TERRAIN_ROAD = 1;
var inited = false;
var nextWaypoint = 0;
var laps = 0;
var lastTime = -1;
var bestTime = 599990;
var frame = 0;
var timer = undefined;
var sampleInterval = 5;
var lapTime = 0;
var endIn = -1;
var skidTime = 0;
var racing = false;
var firstTick = true;
var ghostTime = 0;
var passedTicks = 0;
}
Symbol 156 MovieClip [__Packages.Point] Frame 0
class Point
{
var p, m;
function Point () {
p = new Vector2d();
m = new Vector2d();
}
function tick() {
var _local1 = this;
_local1.p.addVec(_local1.m);
_local1.m.scaleVec(0.965);
}
function getSlide(rot) {
var _local2 = new Vector2d(0, 0);
_local2.reset(Math.sin((rot / 180) * Math.PI), -Math.cos((rot / 180) * Math.PI), 0);
var _local1 = m.getUnitVec().dot(_local2);
if (isNaN(_local1)) {
_local1 = 0;
}
_local1 = Math.abs(_local1);
return(_local1);
}
function isSkidding(rot) {
return((m.getNormal() > 0.5) && (getSlide(rot) < 0.75));
}
function slowDown() {
m.scaleVec(0.96);
}
}
Symbol 157 MovieClip [__Packages.Vector2d] Frame 0
class Vector2d
{
var x, y;
function Vector2d (px, py) {
x = px;
y = py;
}
function toString() {
}
function reset(px, py) {
x = px;
y = py;
}
function resetNew(px, py) {
return(new Vector2d((x = px), (y = py)));
}
function cloneVec(vec) {
x = vec.x;
y = vec.y;
}
function cloneVecNew(vec) {
return(new Vector2d((x = vec.x), (y = vec.y)));
}
function addV(xScalar, yScalar) {
x = x + xScalar;
y = y + yScalar;
}
function addVec(vec) {
x = x + vec.x;
y = y + vec.y;
}
function addVecNew(vec) {
return(new Vector2d(x + vec.x, y + vec.y));
}
function minVec(vec) {
x = x - vec.x;
y = y - vec.y;
}
function minVecNew(vec) {
return(new Vector2d(x - vec.x, y - vec.y));
}
function getNegativeVec(vec) {
var _local1 = this;
_local1.x = -_local1.x;
_local1.y = -_local1.y;
}
function getNegativeVecNew(vec) {
var _local1 = this;
return(new Vector2d((_local1.x = -_local1.x), (_local1.y = -_local1.y)));
}
function scaleVec(scalar) {
x = x * scalar;
y = y * scalar;
}
function scaleVecNew(scalar) {
return(new Vector2d((x = x * scalar), (y = y * scalar)));
}
function dot(vec) {
return((x * vec.x) + (y * vec.y));
}
function cross(vec) {
var _local1 = new Vector2d(0, 0, 0);
_local1.x = (y * 0) - (0 * vec.y);
_local1.y = (0 * vec.x) - (x * 0);
return(_local1);
}
function getNormal() {
var _local1 = this;
return(Math.sqrt((_local1.x * _local1.x) + (_local1.y * _local1.y)));
}
function distanceTo(v) {
var _local1 = x - v.x;
var _local2 = y - v.y;
return(Math.sqrt((_local1 * _local1) + (_local2 * _local2)));
}
function normalize() {
var _local2 = this;
var _local1 = _local2.getNormal();
_local2.x = _local2.x / _local1;
_local2.y = _local2.y / _local1;
}
function getUnitVec() {
var _local3 = this;
var _local1 = new Vector2d(_local3.x, _local3.y);
var _local2 = _local3.getNormal();
_local1.x = _local1.x / _local2;
_local1.y = _local1.y / _local2;
return(_local1);
}
}
Symbol 158 MovieClip [__Packages.Spring] Frame 0
class Spring
{
function Spring (p0, p1) {
var _local1 = this;
_local1.p0 = p0;
_local1.p1 = p1;
_local1.targetDist = p0.p.distanceTo(p1.p);
}
function reduceRelativeWeight() {
relativeWeight = relativeWeight + (relativeWeight / 5);
}
function tick() {
var _local1 = this;
var dx = (_local1.p1.p.x - _local1.p0.p.x);
var _local3 = _local1.p1.p.y - _local1.p0.p.y;
var distance = Math.sqrt((dx * dx) + (_local3 * _local3));
var xf = (dx / distance);
var yf = (_local3 / distance);
var _local2 = distance - _local1.targetDist;
if (_local2 < 0) {
_local2 = _local2 * 0.25;
_local1.intensity = 1000 / (_local2 * 0.15);
if (_local1.intensity < 1000) {
_local1.intensity = 1000;
}
} else {
_local1.intensity = 1000 / (_local2 * 0.15);
if (_local1.intensity < 10) {
_local1.intensity = 10;
}
}
var _intensity = (0.2 * _local2);
var ratio = _local1.relativeWeight;
var i1 = (_intensity * (1 - ratio));
var i2 = (_intensity * ratio);
_local1.p0.m.addV(xf * i1, yf * i1);
_local1.p1.m.addV((-xf) * i2, (-yf) * i2);
}
function getAngle() {
var _local1 = this;
var _local3 = _local1.p1.p.x - _local1.p0.p.x;
var _local2 = _local1.p1.p.y - _local1.p0.p.y;
return(Math.atan2(_local2, _local3));
}
var intensity = 1000;
var targetDist = 0;
var relativeWeight = 0.2;
}
Symbol 159 MovieClip [__Packages.GamePanel] Frame 0
class GamePanel
{
var ghostDatas, ghostTimes, qualifyTimes;
function GamePanel () {
var _local1 = this;
_local1.roundTimes = ["", "", ""];
_local1.ghostDatas = ["", "", ""];
_local1.ghostTimes = [0, 0, 0];
_local1.qualifyTimes = [0, 0, 0];
_local1.selectMap(_local1.map0);
_local1.melodySound = new Sound();
_local1.melodySound.attachSound("snd_melody");
_local1.laughSound0 = new Sound();
_local1.laughSound0.attachSound("snd_elf_laugh_0");
_local1.laughSound1 = new Sound();
_local1.laughSound1.attachSound("snd_elf_laugh_1");
_local1.winSound = new Sound();
_local1.winSound.attachSound("snd_win");
_local1.loseSound = new Sound();
_local1.loseSound.attachSound("snd_lose");
_local1.skidSound0 = new Sound();
_local1.skidSound0.attachSound("snd_skid_0");
_local1.skidSound1 = new Sound();
_local1.skidSound1.attachSound("snd_skid_1");
_local1.skidSound2 = new Sound();
_local1.skidSound2.attachSound("snd_skid_2");
_local1.splatSound = new Sound();
_local1.splatSound.attachSound("snd_splat");
}
function selectMap(map) {
var _local2 = this;
var _local3 = map;
if ((_local2.currentMap != undefined) && (_local2.currentMap != null)) {
_local2.currentMap.destroy();
}
var _local1 = 0;
while (_local1 < 3) {
_root["raceLight" + _local1].gotoAndStop(2);
_local1++;
}
if (_local3 == _local2.map0) {
_root.raceLight0.gotoAndStop(1);
}
if (_local3 == _local2.map1) {
_root.raceLight1.gotoAndStop(1);
}
if (_local3 == _local2.map2) {
_root.raceLight2.gotoAndStop(1);
}
_local2.map0._visible = _local3 == _local2.map0;
_local2.map1._visible = _local3 == _local2.map1;
_local2.map2._visible = _local3 == _local2.map2;
_local2.map0.enabled = _local3 == _local2.map0;
_local2.map1.enabled = _local3 == _local2.map1;
_local2.map2.enabled = _local3 == _local2.map2;
_local2.currentMap = _local3;
}
function parseGameData() {
var gameDataXml = new XML(_root.gameData);
_global.config = new Object();
var cn = gameDataXml.firstchild.childNodes;
var _local1 = 0;
while (_local1 < cn.length) {
if (cn[_local1].nodeName == "tracks") {
var _local2 = cn[_local1].childNodes;
_local1 = 0;
while (_local1 < _local2.length) {
var _local3 = _local2[_local1].attributes.id;
if (_local3.length > 0) {
var maxTime = new Number(_local2[_local1].attributes.maxTime * 1000);
var ghostTime = 100000000;
if (_local2[_local1].attributes.ghosttime.length > 0) {
ghostTime = _local2[_local1].attributes.ghosttime * 1000;
}
var ghostData = _local2[_local1].firstChild;
ghostDatas[_local3 - 1] = ghostData.toString();
ghostTimes[_local3 - 1] = ghostTime;
qualifyTimes[_local3 - 1] = maxTime;
}
_local1++;
}
} else if (cn[_local1].nodeName == "text") {
if (_global.config[cn[_local1].nodeName] == undefined) {
_global.config[cn[_local1].nodeName] = new Object();
}
_global.config[cn[_local1].nodeName][cn[_local1].attributes.id] = new String(cn[_local1].firstChild.nodeValue);
}
_local1++;
}
}
function setSound(isOn) {
var _local1 = this;
var _local2 = isOn;
_local1.melodySound.setVolume((_local2 ? 100 : 0));
_local1.laughSound0.setVolume((_local2 ? 100 : 0));
_local1.laughSound1.setVolume((_local2 ? 100 : 0));
_local1.skidSound0.setVolume((_local2 ? 100 : 0));
_local1.skidSound1.setVolume((_local2 ? 100 : 0));
_local1.skidSound2.setVolume((_local2 ? 100 : 0));
_local1.winSound.setVolume((_local2 ? 100 : 0));
_local1.loseSound.setVolume((_local2 ? 100 : 0));
_local1.splatSound.setVolume((_local2 ? 100 : 0));
}
function startGame() {
var _local1 = this;
if (!_local1.started) {
_local1.startRace(0);
_local1.started = true;
fscommand ("gameStart");
}
}
function startRace(roundNum) {
var _local1 = this;
_local1.currentMap.startRace(_local1, _local1.ghostDatas[roundNum], _local1.ghostTimes[roundNum]);
}
function gameOver() {
var _local2 = this;
var _local3 = _global;
if (_local2.gameOvered) {
} else if (_local2.endGameAt < 0) {
_local2.currentMap.endNow();
var lapTime = 600000;
_local2.totalTime = _local2.totalTime + lapTime;
var _local1 = _local2.roundNum;
while (_local1 < 3) {
_local2.roundTimes[_local1] = "---";
_local1++;
}
var totalTimeString = "---";
_root.betweenRaceSplash._visible = true;
_root.betweenRaceSplash.gotoAndPlay(1);
_local2.roundNum++;
_local3.infoPopup_text = "";
_local3.infoPopup_text = _local3.infoPopup_text + (_local3.config.text["track" + _local2.roundNum].toUpperCase() + "\r");
_local3.infoPopup_text = _local3.infoPopup_text + "\r";
_local3.infoPopup_text = _local3.infoPopup_text + (((_local3.config.text.track1_time + ": ") + _local2.roundTimes[0]) + "\r");
_local3.infoPopup_text = _local3.infoPopup_text + (((_local3.config.text.track2_time + ": ") + _local2.roundTimes[1]) + "\r");
_local3.infoPopup_text = _local3.infoPopup_text + (((_local3.config.text.track3_time + ": ") + _local2.roundTimes[2]) + "\r");
_local3.infoPopup_text = _local3.infoPopup_text + "\r";
_local3.infoPopup_text = _local3.infoPopup_text + (((_local3.config.text.total_time + ": ") + totalTimeString) + "\r");
_local3.infoPopup_note = _local3.config.text.wait_for_high_score.toUpperCase();
_local2.endGameAt = getTimer() + 7000;
_local2.gameOvered = true;
}
}
function nextRound(lapTime, ghostData) {
var _local1 = _global;
var _local2 = this;
if (_local2.gameOvered) {
} else {
var report = (((((("<track id=\"" + (_local2.roundNum + 1)) + "\" time=\"") + lapTime) + "\">") + ghostData) + "</track>");
fscommand ("request", report);
_local2.totalTime = _local2.totalTime + lapTime;
var milliseconds = Math.floor(lapTime / 10);
var _local3 = Math.floor(milliseconds / 100);
var minutes = Math.floor(_local3 / 60);
milliseconds = milliseconds % 100;
_local3 = _local3 % 60;
_local2.roundTimes[_local2.roundNum] = ((((((((minutes < 10) ? "0" : "") + minutes) + ":") + ((_local3 < 10) ? "0" : "")) + _local3) + ":") + ((milliseconds < 10) ? "0" : "")) + milliseconds;
milliseconds = Math.floor(_local2.totalTime / 10);
_local3 = Math.floor(milliseconds / 100);
minutes = Math.floor(_local3 / 60);
milliseconds = milliseconds % 100;
_local3 = _local3 % 60;
var totalTimeString = (((((((((minutes < 10) ? "0" : "") + minutes) + ":") + ((_local3 < 10) ? "0" : "")) + _local3) + ":") + ((milliseconds < 10) ? "0" : "")) + milliseconds);
milliseconds = Math.floor(_local2.qualifyTimes[_local2.roundNum] / 10);
_local3 = Math.floor(milliseconds / 100);
minutes = Math.floor(_local3 / 60);
milliseconds = milliseconds % 100;
_local3 = _local3 % 60;
var qualifyTimeString = (((((((((minutes < 10) ? "0" : "") + minutes) + ":") + ((_local3 < 10) ? "0" : "")) + _local3) + ":") + ((milliseconds < 10) ? "0" : "")) + milliseconds);
_local3 = _local3 % 60;
milliseconds = milliseconds % 100;
_root.betweenRaceSplash._visible = true;
_root.betweenRaceSplash.gotoAndPlay(1);
_local2.roundNum++;
if (_local2.roundNum < 3) {
_local1.infoPopup_text = "";
_local1.infoPopup_text = _local1.infoPopup_text + (_local1.config.text["track" + _local2.roundNum].toUpperCase() + "\r");
_local1.infoPopup_text = _local1.infoPopup_text + "\r";
if (_local2.roundNum >= 1) {
_local1.infoPopup_text = _local1.infoPopup_text + (((_local1.config.text.track1_time + ": ") + _local2.roundTimes[0]) + "\r");
}
if (_local2.roundNum >= 2) {
_local1.infoPopup_text = _local1.infoPopup_text + (((_local1.config.text.track2_time + ": ") + _local2.roundTimes[1]) + "\r");
}
if (_local2.roundNum >= 3) {
_local1.infoPopup_text = _local1.infoPopup_text + (((_local1.config.text.track3_time + ": ") + _local2.roundTimes[2]) + "\r");
}
_local1.infoPopup_text = _local1.infoPopup_text + "\r";
_local1.infoPopup_text = _local1.infoPopup_text + (((_local1.config.text.qualify_time + ": ") + qualifyTimeString) + "\r");
if (lapTime <= _local2.qualifyTimes[_local2.roundNum - 1]) {
_local1.infoPopup_text = _local1.infoPopup_text + (_local1.config.text.did_qualify + "\r");
} else {
_local1.infoPopup_text = _local1.infoPopup_text + (_local1.config.text.did_not_qualify + "\r");
}
_local1.infoPopup_text = _local1.infoPopup_text + "\r";
_local1.infoPopup_text = _local1.infoPopup_text + (((_local1.config.text.total_time + ": ") + totalTimeString) + "\r");
if (lapTime <= _local2.qualifyTimes[_local2.roundNum - 1]) {
_local1.infoPopup_note = _local1.config.text.wait_for_next_track.toUpperCase();
_local2.swapRoundAt = getTimer() + 7000;
} else {
_local1.infoPopup_note = _local1.config.text.wait_for_high_score.toUpperCase();
_local2.endGameAt = getTimer() + 7000;
}
} else {
_local1.infoPopup_text = "";
_local1.infoPopup_text = _local1.infoPopup_text + (_local1.config.text["track" + _local2.roundNum].toUpperCase() + "\r");
_local1.infoPopup_text = _local1.infoPopup_text + "\r";
_local1.infoPopup_text = _local1.infoPopup_text + (((_local1.config.text.track1_time + ": ") + _local2.roundTimes[0]) + "\r");
_local1.infoPopup_text = _local1.infoPopup_text + (((_local1.config.text.track2_time + ": ") + _local2.roundTimes[1]) + "\r");
_local1.infoPopup_text = _local1.infoPopup_text + (((_local1.config.text.track3_time + ": ") + _local2.roundTimes[2]) + "\r");
_local1.infoPopup_text = _local1.infoPopup_text + "\r";
_local1.infoPopup_text = _local1.infoPopup_text + (((_local1.config.text.total_time + ": ") + totalTimeString) + "\r");
_local1.infoPopup_note = _local1.config.text.wait_for_high_score.toUpperCase();
_local2.endGameAt = getTimer() + 7000;
_local2.gameOvered = true;
}
}
}
function onEnterFrame() {
var _local1 = this;
if ((_local1.swapRoundAt > 0) && (getTimer() >= _local1.swapRoundAt)) {
_local1.swapRoundAt = -1;
_root.betweenRaceSplash._visible = false;
_root.betweenRaceSplash.gotoAndStop(1);
_local1.selectMap(_local1["map" + _local1.roundNum]);
_local1.startRace(_local1.roundNum);
}
if ((_local1.endGameAt > 0) && (getTimer() >= _local1.endGameAt)) {
fscommand ("gameOver", "" + _local1.totalTime);
_local1.endGameAt = -1;
}
}
var started = false;
var swapRoundAt = -1;
var endGameAt = -1;
var roundNum = 0;
var totalTime = 0;
var gameOvered = false;
}
Symbol 160 MovieClip [__Packages.timing.Timer] Frame 0
class timing.Timer
{
var timeable;
function Timer (timeable, gameTicksPerSecond) {
millisPerGameTick = 1000 / gameTicksPerSecond;
this.timeable = timeable;
}
function advanceTime() {
var _local1 = this;
_local1.time = getTimer();
_local1.unprocessedTime = _local1.unprocessedTime + (_local1.time - _local1.lastTime);
_local1.lastTime = _local1.time;
var _local2 = 0;
while (_local1.unprocessedTime > _local1.millisPerGameTick) {
_local1.unprocessedTime = _local1.unprocessedTime - _local1.millisPerGameTick;
_local1.timeable.tick(_local1.tick);
_local1.tick++;
_local2++;
if (_local2 >= 10) {
_local1.unprocessedTime = 0;
}
}
var _local3 = _local1.unprocessedTime / _local1.millisPerGameTick;
_local1.timeable.render(_local1.tick, _local3);
}
var time = 0;
var lastTime = 0;
var unprocessedTime = 0;
var tick = 0;
var millisPerGameTick = 0;
}
Symbol 161 MovieClip [__Packages.Encoder] Frame 0
class Encoder
{
var encodeInterval, code;
function Encoder (encodeInterval) {
this.encodeInterval = encodeInterval;
code = "";
}
function encodeDiff(value) {
var _local1 = this;
if ((++_local1.tick) >= _local1.encodeInterval) {
_local1.encodeValue(value - _local1.previousValue);
_local1.previousValue = value;
_local1.tick = 0;
}
}
function encode(value) {
var _local1 = this;
_local1.encodeValue(value);
_local1.previousValue = value;
_local1.tick = 0;
}
function encodeValue(value) {
var _local1 = this;
var _local2 = value;
if ((_local2 < -32768) || (_local2 >= 32768)) {
_local1.code = _local1.code + (("[ERR: VALUE OUT OF BOUNDS (" + _local2) + ")]");
} else if (_local2 == _local1.lastValue) {
_local1.lastValueCount++;
if (_local1.lastValueCount == 16) {
_local1.code = _local1.code + _local1.repeatNumbers.charAt(_local1.lastValueCount - 1);
_local1.lastValueCount = 0;
}
} else {
if (_local1.lastValueCount > 0) {
_local1.code = _local1.code + _local1.repeatNumbers.charAt(_local1.lastValueCount - 1);
_local1.lastValueCount = 0;
}
if ((_local2 >= -8) && (_local2 < 8)) {
var v1 = ((_local2 + 8) & 15);
_local1.code = _local1.code + _local1.shortNumbers.charAt(v1);
} else if ((_local2 >= -128) && (_local2 < 128)) {
var v1 = (((_local2 + 128) >> 0) & 15);
var v2 = (((_local2 + 128) >> 4) & 15);
_local1.code = _local1.code + (_local1.numbers.charAt(v1) + _local1.numbers.charAt(v2));
} else {
var v1 = (((_local2 + 32768) >> 0) & 15);
var v2 = (((_local2 + 32768) >> 4) & 15);
var v3 = (((_local2 + 32768) >> 8) & 15);
var _local3 = ((_local2 + 32768) >> 12) & 15;
_local1.code = _local1.code + ((((_local1.largeNumberEscapeChar + _local1.numbers.charAt(v1)) + _local1.numbers.charAt(v2)) + _local1.numbers.charAt(v3)) + _local1.numbers.charAt(_local3));
}
_local1.lastValue = _local2;
}
}
function getCodeLength() {
return(code.length);
}
function flush() {
var _local1 = this;
if (_local1.lastValueCount > 0) {
_local1.code = _local1.code + _local1.repeatNumbers.charAt(_local1.lastValueCount - 1);
_local1.lastValueCount = 0;
_local1.lastValue = -1;
}
return(_local1.code);
}
var shortNumbers = "GHIJKLMNOPQRSTUV";
var numbers = "0123456789ABCDEF";
var repeatNumbers = "abcdefghijklmnop";
var largeNumberEscapeChar = "Z";
var lastValue = 0;
var lastValueCount = 0;
var tick = 0;
var previousValue = 0;
}
Symbol 162 MovieClip [__Packages.Decoder] Frame 0
class Decoder
{
var code, decodeInterval;
function Decoder (code, decodeInterval) {
this.code = code;
this.decodeInterval = decodeInterval;
code = "";
}
function decodeDiff() {
var _local1 = this;
if ((++_local1.tick) >= _local1.decodeInterval) {
var _local2 = _local1.decodeValue();
_local1.previousValue = _local1.previousValue + _local2;
_local1.tick = 0;
_local1.sample0 = _local1.sample1;
_local1.sample1 = _local1.previousValue;
}
return(_local1.sample0 + (((_local1.sample1 - _local1.sample0) * _local1.tick) / _local1.decodeInterval));
}
function decodeDiffRot() {
var _local1 = this;
if ((++_local1.tick) >= _local1.decodeInterval) {
var _local2 = _local1.decodeValue();
_local1.previousValue = _local1.previousValue + _local2;
_local1.tick = 0;
_local1.sample0 = _local1.sample1;
_local1.sample1 = _local1.previousValue;
_local1.sample0 = _local1.sample0 + (Math.floor(((_local1.sample1 - _local1.sample0) + 180) / 360) * 360);
}
return(_local1.sample0 + (((_local1.sample1 - _local1.sample0) * _local1.tick) / _local1.decodeInterval));
}
function decode() {
var _local1 = this;
var _local2 = _local1.decodeValue();
_local1.tick = 0;
_local1.sample0 = _local1.sample1;
_local1.sample1 = _local2;
_local1.previousValue = _local2;
return(_local1.sample1);
}
function decodeValue() {
var _local1 = this;
if (_local1.repeatValueCount > 0) {
_local1.repeatValueCount--;
return(_local1.repeatValue);
}
_local1.repeatValue = _local1.decodeValueNext();
return(_local1.repeatValue);
}
function decodeByte() {
var _local2 = this;
var _local3 = _local2.code.charAt(0);
_local2.code = _local2.code.substring(1);
var _local1 = _local2.numbers.indexOf(_local3);
if (_local1 == -1) {
}
return(_local1);
}
function decodeValueNext() {
var _local1 = this;
if (_local1.code.length == 0) {
return(0);
}
var _local3 = _local1.code.charAt(0);
_local1.code = _local1.code.substring(1);
var _local2 = _local1.repeatNumbers.indexOf(_local3);
if (_local2 >= 0) {
_local1.repeatValueCount = _local2;
return(_local1.repeatValue);
}
_local2 = _local1.shortNumbers.indexOf(_local3);
if (_local2 >= 0) {
return(_local2 - 8);
}
_local2 = _local1.largeNumberEscapeChar.indexOf(_local3);
if (_local2 >= 0) {
var val = 0;
val = val + (_local1.decodeByte() << 0);
val = val + (_local1.decodeByte() << 4);
val = val + (_local1.decodeByte() << 8);
val = val + (_local1.decodeByte() << 12);
return(val - 32768);
}
_local2 = _local1.numbers.indexOf(_local3);
if (_local2 >= 0) {
var val = 0;
val = val + (_local2 << 0);
val = val + (_local1.decodeByte() << 4);
return(val - 128);
}
return(0);
}
var shortNumbers = "GHIJKLMNOPQRSTUV";
var numbers = "0123456789ABCDEF";
var repeatNumbers = "abcdefghijklmnop";
var largeNumberEscapeChar = "Z";
var repeatValue = -1;
var repeatValueCount = 0;
var tick = 0;
var previousValue = 0;
var sample0 = 0;
var sample1 = 0;
}
Symbol 163 MovieClip [__Packages.timing.IFloat] Frame 0
class timing.IFloat
{
function IFloat () {
}
function set(newValue) {
var _local1 = this;
_local1.lastValue = _local1.value;
_local1.value = newValue;
}
function get(alpha) {
var _local1 = this;
return(_local1.lastValue + ((_local1.value - _local1.lastValue) * alpha));
}
var value = 0;
var lastValue = 0;
}
Symbol 164 MovieClip [__Packages.timing.IRotFloat] Frame 0
class timing.IRotFloat extends timing.IFloat
{
function IRotFloat () {
super();
}
function set(newValue) {
var _local1 = this;
_local1.lastValue = _local1.value;
_local1.value = newValue;
_local1.value = _local1.value + (Math.floor((_local1.value - 180) / 360) * 360);
_local1.lastValue = _local1.lastValue + (Math.floor(((_local1.value - _local1.lastValue) + 180) / 360) * 360);
}
}
Symbol 165 MovieClip [__Packages.Reindeers] Frame 0
class Reindeers extends Sled
{
function Reindeers () {
super();
}
}