Movie not loaded for SWF

时光总嘲笑我的痴心妄想 提交于 2019-12-24 12:45:30

问题


So I'm using visual studio 2019.

I got some code trying to embed a SWF from Doodletoo.com

It loads to 100% and then goes to a black screen. When I right click it says movie not loaded. I've added the Flash variables & the link for the SWF. The button simply starts the SWF. I don't understand though. I managed to get it to load only once. When it did load it caused extreme lag.

Here is my script for the form

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();
        }
    }
}

Can someone tell me why it doesn't load the SWF? When I replace the current SWF link with another SWF link. It works fine, playing the SWF.


回答1:


The correct link is:

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

Untested but you can try solving with...

(1) Put flashvars in the same URL of SWF.

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) Change format of your flashvars. Test either Format A or Format 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();
}

Format A:

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

Format B:

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


来源:https://stackoverflow.com/questions/57423972/movie-not-loaded-for-swf

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!