Page 1 of 2

Scaling skin with flash fallback?

Posted: Thu Feb 09, 2012 3:52 pm
by wolff
Hi all,
I have a general question about the flash fallback. I hope I can point it out:

I have a project in front of me, with two html 5 skins (a small one for iphones and a big one for ipads), switching them with adding the PHP code; the tour is made with a flash fallback for those who are on android (or whatever devices) using flash. Okay so far.
But if I am 'falling back' on android, what will be with the skin and the control elements/icons? Because I made the big skin elements for flash at the beginning and now I can only make a fallback-link to this one flash file in the Html 5 options... Does this flash skin work with small displays? Or am I missing something?
Thank you for your answer!

Regards, Wolff

Re: Scaling skin with flash fallback?

Posted: Thu Feb 09, 2012 4:03 pm
by Werner
Hi Wolff

I think it doesn't work, I've got the same problem in my topic here (http://gardengnomesoftware.com/forum/vi ... f=6&t=7096)
Hope we will finde an elegant solution...

Regards
Werner

Re: Scaling skin with flash fallback?

Posted: Thu Feb 09, 2012 6:54 pm
by Hopki
HI,
You can change SWF files if you detect an Android browser.
Please see the project attached.

Basically you add this bit of code in the HTML page:

Code: Select all

<script type="text/javascript">
<!--
			var flashvars = {};
			var params = {};
			params.quality = "high";
			params.bgcolor = "#ffffff";
			params.allowscriptaccess = "sameDomain";
			params.allowfullscreen = "true";
			var attributes = {};
			attributes.id = "pano";
			attributes.name = "pano";
			attributes.align = "middle";
			var swffile="normal.swf";
			if (navigator.userAgent.toLowerCase().search('android')>=0) {
				swffile="android.swf";
			}
			swfobject.embedSWF(
				swffile, "flashContent", 
				"640", "480", 
				"9.0.0", "expressInstall.swf", 
				flashvars, params, attributes);
//-->
		</script>
You can see it in place if you open the zip then open the android_index.html page.

It is using the file names normal and android, but you can change this to your own preference.
Regards,
Hopki

Re: Scaling skin with flash fallback?

Posted: Thu Feb 09, 2012 9:06 pm
by BHiggins
Hi Hopki,

Are you changing the skin for the android because the handheld (i.e. not a tablet) have such a large DPI that normal buttons do not resolve correctly? Is there a way to get Pano 2VR to use the Capabilities.screenDPI feature of flash to build in proper proportioning on buttons? Or is it supposed to by default? It does not seem to.

Having a separate tour for the android is a solution, but it would be nice to have a flash skin the plays nicely with all formats.

Maybe I am missing something.

Burley

Re: Scaling skin with flash fallback?

Posted: Fri Feb 10, 2012 2:38 pm
by Hopki
Hi Burley,
Skin content needs to change between devices, an Android tablet with a larger screen can display far more than a Phone running the Android OS.
Similar to our HTML5 Tour example on our website. The iPad can display the map while the iPhone displays a set of thumbnails.

Scaling skin elements with window is in the bug tracker.Issue #433 which may help with button sizes.

BTW, Adobe have stopped developing their mobile flash player and only supporting the current one.
Firefox on my Samsung 10.1 tablet and Chrome for the new Android OS no longer supports Flash.

Regards,
Hopki

Re: Scaling skin with flash fallback?

Posted: Sat Feb 11, 2012 9:57 am
by wolff
Thank you, Hopki!

Re: Scaling skin with flash fallback?

Posted: Sun Feb 12, 2012 8:47 pm
by anahum
This can solve some cases --> http://skins.360panotours.com/centralv1.html and this some other cases --> http://skins.360panotours.com/rs.html

Re: Scaling skin with flash fallback?

Posted: Mon Feb 20, 2012 6:29 pm
by BHiggins
Hopki wrote:Hi Burley,
Skin content needs to change between devices, an Android tablet with a larger screen can display far more than a Phone running the Android OS.
Similar to our HTML5 Tour example on our website. The iPad can display the map while the iPhone displays a set of thumbnails.

Scaling skin elements with window is in the bug tracker.Issue #433 which may help with button sizes.

BTW, Adobe have stopped developing their mobile flash player and only supporting the current one.
Firefox on my Samsung 10.1 tablet and Chrome for the new Android OS no longer supports Flash.

Regards,
Hopki
Hi Hopki,

Thanks for the response. I read that about flash on Chrome, and firefox. Long term html5 will be best for mobile. Flash doesn't work well on those devices in my opinion.

Burley

Re: Scaling skin with flash fallback?

Posted: Mon Feb 20, 2012 7:22 pm
by 360Texas
On my HTC Evo 4g smart phone is running Android 2.3.4 o/s and Adobe flash viewer 10.3.185.23 has been tested and works well. My smart phone apparantly is using something called WEBKIT/533.1 for a browser. I will have to google that and see what it is.

[edit 20Feb12 1:38pm Central Texas Time]
Using my cell phone and going to the Andriod Market place, I could download Adobe Flash player 11.1.111.6 update. Did so and it works very well on my HTC smart phone. Also google searched for WEBKIT/533.1 Browser that there are two flavors 1 for Android and 1 for Apple. I have no idea if it is html5/css3 aware or not. Although testing it with our html5/CSS3 webpage and it delivered the FLASH fallback version.

TEST page http://360texas.com/services/sr/dbu/index.htm if you see numbers on the nadair tripod cap.. you are seeing the html5/CSS3 cube face size. See no numbers ? You are seeing the Flash delivered to your smart phone

I also have used my smart phone to test some of our 'older than dirt' java panoramas. I get to see the html page but the java based PTviewer.jar does not display the panorama.

So its not the devices that work/not work. Its their operating system and browsers on those devices that need to become html5/ aware before they will work well across different small device platforms. At the moment, I think Safari browser and Apple devices are the only ones that understand html5/CSS3. All the others by default to using Adobe Flash viewer IF it is installed on the device.

Re: Scaling skin with flash fallback?

Posted: Wed Feb 22, 2012 6:25 pm
by BHiggins
Dave,

Firefox on android does use the html5 tour. It is using webGL rather than css 3D transforms. For a while pano 2VR was using modernizer to test for 3D transforms, but now is using custom script to test for either 3D and/or webGL. Firefox and Chrome both support webGL and the pano2vr player is using the webGL script in those cases.
For those that are still using modernizer I would recommend changing scripts to latest test for webGL. In the html code the test now is as follows:
if(ggHasHtml5Css3D() || ggHasWebGL()) {
Do your code here for html5
}else{
Do your alternate code here
}

The firefox mobile works fine with current code. I find it to be problematic on orientation change though on the android. Flash works fine in the standard browser.
Burley

Re: Scaling skin with flash fallback?

Posted: Mon May 14, 2012 10:47 pm
by JNorris
OK, so we recently ran into this problem as well. All of our Flash skins usually don't contain skin elements that will be problematic on a phone utilizing the Droid OS. However, it was only a matter of time until a client requested something that wouldn't be agreeable.

We are using the PHP file for ipad/iphone differentiation and now need something to recognize when someone is accessing the tour on a mobile phone using flash. I created a new test folder for this purpose and added a new flash file in P2VR with a android skin. I recreated this file and renamed the swf file android.swf. Then recreated the normal flash version and named its swf file normal.swf. The two html5 files were recreated and had their skins renamed respectively and the HTML5 file had the PHP code inserted and then I inserted the code Hopki referenced to above, in its appropriate location, and renamed the HTML5 file to PHP. Published everything under a "test" folder on our server, making sure any source file I would need was in there. Everything worked fine except it wasn't referencing the new android specific skin I had created and was still using the "normal" skin. What am I overlooking?

Re: Scaling skin with flash fallback?

Posted: Tue May 15, 2012 9:56 am
by Hopki
@JNorris,
Can you post a project with all your files so I can take a look?
Regards,
Hopki

Re: Scaling skin with flash fallback?

Posted: Tue May 15, 2012 4:00 pm
by JNorris
Hopki,

Thanks for the quick response! I tried zipping it up and putting it in here but unfortunately it's too big. I even tried removing unnecessary files but my tiles and regular images folder amount to over 14 MB; total folder size is 22 MB. Have you used Dropbox before? I can email you an invitation to a Dropbox folder and I can put it in there for you.

Re: Scaling skin with flash fallback?

Posted: Tue May 15, 2012 4:09 pm
by Hopki
Hi,
Use martin@gardengnome.at
Regards,
Hopki

Re: Scaling skin with flash fallback?

Posted: Tue May 15, 2012 4:25 pm
by JNorris
Ok the invitation was sent to that address. I cannot thank you enough for going through all this trouble to help. Let me know if you encounter any problems or need anything further on my end that would help you reconcile the issue.