#12002/8/31 12:53:12
在flash文件同目录下有一文件名为:text.txt
在里面输入:
/news:text=1
2
3
4...
首先建立一个mc,名为news,实例名也为news.
里面第一帧有as:Load Variables(text.txt,0)
还有一个输出文本,变量为text
还有两个控制mc,实例名为c1 c2
还有向上向下两个按钮.
c1,c2都有三帧,分别加入
c1:1-stop
2-/news:text.scroll=/news:text.scroll+1
3-gotoandstop(2)
c2:1-stop
2-/news:text.scroll=/news:text.scroll-1
3-gotoandstop(2)
两个按钮的as为:
on (press) {
tellTarget ("c1") {
play();
}
}
on (release) {
tellTarget ("c1") {
gotoAndStop(1);
}
}
和
on (press) {
tellTarget ("c2") {
play();
}
}
on (release) {
tellTarget ("c2") {
gotoAndStop(1);
}
}
最后将news拖到主场景,但是测试时可以显示文本而无法实现滚动啊,我用同样的方法在主场景做,可以实现.
实在不知道出了什么错,大侠帮忙啊!!!