Changeset 4190
- Timestamp:
- 05/26/06 15:10:40 (2 years ago)
- Location:
- trunk
- Files:
-
- 10 modified
-
src/flash.js (modified) (4 diffs)
-
src/flash/flash6/DojoExternalInterface.as (modified) (4 diffs)
-
src/flash/flash8/DojoExternalInterface.as (modified) (3 diffs)
-
src/storage/Storage.as (modified) (4 diffs)
-
Storage_version6.swf (modified) (previous)
-
Storage_version8.swf (modified) (previous)
-
tests/flash/resources/HelloWorld_version6.swf (modified) (previous)
-
tests/flash/resources/HelloWorld_version8.swf (modified) (previous)
-
tests/flash/resources/UnitTestsComm_version6.swf (modified) (previous)
-
tests/flash/resources/UnitTestsComm_version8.swf (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/flash.js
r4083 r4190 380 380 //dojo.debug("installing"); 381 381 if(dojo.flash._installingListeners.length > 0){ 382 for(var i = 0; i < dojo.flash._installingListeners.length; i++){382 for(var i = 0; i < dojo.flash._installingListeners.length; i++){ 383 383 dojo.flash._installingListeners[i].call(null); 384 384 } … … 667 667 }else{ // Flash 8 668 668 swfloc = dojo.flash.flash8_version; 669 var swflocObject = swfloc, swflocEmbed = swfloc; 669 var swflocObject = swfloc; 670 var swflocEmbed = swfloc; 671 var dojoPath = djConfig.baseRelativePath; 670 672 if(doExpressInstall){ 671 673 // the location to redirect to after installing … … 675 677 swflocObject += "?MMredirectURL=" + redirectURL 676 678 + "&MMplayerType=ActiveX" 677 + "&MMdoctitle="+docTitle; 678 swflocEmbed += "?MMredirectURL=" + redirectURL + "&MMplayerType=PlugIn"; 679 + "&MMdoctitle=" + docTitle 680 + "&baseRelativePath=" + escape(dojoPath); 681 swflocEmbed += "?MMredirectURL=" + redirectURL 682 + "&MMplayerType=PlugIn" 683 + "&baseRelativePath=" + escape(dojoPath); 679 684 } 680 685 … … 700 705 + 'align="middle" ' 701 706 + 'allowScriptAccess="sameDomain" ' 702 + 'type="application/x-shockwave-flash" ' 707 + 'type="application/x-shockwave-flash" '+ "&baseRelativePath=" + escape(dojoPath); 703 708 + 'pluginspage="http://www.macromedia.com/go/getflashplayer" />' 704 709 + '</object>'; -
trunk/src/flash/flash6/DojoExternalInterface.as
r3529 r4190 8 8 class DojoExternalInterface{ 9 9 public static var available:Boolean; 10 public static var dojoPath = ""; 11 10 12 public static var _fscommandReady = false; 11 13 public static var _callbacks = new Array(); … … 15 17 // FIXME: Set available variable by testing for capabilities 16 18 DojoExternalInterface.available = true; 19 20 // extract the dojo base path 21 DojoExternalInterface.dojoPath = DojoExternalInterface.getDojoPath(); 22 //getURL("javascript:dojo.debug('FLASH:dojoPath="+DojoExternalInterface.dojoPath+"')"); 17 23 18 24 // Sometimes, on IE, the fscommand infrastructure can take a few hundred … … 176 182 public static function _initializeFlashRunner(){ 177 183 // figure out where our Flash movie is 178 var swfLoc = "../.."; 179 if(swfLoc.charAt(swfLoc.length - 1) != '/'){ 180 swfLoc = swfLoc + "/"; 181 } 182 swfLoc = swfLoc + "flash6_gateway.swf"; 184 var swfLoc = DojoExternalInterface.dojoPath + "flash6_gateway.swf"; 183 185 184 186 // load our gateway helper file … … 187 189 _root._flashRunner.loadMovie(swfLoc); 188 190 } 191 192 private static function getDojoPath(){ 193 var url = _root._url; 194 var start = url.indexOf("baseRelativePath=") + "baseRelativePath=".length; 195 var path = url.substring(start); 196 var end = path.indexOf("&"); 197 if(end != -1){ 198 path = path.substring(0, end); 199 } 200 return path; 201 } 189 202 } 190 203 -
trunk/src/flash/flash8/DojoExternalInterface.as
r3626 r4190 18 18 class DojoExternalInterface{ 19 19 public static var available:Boolean; 20 public static var dojoPath = ""; 20 21 21 22 private static var flashMethods:Array = new Array(); … … 25 26 26 27 public static function initialize(){ 28 // extract the dojo base path 29 DojoExternalInterface.dojoPath = DojoExternalInterface.getDojoPath(); 30 27 31 // see if we need to do an express install 28 32 var install:ExpressInstall = new ExpressInstall(); … … 205 209 return inputStr; 206 210 } 211 212 private static function getDojoPath(){ 213 var url = _root._url; 214 var start = url.indexOf("baseRelativePath=") + "baseRelativePath=".length; 215 var path = url.substring(start); 216 var end = path.indexOf("&"); 217 if(end != -1){ 218 path = path.substring(0, end); 219 } 220 return path; 221 } 207 222 } 208 223 -
trunk/src/storage/Storage.as
r3639 r4190 9 9 10 10 public function Storage(){ 11 //getURL("javascript:dojo.debug('FLASH:Storage constructor')"); 11 12 DojoExternalInterface.initialize(); 12 13 DojoExternalInterface.addCallback("put", this, put); … … 21 22 // access so it is in the cache 22 23 _root.createEmptyMovieClip("_settingsBackground", 1); 23 _root._settingsBackground.loadMovie( "../../storage_dialog.swf");24 _root._settingsBackground.loadMovie(DojoExternalInterface.dojoPath + "storage_dialog.swf"); 24 25 } 25 26 … … 88 89 // background that we can show a close button on. 89 90 _root.createEmptyMovieClip("_settingsBackground", 1); 90 _root._settingsBackground.loadMovie( "../../storage_dialog.swf");91 _root._settingsBackground.loadMovie(DojoExternalInterface.dojoPath + "storage_dialog.swf"); 91 92 } 92 93 … … 108 109 results.push(i); 109 110 110 // join the keys together in a comma seperate string111 // join the keys together in a comma seperated string 111 112 results = results.join(","); 112 113