请看代码:
    IdHTTP1.Get(edt1.Text,Response);
    s:=UTF8Decode(Response.DataString);
    ShockwaveFlash1.LoadMovie(0,s);
    ShockwaveFlash1.Play;假如edt1.text="http://apple.gicp.net";
Get此网页后,网页会输出"http://apple.gicp.net/res/pcw5.swf"这个flash地址;但Get得到后的内容是:“ #$FEFF'http://apple.gicp.net/res/pcw5.swf' ”因此ShockwaveFlash1没法成功加载并播放!但ShowMessage(s)就可以得到正确的内容(http://apple.gicp.net/res/pcw5.swf)
请点解?

解决方案 »

  1.   

    Seems problem happening on UTF8Decode method. If your URL is only returning the Flash URL then why do you still need to call UTF8Decode method?Try
    s := IdHTTP1.Get(edit1.text);
    ShockwaveFlash1.LoadMovie(0,s);
    ShockwaveFlash1.Play;
    Above code assume that url provided in edit1.text property will only return URL to flash, not the whole HTML stuff.Hope it helps.Regards,Ali
      

  2.   

    既然已经得到网址,为什么还要UTF8Decode
      

  3.   

    UTF8Decode  变为  UTF8ToAnsi
      

  4.   

    你们说的方法得到的结果都不正确
    #$FEFF'http://sosgc.gicp.net/res/pcw5.swf'这样的结果ShockwaveFlash1是没办法加载的!
      

  5.   

    #$FEFF'http://sosgc.gicp.net/res/pcw5.swf'
    这样面带了个#$FEFF  
    ShowMessage(s)既是想要的http://sosgc.gicp.net/res/pcw5.swf
      

  6.   


    http://apple.gicp.net  运行这个页面后,才会输出
    http://apple.gicp.net/res/pcw5.swf这样的地址
    而且每次都不一样的,