<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="732" height="110" backgroundColor="#ffffff">
<mx:Style>
.leftButtonStyle{
/*overSkin:Embed("/images/newpapcr_leftOn.jpg");
upSkin:Embed("/images/newpapcr_left.jpg");
downSkin:Embed("/images/newpapcr_leftClick.jpg");
*/}
.rightButtonStyle{
/*overSkin:Embed("/images/newpapcr_rightOn.jpg");
upSkin:Embed("/images/newpapcr_right.jpg");
downSkin:Embed("/images/newpapcr_rightClick.jpg");
*/}
</mx:Style>
<mx:Script>
<![CDATA[
import mx.effects.Glow;
import mx.events.EffectEvent;
import mx.effects.Move;
// import mx.controls.Alert;
private var state:Boolean = true;
private function getFunLeft():void{
if(state){
state = false;
var tright:Tile = new Tile();
c.addChild(tright);
tright.x=632;
tright.y=0;
tright.width=632;
tright.height=90;
tright.direction="horizontal";
var img1 :Image = new Image();
img1.source="image/1.jpg";
img1.height=90;
img1.width=120;
var img2 :Image = new Image();
img2.source="image/2.jpg";
img2.height=90;
img2.width=120;
var img3 :Image = new Image();
img3.source="image/3.jpg";
img3.height=90;
img3.width=120;
var img4 :Image = new Image();
img4.source="image/4.jpg";
img4.height=90;
img4.width=120;
var img5 :Image = new Image();
img5.source="image/1.jpg";
img5.height=90;
img5.width=120;
img1.addEventListener(MouseEvent.MOUSE_OVER,imagePlay);
img2.addEventListener(MouseEvent.MOUSE_OVER,imagePlay);
img3.addEventListener(MouseEvent.MOUSE_OVER,imagePlay);
img4.addEventListener(MouseEvent.MOUSE_OVER,imagePlay);
img5.addEventListener(MouseEvent.MOUSE_OVER,imagePlay);
tright.addChild(img1);
tright.addChild(img2);
tright.addChild(img3);
tright.addChild(img4);
tright.addChild(img5);
var m1 :Move = new Move();
m1.xFrom = 632;
m1.xTo = 0;
m1.target = tright;
var t2:Tile = Tile(c.getChildAt(0));
var m2 :Move = new Move();
m2.xFrom = 0;
m2.xTo = -632;
m2.target = t2;
m2.addEventListener(EffectEvent.EFFECT_END,function():void{c.removeChild(t2);state = true;});
m2.addEventListener(EffectEvent.EFFECT_START,function():void{m1.play();});
m2.play();
}
}
private function getFunRight():void{
if(state){
state = false;
var tleft:Tile = new Tile();
c.addChildAt(tleft,0);
tleft.x=-632;
tleft.y=0;
tleft.width=632;
tleft.height=90;
tleft.direction="horizontal";
var img11 :Image = new Image();
img11.source="image/1.jpg";
img11.height=90;
img11.width=120;
var img12 :Image = new Image();
img12.source="image/2.jpg";
img12.height=90;
img12.width=120;
var img13 :Image = new Image();
img13.source="image/3.jpg";
img13.height=90;
img13.width=120;
var img14 :Image = new Image();
img14.source="image/4.jpg";
img14.height=90;
img14.width=120;
var img15 :Image = new Image();
img15.source="image/1.jpg";
img15.height=90;
img15.width=120;
img11.addEventListener(MouseEvent.MOUSE_OVER,imagePlay);
img12.addEventListener(MouseEvent.MOUSE_OVER,imagePlay);
img13.addEventListener(MouseEvent.MOUSE_OVER,imagePlay);
img14.addEventListener(MouseEvent.MOUSE_OVER,imagePlay);
img15.addEventListener(MouseEvent.MOUSE_OVER,imagePlay);
tleft.addChild(img11);
tleft.addChild(img12);
tleft.addChild(img13);
tleft.addChild(img14);
tleft.addChild(img15);
var m11 :Move = new Move();
m11.xFrom = -632;
m11.xTo = 0;
m11.target = tleft;
var t12:Tile = Tile(c.getChildAt(1));
var m12 :Move = new Move();
m12.xFrom = 0;
m12.xTo = 632;
m12.target = t12;
m12.addEventListener(EffectEvent.EFFECT_END,function():void{c.removeChild(t12);state = true;});
m12.addEventListener(EffectEvent.EFFECT_START,function():void{m11.play();});
m12.play();
}
}
private function imagePlay(evt:MouseEvent):void{
var g:Glow = new Glow();
var array:Array = new Array(evt.target);
//Alert.show(array.length+"");
if(array.length>0){
g.target = array[0];
g.duration=2000;
g.play();
}
}
]]>
</mx:Script>
<mx:Glow id="hitHight" duration="2000" />
<mx:Button x="0" y="0" label="Button" height="110" width="25" click="getFunLeft();" styleName="leftButtonStyle"/>
<mx:Button x="707" y="0" label="Button" height="110" width="25" click="getFunRight();" styleName="rightButtonStyle"/>
<mx:Canvas id="c" x="50" y="10" width="632" height="90" horizontalScrollPolicy="off" verticalScrollPolicy="off">
<mx:Tile x="0" y="0" width="632" height="90" id="tile2" direction="horizontal" >
<mx:Image source="image/1.jpg" id="pic2" height="90" width="120" rollOverEffect="hitHight"/>
<mx:Image source="image/2.jpg" id="pic1" height="90" width="120" rollOverEffect="hitHight"/>
<mx:Image source="image/3.jpg" id="pic3" height="90" width="120" rollOverEffect="hitHight"/>
<mx:Image source="image/4.jpg" id="pic4" height="90" width="120" rollOverEffect="hitHight"/>
<mx:Image source="image/1.jpg" id="pic5" height="90" width="120" rollOverEffect="hitHight"/>
</mx:Tile>
</mx:Canvas>
</mx:Application>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="732" height="110" backgroundColor="#ffffff">
<mx:Style>
.leftButtonStyle{
/*overSkin:Embed("/images/newpapcr_leftOn.jpg");
upSkin:Embed("/images/newpapcr_left.jpg");
downSkin:Embed("/images/newpapcr_leftClick.jpg");
*/}
.rightButtonStyle{
/*overSkin:Embed("/images/newpapcr_rightOn.jpg");
upSkin:Embed("/images/newpapcr_right.jpg");
downSkin:Embed("/images/newpapcr_rightClick.jpg");
*/}
</mx:Style>
<mx:Script>
<![CDATA[
import mx.effects.Glow;
import mx.events.EffectEvent;
import mx.effects.Move;
// import mx.controls.Alert;
private var state:Boolean = true;
private function getFunLeft():void{
if(state){
state = false;
var tright:Tile = new Tile();
c.addChild(tright);
tright.x=632;
tright.y=0;
tright.width=632;
tright.height=90;
tright.direction="horizontal";
var img1 :Image = new Image();
img1.source="image/1.jpg";
img1.height=90;
img1.width=120;
var img2 :Image = new Image();
img2.source="image/2.jpg";
img2.height=90;
img2.width=120;
var img3 :Image = new Image();
img3.source="image/3.jpg";
img3.height=90;
img3.width=120;
var img4 :Image = new Image();
img4.source="image/4.jpg";
img4.height=90;
img4.width=120;
var img5 :Image = new Image();
img5.source="image/1.jpg";
img5.height=90;
img5.width=120;
img1.addEventListener(MouseEvent.MOUSE_OVER,imagePlay);
img2.addEventListener(MouseEvent.MOUSE_OVER,imagePlay);
img3.addEventListener(MouseEvent.MOUSE_OVER,imagePlay);
img4.addEventListener(MouseEvent.MOUSE_OVER,imagePlay);
img5.addEventListener(MouseEvent.MOUSE_OVER,imagePlay);
tright.addChild(img1);
tright.addChild(img2);
tright.addChild(img3);
tright.addChild(img4);
tright.addChild(img5);
var m1 :Move = new Move();
m1.xFrom = 632;
m1.xTo = 0;
m1.target = tright;
var t2:Tile = Tile(c.getChildAt(0));
var m2 :Move = new Move();
m2.xFrom = 0;
m2.xTo = -632;
m2.target = t2;
m2.addEventListener(EffectEvent.EFFECT_END,function():void{c.removeChild(t2);state = true;});
m2.addEventListener(EffectEvent.EFFECT_START,function():void{m1.play();});
m2.play();
}
}
private function getFunRight():void{
if(state){
state = false;
var tleft:Tile = new Tile();
c.addChildAt(tleft,0);
tleft.x=-632;
tleft.y=0;
tleft.width=632;
tleft.height=90;
tleft.direction="horizontal";
var img11 :Image = new Image();
img11.source="image/1.jpg";
img11.height=90;
img11.width=120;
var img12 :Image = new Image();
img12.source="image/2.jpg";
img12.height=90;
img12.width=120;
var img13 :Image = new Image();
img13.source="image/3.jpg";
img13.height=90;
img13.width=120;
var img14 :Image = new Image();
img14.source="image/4.jpg";
img14.height=90;
img14.width=120;
var img15 :Image = new Image();
img15.source="image/1.jpg";
img15.height=90;
img15.width=120;
img11.addEventListener(MouseEvent.MOUSE_OVER,imagePlay);
img12.addEventListener(MouseEvent.MOUSE_OVER,imagePlay);
img13.addEventListener(MouseEvent.MOUSE_OVER,imagePlay);
img14.addEventListener(MouseEvent.MOUSE_OVER,imagePlay);
img15.addEventListener(MouseEvent.MOUSE_OVER,imagePlay);
tleft.addChild(img11);
tleft.addChild(img12);
tleft.addChild(img13);
tleft.addChild(img14);
tleft.addChild(img15);
var m11 :Move = new Move();
m11.xFrom = -632;
m11.xTo = 0;
m11.target = tleft;
var t12:Tile = Tile(c.getChildAt(1));
var m12 :Move = new Move();
m12.xFrom = 0;
m12.xTo = 632;
m12.target = t12;
m12.addEventListener(EffectEvent.EFFECT_END,function():void{c.removeChild(t12);state = true;});
m12.addEventListener(EffectEvent.EFFECT_START,function():void{m11.play();});
m12.play();
}
}
private function imagePlay(evt:MouseEvent):void{
var g:Glow = new Glow();
var array:Array = new Array(evt.target);
//Alert.show(array.length+"");
if(array.length>0){
g.target = array[0];
g.duration=2000;
g.play();
}
}
]]>
</mx:Script>
<mx:Glow id="hitHight" duration="2000" />
<mx:Button x="0" y="0" label="Button" height="110" width="25" click="getFunLeft();" styleName="leftButtonStyle"/>
<mx:Button x="707" y="0" label="Button" height="110" width="25" click="getFunRight();" styleName="rightButtonStyle"/>
<mx:Canvas id="c" x="50" y="10" width="632" height="90" horizontalScrollPolicy="off" verticalScrollPolicy="off">
<mx:Tile x="0" y="0" width="632" height="90" id="tile2" direction="horizontal" >
<mx:Image source="image/1.jpg" id="pic2" height="90" width="120" rollOverEffect="hitHight"/>
<mx:Image source="image/2.jpg" id="pic1" height="90" width="120" rollOverEffect="hitHight"/>
<mx:Image source="image/3.jpg" id="pic3" height="90" width="120" rollOverEffect="hitHight"/>
<mx:Image source="image/4.jpg" id="pic4" height="90" width="120" rollOverEffect="hitHight"/>
<mx:Image source="image/1.jpg" id="pic5" height="90" width="120" rollOverEffect="hitHight"/>
</mx:Tile>
</mx:Canvas>
</mx:Application>