flex 做的小相册+向上滚动字体

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="853" height="437"
  backgroundColor="#090909" creationComplete="complete()" >
 <mx:Panel x="57" y="108" width="506" height="279" layout="absolute" horizontalAlign="center">
  <mx:Image x="75" y="10" width="380" height="219" id="bimg" horizontalAlign="center"/>
 </mx:Panel>
  
  <mx:Move id="imgm" target="img1"/>
  <mx:HBox x="0" y="10" width="100%" height="69" horizontalScrollPolicy="off"  id="hx">
   <mx:Image width="80" height="66" source="img/3.jpg" mouseMove="show(event)"  verticalAlign="middle" id="img1"/>
   <mx:Image width="80" height="60" source="img/906.jpg" mouseMove="show(event)"/>
   <mx:Image width="80" height="60" source="img/200732016555173499[1].jpg" mouseMove="show(event)"/>
   <mx:Image width="80" height="60" source="img/200561948229.jpg" mouseMove="show(event)"/>
   <mx:Image width="80" height="60" source="img/落英.jpg" mouseMove="show(event)"/>
   <mx:Image width="80" height="60" source="img/小桥.jpg" mouseMove="show(event)"/>
   <mx:Image width="80" height="60" source="img/904.jpg" mouseMove="show(event)"/>
   <mx:Image width="80" height="62" source="img/905.jpg" mouseMove="show(event)" verticalAlign="middle"/>
  </mx:HBox>


<mx:Move id="move_up" target="{tt}"/>
<mx:Panel width="250" height="200" layout="absolute" title="Anouncement" 
        fontSize="13" horizontalCenter="269" verticalCenter="-2">
        <mx:Canvas id="cs" width="100%" height="100%" left="0" top="0" 
            verticalScrollPolicy="off" mouseOver="move_pause()" mouseOut="move_resume()">
            <mx:Text id="tt" width="94%" horizontalCenter="0"
                text="Ntt.cc was created br Minidxer in January of 2008 as a site dedicated to the prolification of Macromedia/Adobe Flex and JavaScript/Ajax." verticalCenter="0">
            </mx:Text>
        </mx:Canvas>
    </mx:Panel>
 
 
 <mx:Script>
  <![CDATA[
   import mx.controls.Alert;
   import mx.controls.Image;
   //显示图片
   private function show(e:Event):void{
    var s:String=e.currentTarget.source;
    this.bimg.source=s;
   }
   
   //字体向上滚动
   private function complete():void
            {
                move_up.yFrom = cs.height - 6;  
                move_up.yTo = 0 - tt.height + 6;
                move_up.repeatCount = 0; //loop
                move_up.repeatDelay = 0; //loop time
                move_up.duration = 6000; //the time of scroll once
                move_up.play();
               
   
            }
            //鼠标放入暂停
            private function move_pause():void
            {
                move_up.pause();  //pause
            }
            //鼠标离开重新滚动
            private function move_resume():void
            {
                move_up.resume(); //start from the pause position
            }

  ]]>
 </mx:Script>
</mx:Application>

 

 

///效果图/

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值