主题:  realplay G2 的activeX,有谁试验成功过……

zwjn

职务:普通成员
等级:1
金币:0.0
发贴:110
注册:2000/12/7 9:29:52
#12001/6/5 14:58:37
我打算用activeX来播放realplay的文件,activeX :realplayer G2 control
但是却发现不管我设置文件路径为本地,或者www都不起作用
检查此activeX的canPlay() 方法返回值都是0
我填写的路径为file://path/file.rm 及http://wwwpath/file.rm不知道是不是填对了
还有我试用了几个其他的activeX都成功了,单是这个却一直没有
有谁成功用过?帮帮兄弟我,
先谢了



Call Me Simon

职务:普通成员
等级:2
金币:2.0
发贴:646
注册:2000/9/19 13:56:51
#22001/6/5 15:20:27
我只知道Arky 曾经历过同样的问题, 不知道他有没有找到答案, 而且他是见首不见尾的人

就我所知,这个问题没有办法,如果你使用director 8.5, 就不必用activeX 的办法了。



zwjn

职务:普通成员
等级:1
金币:0.0
发贴:110
注册:2000/12/7 9:29:52
#32001/6/5 16:26:30
可怜,
刚才用vc提供的activex control test来调用这个activeX也不行
用director8.5播放时画面不流畅,就算用它内部集成的窗口来播放也是如此

编辑历史:[这消息被zwjn编辑过(编辑时间2001-06-05 16:31:05)]


酷狗

职务:版主
等级:2
金币:10.0
发贴:610
注册:2000/9/16 9:26:36
#42001/6/5 16:51:29
呵呵用要“\”就行了,怪吧!



D计划-混沌

职务:管理员
等级:6
金币:15.2
发贴:3528
注册:2007/4/9 9:48:37
#52001/6/5 18:12:17
activeX是可行的,可以设置绝对路径
或用SetSource设置相对路径(搜索与本区与real相关帖子)
8.5内置real若播放不流畅,可以试试设置tempo



zwjn

职务:普通成员
等级:1
金币:0.0
发贴:110
注册:2000/12/7 9:29:52
#62001/6/6 10:03:55
我算是终于抓到一个有正面回答得了:)
szcooldog 我又试了一下比如我的文件绝对路径是c:\test.rm
把source中填写
c:\test.rm ,不行
file://c:\test.rm,不行
file:\\c:\test.rm noway
使用SetSource("c:\test.rm "),不行
setSource("file://c:\test.rm,") 不行
……
不行

我再找找上面的贴子先



zwjn

职务:普通成员
等级:1
金币:0.0
发贴:110
注册:2000/12/7 9:29:52
#72001/6/6 10:17:48
OK
IT WORKS~~~~~~~~~~~~~~~~~!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
THANKS flyingbird
THANKS A LOT OF szcooldog
THANKS 54zq
THANKS ANYONE WHO LOOK THIS POST
THANKS ANYONE I KNOW AND NO

我来总结一下吧,再测试一下,等下再发个总结



zwjn

职务:普通成员
等级:1
金币:0.0
发贴:110
注册:2000/12/7 9:29:52
#82001/6/7 12:20:07
写了个behavior让没有8.5的同志们也可以使用realmedia,我试了试在beginsprite里面设置路径什么的都不成功,最后没法只好设在exitframe的事件里了,我估计它的处理要一定的时间如果接连设置的话反应不过来,不知道对不对,不过反正这个时可以的


property spriteNum
property path,context,addressType,mediaType
property bSet

global gVideoSpriteNum

on isOkToAttach me, aSpriteType, aSpriteNum

return sprite(aSpriteNum).member.type=#activex
end

on getPropertyDescriptionList me
tProp=[:]
addprop tprop,#mediaType, [#comment : "Controls Type",#format : #string, #default : "ImageWindow", #range : ["ImageWindow", "All", "ControlPanel", "PlayButton", "PositionSlider"]]
addProp tProp,#addressType,[#comment:"The path type",#format,#string,#default:"relative address",#range:["relative address","absolute address"]]
addProp tProp,#Path,[#comment:"The vidio path,use relative address",#format:#string,#default:"File Name or URL:"]
addProp tProp,#context,[#comment:"Disable right click context menu?",#format:#boolean,#default:1]
return tProp
end getPropertyDescriptionList

on beginSprite me
path=reSetPath(path)
gVideoSpriteNum=spriteNum

-- sprite(gVideoSpriteNum).setSource(path)
-- sprite(gVideoSpriteNum).setEnableContextMenu(not(context))
-- sprite(gVideoSpriteNum).width=sprite(gVideoSpriteNum).getClipWidth()
-- sprite(gVideoSpriteNum).height=sprite(gVideoSpriteNum).getClipHeight()
-- sprite(gVideoSpriteNum).doPlay()
bSet=false
--
end

on exitFrame me
if not bSet or sprite(gVideoSpriteNum).width=0 then

sprite(gVideoSpriteNum).setSource(path)
sprite(spriteNum).controls = mediaType
sprite(gVideoSpriteNum).setEnableContextMenu(not(context))
sprite(gVideoSpriteNum).width=sprite(gVideoSpriteNum).getClipWidth()
sprite(gVideoSpriteNum).height=sprite(gVideoSpriteNum).getClipHeight()
bSet=true
end if
end

on reSetPath tPath
newPath=""

if addressType="relative address" then
tPath=the moviePath & tPath
end if

t=the itemDelimiter
the itemDelimiter="\"
repeat with i=1 to tPath.item.count
newPath=newPath & tPath.item[i]
if i newPath=newPath & "/"
end if
end repeat
the itemDelimiter=t

return newPath

end