【问题标题】:Loading animated interactive content in Sencha Touch 2在 Sencha Touch 2 中加载动画交互内容
【发布时间】:2014-04-23 20:58:31
【问题描述】:

我有一个动画互动测验,我想在我的应用程序中加载一个 URL。该 URL 是 http://some-link/story.html 。它是一个 HTML 文件,虽然内容是动画和交互式的。但是当我加载它时,除了空白之外什么都没有出现。我正在使用带有 Android 4.3 的设备上的 cordova 进行测试 我正在使用它来加载动画

Ext.define('MyApp.view.MyPanel', {
extend: 'Ext.Panel',
config: {
    id: 'MyPanel',
    itemId: 'MyPanel',
    scrollable: true,
    listeners: [
        {
            fn: 'onMyPanelActivate',
            event: 'activate'
        }
    ]
},    onMyPanelActivate: function(newActiveItem, container, oldActiveItem, eOpts) {
    Ext.Ajax.request({
        //local path of your html file
        url: 'http://some-link/story.html',
        success : function(response) {
           Ext.getCmp('MyPanel').setHtml(response.responseText);
        },
        failure : function(response) {  
            var text = response.responseText;
            Ext.Msg.alert('Error', text, Ext.emptyFn);            }
    });
}});

II 尝试在 Ext.Video 中加载它,但仍然没有出现。请帮忙。

【问题讨论】:

    标签: mobile extjs sencha-touch sencha-touch-2


    【解决方案1】:

    问题在于,这将在特定 URL 加载 HTML 内容,但如果该 HTML 页面上也有图像并且它们具有相对路径(../images/this.jpg),则此方法不会加载这些图像.

    所以如果我在 iframe 上加载我的页面,那么它会正确加载。但同样,swf 动画无法在较新版本的 Android 上运行,因为没有可用的 flash 支持。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-05-25
      • 1970-01-01
      相关资源
      最近更新 更多