The following are some of the results of flex today, including the last four. Wipeleft, right, up, down, more practical, the process of doing a lot of GAINS.
<? XML version = "1.0" encoding = "UTF-8"?>
<Mx: Application xmlns: MX = "http://www.adobe.com/2006/mxml"
Layout = "absolute" minwidth = "955" minheight = "600" Click = "application1_1_clickhandler (event)">
Import MX. events. deletevent;
Import MX. events. flexevent;
Public var fangxiang: Int = 0;
protected function mybtn_clickhandler (Event: mouseevent ): void
{< br> // todo auto-generated method stub
myblur. play ();
}
Protected function button#clickhandler (Event: mouseevent): void
{
// Todo auto-generated method stub
Mymove. Play ();
}
Protected function button2_clickhandler (Event: mouseevent): void
{
// Todo auto-generated method stub
If (mypnl. Visible)
{
Mypnl. setstyle ("hideeffect", myfadeout );
Mypnl. Visible = false;
}
Else
{
Mypnl. setstyle ("showeffect", myfadein );
Mypnl. Visible = true;
}
}
Protected function button3_mousedownhandler (Event: mouseevent): void
{
// Todo auto-generated method stub
Myglowdown. Play ();
}
protected function button3_mouseuphandler (Event: mouseevent): void
{< br> // todo auto-generated method stub
myglowup. play ();
}
protected function button4_clickhandler (Event: mouseevent): void
{< br> // todo auto-generated method stub
myresize1.addeventlistener (deletevent. effect_end, onend);
myresize1.play ();
}< br>
Protected function onend (Event: deletevent): void
{
Myresize2.play ();
}
Protected function button5_clickhandler (Event: mouseevent): void
{
// Todo auto-generated method stub
Myrotate. Play ();
}
Protected function button6_clickhandler (Event: mouseevent): void
{
// Todo auto-generated method stub
Myzoom. Play ();
}
Protected function button7_clickhandler (Event: mouseevent): void
{
// Todo auto-generated method stub
If (mypnl. Visible)
{
Mypnl. setstyle ("hideeffect", mywipeleft );
Mypnl. Visible = false;
}
Else
{
Mypnl. setstyle ("showeffect", mywiperight );
Mypnl. Visible = true;
}
This. fangxiang = 1;
// Mywipeleft. Play ();
}
Protected function button8_clickhandler (Event: mouseevent): void
{
// Todo auto-generated method stub
If (mypnl. Visible)
{
Mypnl. setstyle ("hideeffect", mywiperight );
Mypnl. Visible = false;
}
Else
{
Mypnl. setstyle ("showeffect", mywipeleft );
Mypnl. Visible = true;
}
This. fangxiang = 2;
}
Protected function button9_clickhandler (Event: mouseevent): void
{
// Todo auto-generated method stub
If (mypnl. Visible)
{
Mypnl. setstyle ("hideeffect", mywipeup );
Mypnl. Visible = false;
}
Else
{
Mypnl. setstyle ("showeffect", mywipedown );
Mypnl. Visible = true;
}
This. fangxiang = 3;
}
Protected function button10_clickhandler (Event: mouseevent): void
{
// Todo auto-generated method stub
If (mypnl. Visible)
{
Mypnl. setstyle ("hideeffect", mywipedown );
Mypnl. Visible = false;
}
Else
{
Mypnl. setstyle ("showeffect", mywipeup );
Mypnl. Visible = true;
}
This. fangxiang = 4;
}
Protected function button11_clickhandler (Event: mouseevent): void
{
// Todo auto-generated method stub
If (mypnl. Visible)
{
Mypnl. setstyle ("hideeffect", mywipeup );
Mypnl. Visible = false;
}
Else
{
Mypnl. setstyle ("showeffect", mywipedown );
Mypnl. Visible = true;
}
}
Protected function applicationappsclickhandler (Event: mouseevent): void
{
// Todo auto-generated method stub
If(event.tar get is button)
{
Return;
}
Switch (fangxiang)
{
Case 1:
Mypnl. setstyle ("hideeffect", mywipeleft );
Mypnl. Visible = false;
Break;
Case 2:
Mypnl. setstyle ("hideeffect", mywiperight );
Mypnl. Visible = false;
Break;
Case 3:
Mypnl. setstyle ("hideeffect", mywipeup );
Mypnl. Visible = false;
Break;
Case 4:
Mypnl. setstyle ("hideeffect", mywipedown );
Mypnl. Visible = false;
Break;
}
}
]>
</MX: SCRIPT>
<Mx: blur id = "myblur" target = "{mypnl}" blurxfrom = "20.0" blurxto = "0.0" Duration = "1000">
</MX: blur>
<Mx: Move id = "mymove" target = "{mypnl}" xfrom = "-250" xto = "0" Duration = "1000">
</MX: Move>
<Mx: fade id = "myfadeout" target = "{mypnl}" alphafrom = "1.0" alphato = "0.0" Duration = "1000">
</MX: fade>
<Mx: fade id = "myfadein" target = "{mypnl}" alphafrom = "0.0" alphato = "1.0" Duration = "1000">
</MX: fade>
<Mx: glow id = "myglowdown" target = "{mypnl}" alphafrom = "1.0" alphato = "0.1" Duration = "500" color = "# ff3b00">
</MX: glow>
<Mx: glow id = "myglowup" target = "{mypnl}" alphafrom = "0.1" alphato = "1.0" Duration = "1000" color = "# ff3b00">
</MX: glow>
<Mx: resize id = "myresize1" target = "{mypnl}" widthfrom = "250" widthto = "500" Duration = "2000">
</MX: resize>
<Mx: resize id = "myresize2" target = "{mypnl}" widthfrom = "500" widthto = "250" Duration = "2000">
</MX: resize>
<Mx: Rotate id = "myrotate" target = "{mypnl}" anglefrom = "0" angleto = "180" Duration = "1000">
</MX: Rotate>
<Mx: zoom id = "myzoom" target = "{mypnl}" zoomwidthfrom = "1" zoomwidthto = "0.5" zoomheightfrom = "1" zoomheightto = "0.5" Duration = "1000">
</MX: Zoom>
<Mx: wipeleft id = "mywipeleft" Duration = "1000">
</MX: wipeleft>
<Mx: wiperight id = "mywiperight" Duration = "1000">
</MX: wiperight>
<Mx: wipeup id = "mywipeup" Duration = "1000">
</MX: wipeup>
<Mx: wipedown id = "mywipedown" Duration = "1000">
</MX: wipedown>
<Mx: button x = "31" Y = "46" label = "Blur" id = "mybtn" Click = "mybtn_clickhandler (event)"/>
<Mx: panel X = "0" Y = "210" width = "250" Height = "200" layout = "absolute" id = "mypnl" visible = "false">
<Mx: Label x = "33" Y = "31" text = "label" width = "119" Height = "74"/>
<Mx: button x = "182" Y = "0" label = "close" Click = "button11_clickhandler (event)"/>
</MX: Panel>
<Mx: button x = "99" Y = "46" label = "move" Click = "button#clickhandler (event)"/>
<Mx: button x = "176" Y = "46" label = "Fade" Click = "button2_clickhandler (event)"/>
<Mx: buttons x = "247" Y = "46" label = "Glow" mousedown = "button3_mousedownhandler (event)" mouseup = "button3_mouseuphandler (event)"/>
<Mx: button x = "322" Y = "46" label = "resize" Click = "button4_clickhandler (event)"/>
<Mx: button x = "404" Y = "46" label = "Rotate" Click = "button5_clickhandler (event)"/>
<Mx: button x = "494" Y = "46" label = "zoom" Click = "button6_clickhandler (event)"/>
<Mx: button x = "32" Y = "116" label = "wipeleft" Click = "button7_clickhandler (event)"/>
<Mx: button x = "127" Y = "116" label = "wiperight" Click = "button8_clickhandler (event)"/>
<Mx: button x = "232" Y = "116" label = "wipeup" Click = "button9_clickhandler (event)"/>
<Mx: button x = "322" Y = "116" label = "wipedown" Click = "button10_clickhandler (event)"/>
<Mx: panel X = "463" Y = "330" width = "250" Height = "200" layout = "absolute">
</MX: Panel>
</MX: Application>