3d效果显示文字

<?xml version="1.0" encoding="utf-8"?>
<!--created:Sep 28, 2010 file:StateDemo1.mxml  author:Michael -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx"
               backgroundColor="0"
               viewSourceURL="srcview/index.html"
               width="100%"
               height="100%">
    <fx:Style>
        @namespace s "library://ns.adobe.com/flex/spark";
        @font-face {
            src: url("assets/armalite.ttf");
            fontFamily: myFont;
            embedAsCFF:true;
 
        }
        s|Label
        {
            font-size:50;
            font-family:"myFont";
            line-height:120;
            text-align:center;
            padding-top:500;
            padding-bottom:400;
 
        }
    </fx:Style>
    <fx:Script>
        <![CDATA[
            import mx.events.FlexEvent;
            private var myTimer:Timer;
 
            protected function bc_creationCompleteHandler(event:FlexEvent):void
            {
                this.myLabel.text="Robert Downey Jr.
Don Cheadle
Scarlett Johansson
Gwyneth Paltrow
Sam Rockwell
Mickey Rourke
Samuel L. Jackson
Clark Gregg
John Slattery
Garry Shandling
Paul Bettany
Kate Mara
Leslie Bibb
Jon Favreau
Christiane Amanpour";
                scroller.setStyle("verticalScrollPolicy", "off");
                this.myTimer=new Timer(100);
                this.myTimer.addEventListener(TimerEvent.TIMER, onChange);
                this.myTimer.start();
                this.myRoate.play();
 
            }
 
            private function onChange(e:TimerEvent):void
            {
                var temp:Number=this.scroller.verticalScrollBar.value;
                if (temp < this.scroller.verticalScrollBar.maximum)
                {
                    this.scroller.verticalScrollBar.value=this.scroller.verticalScrollBar.value + 7;
                }
                else
                {
                    this.myLabel.visible=false;
                    this.scroller.verticalScrollBar.value=0;
                    this.myLabel.visible=true;
                }
            }
        ]]>
    </fx:Script>
 
    <fx:Declarations>
        <s:Rotate3D target="{bc}"
                    angleXFrom="0"
                    angleXTo="-70"
                    autoCenterTransform="true"
                    id="myRoate"/>
    </fx:Declarations>
 
    <s:BorderContainer width="100%"
                       height="100%"
                       backgroundImage="@Embed('images/images.jpg')"
                       backgroundImageFillMode="repeat">
        <s:layout>
            <s:VerticalLayout horizontalAlign="center"
                              verticalAlign="middle"/>
        </s:layout>
 
        <s:BorderContainer width="600"
                           height="400"
                           backgroundAlpha="0"
                           id="bc"
                           creationComplete="bc_creationCompleteHandler(event)"
                           borderVisible="false">
 
            <s:Group width="100%"
                     height="100%">
                <s:Scroller width="100%"
                            height="100%"
                            id="scroller">
                    <s:Group width="600"
                             clipAndEnableScrolling="true">
                        <s:Label id="myLabel"
                                 width="100%"
                                 color="0x4094f2"/>
                    </s:Group>
 
                </s:Scroller>
                <s:BorderContainer width="100%"
                                   height="200"
                                   top="0"
                                   backgroundAlpha=".6"
                                   backgroundColor="0"
                                   borderVisible="false"/>
 
            </s:Group>
        </s:BorderContainer>
    </s:BorderContainer>
</s:Application>
 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值