boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Flash版 - use buttons to control several swf files
相关主题
move to another swf file from Flex MXML script (转载)
怎样做软件演示?
求教:FLASH BUTTON在FIREFOX 和IE下的不同表现:双击&单击
如何从文本文件读取参数?
请教FLASH网址问题
问个preloader的问题
求助:实现一个基于XML的相册(出错了)
谢谢大家赏光,祝贺flash开版成功
请问能否用AS动态生成button?
A simple problem on Flex
相关话题的讨论汇总
话题: swf话题: loader话题: buttons话题: mx话题: script
进入Flash版参与讨论
1 (共1页)
n**d
发帖数: 9764
1
I want use buttons to control several .swf files. By clicking different
button, the corresponing .swf will be load. It is easy to implement if all
the buttons are in the HTML file.
If I put all these buttons in a .swf file, say main.swf, how can I use these
buttons to call the other .swf files?
f*******e
发帖数: 222
2
as2中用loadMovie function
as3中用Loader class
var loader:Loader = new Loader();
loader.load(new URLRequest(xxx.swf));

these

【在 n**d 的大作中提到】
: I want use buttons to control several .swf files. By clicking different
: button, the corresponing .swf will be load. It is easy to implement if all
: the buttons are in the HTML file.
: If I put all these buttons in a .swf file, say main.swf, how can I use these
: buttons to call the other .swf files?

n**d
发帖数: 9764
3
Thanks! But I am new for this technology. Could you give me an example or
links to the example?

【在 f*******e 的大作中提到】
: as2中用loadMovie function
: as3中用Loader class
: var loader:Loader = new Loader();
: loader.load(new URLRequest(xxx.swf));
:
: these

n**d
发帖数: 9764
4
Adobe Flex Builder 3, compile error:
1119: Access of possible undefined property swf through a reference with
static type Class.

import flash.events.Event;
private function printMessage(event:Event):void {
var loader:Loader = new Loader();
loader.load(new URLRequest(AAA.swf));
// message.text += event.target.label + " pressed" + "\n";
}
]]>


【在 f*******e 的大作中提到】
: as2中用loadMovie function
: as3中用Loader class
: var loader:Loader = new Loader();
: loader.load(new URLRequest(xxx.swf));
:
: these

n**d
发帖数: 9764
5
fixed error, but nothing happens after clicking button.
do I have to run http server?

import flash.events.Event;
import flash.net.URLRequest;
import flash.display.Loader;
private function printMessage(event:Event):void {
var loader:Loader = new Loader();
loader.load(new URLRequest("b.swf"));
// addChild( loader );
// message.text += event.target.label + " pressed" + "\n

【在 n**d 的大作中提到】
: Adobe Flex Builder 3, compile error:
: 1119: Access of possible undefined property swf through a reference with
: static type Class.
:
: : import flash.events.Event;
: private function printMessage(event:Event):void {
: var loader:Loader = new Loader();
: loader.load(new URLRequest(AAA.swf));
: // message.text += event.target.label + " pressed" + "\n";

f*******e
发帖数: 222
6
以为你用在flash里面,所以给了你上面那段简单的代码。如果要用button控制还要加
addEventListener。
在Flex里面有一个SWFLoader的component,可以直接load swf文件。
下面是一个简单的Flex例子,按button开始load swf

http://www.adobe.com/2006/mxml" layout="absolute">

internal function loading():void{
myLoader.load("test.swf");
}
]]>

sca

【在 n**d 的大作中提到】
: fixed error, but nothing happens after clicking button.
: do I have to run http server?
:
: : import flash.events.Event;
: import flash.net.URLRequest;
: import flash.display.Loader;
: private function printMessage(event:Event):void {
: var loader:Loader = new Loader();
: loader.load(new URLRequest("b.swf"));

1 (共1页)
进入Flash版参与讨论
相关主题
A simple problem on Flex
flex 3都release了
新做签名档
Adobe Flex MXML programming (转载)
测试回答另一个问题
怎样在 flex 中显示 special character
Force to refresh
问个问题
Datasource from HTTP service
flex 提取mp3的id3信息时遇到安全错误
相关话题的讨论汇总
话题: swf话题: loader话题: buttons话题: mx话题: script