Commits

Jay Lonnquist  committed 780ede2

- Set explicit direct rendering mode.
- cacheAsBitmap on a few more images/objects.

  • Participants
  • Parent commits 1f6a21b

Comments (0)

Files changed (5)

 call bat\SetupApplication.bat
 
 :target
-::goto desktop
-goto android-debug
+goto desktop
+::goto android-debug
 ::goto android-test
 ::goto ios-debug
 ::goto ios-test

File application.xml

 <?xml version="1.0" encoding="utf-8"?>
 <application xmlns="http://ns.adobe.com/air/application/3.3">
-  <id>air.com.mobiledesign.airsafecast.AIRSafecast</id>
-  <versionNumber>0.1</versionNumber>
-  <supportedProfiles>mobileDevice</supportedProfiles>
-  <filename>AIRSafecast</filename>
-  <name>AIRSafecast</name>
-  <android>
-    <manifestAdditions><![CDATA[<manifest android:installLocation="auto">
+	<id>air.com.mobiledesign.airsafecast.AIRSafecast</id>
+	<versionNumber>0.1</versionNumber>
+	<supportedProfiles>mobileDevice</supportedProfiles>
+	<filename>AIRSafecast</filename>
+	<name>AIRSafecast</name>
+	<android>
+		<manifestAdditions>
+			<![CDATA[<manifest android:installLocation="auto">
 	<uses-permission android:name="android.permission.INTERNET" />
 	<uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch" />
-</manifest>]]></manifestAdditions>
-  </android>
-  <iPhone>
-    <InfoAdditions><![CDATA[<key>UIStatusBarStyle</key>
+</manifest>]]>
+		</manifestAdditions>
+	</android>
+	<iPhone>
+		<InfoAdditions>
+			<![CDATA[<key>UIStatusBarStyle</key>
 <string>UIStatusBarStyleBlackOpaque</string>
 <key>UIRequiresPersistentWiFi</key>
 <string>NO</string>
 	<string>1</string>
 	<!-- iPad support -->
 	<!--<string>2</string>-->
-</array>]]></InfoAdditions>
-    <requestedDisplayResolution>high</requestedDisplayResolution>
-  </iPhone>
-  <initialWindow>
-    <title>AIRSafecast</title>
-    <content>AIRSafecast.swf</content>
-    <visible>true</visible>
-    <fullScreen>true</fullScreen>
-    <!--<renderMode>direct</renderMode>-->
-    <autoOrients>true</autoOrients>
-    <aspectRatio>any</aspectRatio>
-    <systemChrome>standard</systemChrome>
-  </initialWindow>
-  <icon>
-    <image72x72>icons/AIRSafecast72.png</image72x72>
-    <image114x114>icons/AIRSafecast114.png</image114x114>
-    <image512x512>icons/AIRSafecast512.png</image512x512>
-    <image48x48>icons/AIRSafecast48.png</image48x48>
-    <image57x57>icons/AIRSafecast57.png</image57x57>
-  </icon>
-  <!-- 
-	AIR options:
-	http://livedocs.adobe.com/flex/3/html/File_formats_1.html#1043413
-	
-	AIR mobile options:
-	http://help.adobe.com/en_US/air/build/WSfffb011ac560372f-5d0f4f25128cc9cd0cb-7ffe.html
-	
-	Android manifest documentation:
-	http://developer.android.com/guide/topics/manifest/manifest-intro.html
+</array>]]>
+		</InfoAdditions>
+		<requestedDisplayResolution>high</requestedDisplayResolution>
+	</iPhone>
+	<initialWindow>
+		<title>AIRSafecast</title>
+		<content>AIRSafecast.swf</content>
+		<visible>true</visible>
+		<fullScreen>true</fullScreen>
+		<renderMode>direct</renderMode>
+		<autoOrients>true</autoOrients>
+		<aspectRatio>any</aspectRatio>
+		<systemChrome>standard</systemChrome>
+	</initialWindow>
+	<icon>
+		<image72x72>icons/AIRSafecast72.png</image72x72>
+		<image114x114>icons/AIRSafecast114.png</image114x114>
+		<image512x512>icons/AIRSafecast512.png</image512x512>
+		<image48x48>icons/AIRSafecast48.png</image48x48>
+		<image57x57>icons/AIRSafecast57.png</image57x57>
+	</icon>
+	<!--
+		 AIR options:
+		 http://livedocs.adobe.com/flex/3/html/File_formats_1.html#1043413
+
+		 AIR mobile options:
+		 http://help.adobe.com/en_US/air/build/WSfffb011ac560372f-5d0f4f25128cc9cd0cb-7ffe.html
+
+		 Android manifest documentation:
+		 http://developer.android.com/guide/topics/manifest/manifest-intro.html
 	-->
