调整从Unity3d导出的外部SWF的大小
我使用 Unity3D 3.5 预览导出了 swf。
当我加载 as3 (Adobe Air 3) 时,我无法更改尺寸。
当swf加载时出现unity with loading的标志,大小调整为730x750!太好了,好吧!但是,当 Unity 加载程序结束时,swf 会根据舞台大小 (1920x1080) 调整大小。 =/
我在Unity3D中将分辨率设置为730x750。
有什么想法吗?谢了!
我的as3代码:
public function mc_produto_swf()
{
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
var url:URLRequest = new URLRequest("Sapato_01.swf");
loader.load(url);
}
public function loaderComplete(event:Event):void
{
var cont:MovieClip = MovieClip(event.currentTarget.content);
cont.width = 730;
cont.height = 750;
this.addChild( cont );
}
I exported a swf using Unity3D 3.5 preview.
I can not change the dimensions when I load in as3 (Adobe Air 3).
When the swf loads appears the logo of unity with loading, that resizes to 730x750! Great ok! But when the loader of unity ends the swf resize for the stage size (1920x1080). =/
I set the resolution to 730x750 in Unity3D.
Any ideas? Tks!
My code in as3:
public function mc_produto_swf()
{
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
var url:URLRequest = new URLRequest("Sapato_01.swf");
loader.load(url);
}
public function loaderComplete(event:Event):void
{
var cont:MovieClip = MovieClip(event.currentTarget.content);
cont.width = 730;
cont.height = 750;
this.addChild( cont );
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在 Unity3d 论坛中发布了同样的问题,用户“UnityRalph”帮助我:
对我有用,但我尝试改变位置 x 但不起作用。
I post the same question in the Unity3d forums and the user "UnityRalph" help me:
Works for me, but i tried change the position x and not work.