如何改变屏幕的背景颜色在ActionScript 3.0? [英] How to change screen background color in ActionScript 3.0?

查看:388
本文介绍了如何改变屏幕的背景颜色在ActionScript 3.0?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何改变屏幕的背景颜色在ActionScript 3.0?以及如何定位一个屏幕到ActionScript3.0的另一个屏幕; 我用在我的项目的一个按钮,当我点击按钮的present屏幕应该是看不见的,另一个屏幕应该

How to change screen background color in ActionScript 3.0 ? and how to navigate one screen to another screen in ActionScript3.0; i have used a button in my project, when i click the button the present screen should be invisible and another screen should come

在onclick方法我称之为是这样的:

in the onclick method i called like this :

presentscree.visible = FALSE; nextscreen:NextScreen =新NextScree(); nextscreen.visible = TRUE;

presentscree.visible = false; nextscreen:NextScreen = new NextScree(); nextscreen.visible = true;

但没有结果;任何一个可以帮助我在这?

But no result; can any one help me on this ?

推荐答案

您需要将屏幕添加到图像显示否则将是不可见的。

You need to add the screen to the DisplayList otherwise it will not be visible at all.

var nextScreen : NextScreen = new NextScreen();
addChild(nextScreen);

您可以更改屏幕的背景颜色是这样的:

You can change the background color of your screen like this:

graphics.beginFill(0xBBBBBB, 1);
graphics.drawRect(0, 0, 800, 600);
graphics.endFill();

或者,如果你想改变的SWF背景颜色:

Or, if you want to change the SWF background color:

package
{

    [SWF( frameRate="30", backgroundColor="0xFFFFFF", width="800", height="600" )]
    public class MyDocumentClass extends Sprite
    {
        public function MyDocumentClass()
        {
            super();
        }
    }
}

这篇关于如何改变屏幕的背景颜色在ActionScript 3.0?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