简体   繁体   English

Android:禁用捏缩放并将事件传递给Flash内容

[英]Android: disable pinch zoom and pass event to Flash content

I have a flash application written in actionscript 2.0 that shows vector architectural maps and works perfectly on common web browsers. 我有一个用ActionScript 2.0编写的Flash应用程序,它可以显示矢量建筑图,并且可以在常见的Web浏览器上完美地工作。 There are many interactions with javascript functions called by user events on the webpage, such as zooming to a certain x,y point. 网页上有许多与用户事件调用的javascript函数的交互,例如缩放到某个x,y点。 This event is usually accomplished via the mouse wheel. 通常通过鼠标滚轮完成此事件。

Now I have to make sure that the thing works on tablet pc, in particular the Galaxy Tab. 现在,我必须确保该东西可以在平板电脑上运行,尤其是Galaxy Tab。 The first thing I have to fix is that, obviously, there is no mouse wheel and the user naturally tries to pinch zoom the flash application, with the result of zooming the entire web browser. 我首先要解决的问题是,显然没有鼠标滚轮,用户自然会尝试缩放Flash应用程序,从而缩放整个Web浏览器。

What I need is to listen to the multitouch gesture and, when a pinch zoom event is called, disable the default zooming event and call a javascript/flash function that allows my flash app to zoom only the objects that need to be zoomed: in few words, the browser stays still and only a part of the flash zooms in or out. 我需要的是侦听多点触控手势,并在调用捏缩放事件时禁用默认缩放事件,并调用javascript / flash函数,该函数允许我的Flash应用仅缩放需要缩放的对象:换句话说,浏览器保持静止,并且只有一部分闪光灯会放大或缩小。

Consider that I am totally new to Android and that I already have working javascript functions to call flash object functions for the zooming purpose, so I just need to connect them to some android things that tell me when the user tries to pinch zoom in and when he tries to pinch zoom out (and possibly the x,y point of zoom). 考虑到我对Android完全陌生,并且我已经具有可运行的javascript函数来调用用于缩放目的的flash对象函数,因此我只需要将它们连接到一些Android设备,这些设备可以告诉我用户何时尝试放大以及何时进行缩放。他尝试捏缩小(可能是缩放的x,y点)。

Thanks a lot for your help! 非常感谢你的帮助! Max (Italy) 马克斯(意大利)

Passing a JavaScript call from android to flash is a very very hard task as far as I know. 据我所知,将JavaScript调用从android传递到flash是一项非常艰巨的任务。

Not because of android (follow this tutorial http://code.google.com/p/openmobster/wiki/JavascriptBridge to pass a JavaScript call to a web page ), but because of flash securities for local content. 不是因为android(遵循本教程http://code.google.com/p/openmobster/wiki/JavascriptBridge将JavaScript调用传递到网页),而是因为本地内容具有快速安全性。

It is not too much of an issue on a local computer, but the flashplayer on android is very very buggy. 在本地计算机上这不是一个太大的问题,但是android上的flashplayer非常容易出错。

I think the best is to try to find an other solution if possible... 我认为最好的办法是尝试寻找其他解决方案...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM