图片滚动查看与文字向上滚动
2011-06-21 15:44
211 查看
<?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="images/as3_cookbook.jpg" mouseMove="show(event)" verticalAlign="middle" id="img1"/>
<mx:Image width="80" height="60" source="images/chicago_blueangels_01.jpg" mouseMove="show(event)"/>
<mx:Image width="80" height="60" source="images/chicago_lakeice_005.jpg" mouseMove="show(event)"/>
<mx:Image width="80" height="60" source="images/as3_cookbook.jpg" mouseMove="show(event)"/>
<mx:Image width="80" height="60" source="images/as3_cookbook.jpg" mouseMove="show(event)"/>
<mx:Image width="80" height="60" source="images/as3_cookbook.jpg" mouseMove="show(event)"/>
<mx:Image width="80" height="60" source="images/as3_cookbook.jpg" mouseMove="show(event)"/>
<mx:Image width="80" height="62" source="images/as3_cookbook.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>
<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="images/as3_cookbook.jpg" mouseMove="show(event)" verticalAlign="middle" id="img1"/>
<mx:Image width="80" height="60" source="images/chicago_blueangels_01.jpg" mouseMove="show(event)"/>
<mx:Image width="80" height="60" source="images/chicago_lakeice_005.jpg" mouseMove="show(event)"/>
<mx:Image width="80" height="60" source="images/as3_cookbook.jpg" mouseMove="show(event)"/>
<mx:Image width="80" height="60" source="images/as3_cookbook.jpg" mouseMove="show(event)"/>
<mx:Image width="80" height="60" source="images/as3_cookbook.jpg" mouseMove="show(event)"/>
<mx:Image width="80" height="60" source="images/as3_cookbook.jpg" mouseMove="show(event)"/>
<mx:Image width="80" height="62" source="images/as3_cookbook.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>
相关文章推荐
- 文字或者图片向上滚动代码
- jquery 实现无间图片文字向上滚动效果
- 文字或者图片向上滚动代码
- 网页中实现文字或图片向上不间断滚动的javascript代码
- jQuery插件--图片文字向上向左循环滚动
- 保存图片到本地,查看本地图片,递归实现scrollView的无限循环滚动,文字横向渐变效果,autoLayout
- 图片、文字不间断向上、下、左、右滚动代码
- 图片或文字上下左右滚动【JS向上滚动、JS向下滚动、JS向左滚动、JS向右滚动】【整理综合】
- 文字/图片向上无限循环滚动
- html向上无间隔滚动文字(图片)
- JQuery左右按钮控制图片 文字向上滚动自定义插件
- 不间断连续滚动的图片效果(向上滚动)
- 图片旋转、无限滚动、文字跳动
- Android 实现TextView垂直向上滚动(仿向上滚动文字的广告)
- 多种JQuery循环滚动文字图片效果代码
- jQuery模拟百度新闻不间断滚动效果,支持文字、图片水平垂直滚动
- JS向上下左右不间断无缝滚动图片代码(兼容IE火狐)
- CSS 实现触屏【图片文字】左右滚动效果
- jquery 单行滚动、批量多行滚动、文字图片翻屏滚动效果代码
- 简短几句jquery代码的实现一个图片向上滚动切换