-</application>
+</application>

File src/com/mobiledesign/airsafecast/Application.as

 			rad_legend.y = 100;
 			rad_legend.alpha = 0.8;
 			rad_legend.name = 'rad_legend';
+			rad_legend.cacheAsBitmap = true;
 			_nominatim_popup_bg.addChildAt(rad_legend, 1);
 			//Scale nominatim popup.
 			_nominatim_popup_bg.addEventListener(MouseEvent.CLICK, nomPopUpClickHandler, false, 0, false);

File src/com/mobiledesign/airsafecast/Interface.as

 			if (dpshadow) {
 				_matte.filters = [_dropShadow];
 			}
-			_matte.cacheAsBitmap;
+			_matte.cacheAsBitmap = true;
 			return _matte;
 		}
 		
 			_buttn.textField.thickness = thick;
 			_buttn.setStyle('textFormat', _txtformat);
 			_buttn.setStyle('embedFonts', true);
-			_buttn.cacheAsBitmap;
+			_buttn.cacheAsBitmap = true;
 			
 			_buttn.addEventListener(MouseEvent.MOUSE_OVER, btnOver);
 			_buttn.addEventListener(MouseEvent.MOUSE_OUT, btnOut);
 			_pbuttn.x = xpos;
 			_pbuttn.y = ypos;
 			_pbuttn.skinClass = com.dgrigg.skins.ButtonImageSkin;
-			_pbuttn.cacheAsBitmap;
+			_pbuttn.cacheAsBitmap = true;
 			return _pbuttn;
 		}
 		
 			_pb.source = source;
 			_pb.x = xpos;
 			_pb.y = ypos;
-			_pb.cacheAsBitmap;
+			_pb.cacheAsBitmap = true;
 			return _pb;
 		}
 		
 		//Build callout menu.
 		//////////////////////////////
 		public function buildCallout(xpos:Number, ypos:Number, width:Number, height:Number, formdat:Array):UIDropWindow {
-			var callout:UIDropWindow = new UIDropWindow(this,     <null/>, new Attributes(0, 0, width, height));
+			var callout:UIDropWindow = new UIDropWindow(this,      <null/>, new Attributes(0, 0, width, height));
 			callout.x = xpos;
 			callout.y = ypos;
 			var form:UIFormMaker = new UIFormMaker(callout, width, height);
 			_textfield.name = txtname;
 			_textfield.defaultTextFormat = _txtformat;
 			_textfield.setTextFormat(_txtformat);
-			_textfield.cacheAsBitmap;
+			_textfield.cacheAsBitmap = true;
 			return _textfield;
 		}
 		
 			_slider.tickInterval = 5;
 			_slider.move(xpos, ypos);
 			_slider.validateNow();
-			_slider.cacheAsBitmap;
+			_slider.cacheAsBitmap = true;
 			return _slider;
 		}
 		
 			_hslider.value = 1;
 			_hslider.tick = 1;
 			_hslider.horzGutter = 5;
-			_hslider.cacheAsBitmap;
+			_hslider.cacheAsBitmap = true;
 			_hslider.skinClass = com.dgrigg.skins.HSliderImageSkin;
 			return _hslider;
 		}

File src/com/mobiledesign/airsafecast/Map.as

 			poi.infoContent = (strContent);
 			//Custom icon.
 			var ico:MapIcon = new MapIcon();
+			ico.cacheAsBitmap = true;
 			//Colour of point based on severity of contamination.
 			switch (true) {
 				//Green.
 			map.mapType = 'map';
 			map.name = 'Safecast - Japan';
 			map.showMobileCursor = false;
+			map.cacheAsBitmap = true;
 			//Add controls. Position based on device orientation.
 			switch (orient_str) {
 				case 'landscape':