【问题标题】:Movie not loaded for SWF未为 SWF 加载影片
【发布时间】:2019-12-16 20:04:25
【问题描述】:

所以我使用的是 Visual Studio 2019。

我有一些代码试图从 Doodletoo.com 嵌入 SWF

它加载到 100%,然后进入黑屏。当我右键单击时,它说电影未加载。我添加了 Flash 变量和 SWF 的链接。该按钮只是启动 SWF。不过我不明白。我设法让它只加载一次。当它确实加载时,它会导致极度滞后。

这是我的表单脚本

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace NewtTEst
{
    public partial class Form1 : Form

    {
        public Form1()
        {
            InitializeComponent();
        }
        private void btnStop_Click(object sender, EventArgs e)

        {
            axShockwaveFlash1.Stop();
        }

        private void Button3_Click(object sender, EventArgs e)
        {
            axShockwaveFlash1.Movie = "http://doodletoo.com/flash/DoodleToo2.swf?v=21";
            axShockwaveFlash1.FlashVars = "configUrl=http%3A%2F%2Fdoodletoo%2Ecom%2F%2Fconfig%2Exml&roomID=4&useRefresh=false&isEmbed=false&v=21";
            axShockwaveFlash1.Play();
        }
    }
}

谁能告诉我为什么它不加载 SWF?当我用另一个 SWF 链接替换当前的 SWF 链接时。它工作正常,播放 SWF。

【问题讨论】:

    标签: c# flash shockwave


    【解决方案1】:

    正确的链接是:

    http://doodletoo.com/flash/DoodleToo2.swf?v=21&configUrl=http://doodletoo.com//config.xml&roomID=4&useRefresh=false&isEmbed=false&v=21

    未经测试,但您可以尝试解决...

    (1) 将 flashvars 放在 SWF 的同一个 URL 中。

    private void Button3_Click(object sender, EventArgs e)
    {
        axShockwaveFlash1.Movie = "http://doodletoo.com/flash/DoodleToo2.swf?v=21&configUrl=http://doodletoo.com//config.xml&roomID=4&useRefresh=false&isEmbed=false&v=21";
        axShockwaveFlash1.Play();
    }
    

    (2) 更改 flashvars 的格式。测试格式 A 或格式 B。

    private void Button3_Click(object sender, EventArgs e)
    {
        axShockwaveFlash1.Movie = "http://doodletoo.com/flash/DoodleToo2.swf?v=21";
        axShockwaveFlash1.FlashVars = "configUrl=http://doodletoo.com//config.xml&roomID=4&useRefresh=false&isEmbed=false&v=21";
        axShockwaveFlash1.Play();
    }
    

    格式A:

    configUrl=http://doodletoo.com//config.xml&roomID=4&useRefresh=false&isEmbed=false&v=21
    

    格式 B:

    configUrl=http://doodletoo.com//config.xml;roomID=4;useRefresh=false;isEmbed=false;v=21
    

    【讨论】:

    • 有什么方法可以将 WMode=Opaque 添加到该 URL 中?
    • 我还需要更改一个变量。变量的路径显示这个root|DT2.swf|scripts|com|wdf|doodletoo|ToolController我怎么能把那个路径添加到这个Game.SetVariable("_root.RESTOFTHEPATHHERE, "999999");
    • 我提出了一个新问题,寻求有关上述评论的帮助。我不确定你是否能帮助我,但你似乎知道自己在做什么,所以我想我会问你。
    猜你喜欢
    • 2011-03-07
    • 1970-01-01
    • 1970-01-01
    • 2011-11-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-29
    • 1970-01-01
    相关资源
    最近更新 更多