AS2 Full-screen adaptive

Source: Internet
Author: User

function Move (obj, to_x, to_y, duration) {var _loc2 = new Mx.transitions.Tween (obj, "_x", Mx.transitions.easing.Strong.    EaseOut, Obj._x, to_x, duration, false);    _loc2.start ();    var _loc3 = new Mx.transitions.Tween (obj, "_y", Mx.transitions.easing.Strong.easeOut, Obj._y, To_y, duration, false); _loc3.start ();}    End of the Functionfunction topcenter (obj, to_x, to_y, duration) {var _loc4 = stage.width;    var _loc7 = obj._width;    to_x = to_x + (_loc4-_loc7)/2;    to_y = to_y + 0;    var _loc5 = new Mx.transitions.Tween (obj, "_x", Mx.transitions.easing.Strong.easeOut, Obj._x, to_x, duration, false);    _loc5.start ();    var _loc6 = new Mx.transitions.Tween (obj, "_y", Mx.transitions.easing.Strong.easeOut, Obj._y, To_y, duration, false); _loc6.start ();}    End of the Functionfunction bottomcenter (obj, to_x, to_y, duration) {var _loc5 = stage.width;    var _loc4 = stage.height;    var _loc9 = obj._width;    var _loc8 = obj._height; to_x = to_x + (_LOC5-_loc9)/ 2;    To_y = to_y + (_loc4-_LOC8);    var _loc6 = new Mx.transitions.Tween (obj, "_x", Mx.transitions.easing.Strong.easeOut, Obj._x, to_x, duration, false);    _loc6.start ();    var _loc7 = new Mx.transitions.Tween (obj, "_y", Mx.transitions.easing.Strong.easeOut, Obj._y, To_y, duration, false); _loc7.start ();}    End of the Functionfunction Center (obj, to_x, to_y, duration) {var _loc5 = stage.width;    var _loc4 = stage.height;    var _loc9 = obj._width;    var _loc8 = obj._height;    to_x = to_x + (_LOC5-_loc9)/2;    To_y = to_y + (_loc4-_LOC8)/2;    var _loc6 = new Mx.transitions.Tween (obj, "_x", Mx.transitions.easing.Strong.easeOut, Obj._x, to_x, duration, false);    _loc6.start ();    var _loc7 = new Mx.transitions.Tween (obj, "_y", Mx.transitions.easing.Strong.easeOut, Obj._y, To_y, duration, false); _loc7.start ();}    End of the Functionfunction Center2 (obj, to_x, to_y, To_width, To_height, duration) {var _loc5 = stage.width;    var _loc4 = stage.height; VaR _loc9 = to_width;    var _loc8 = to_height;    to_x = to_x + (_LOC5-_loc9)/2;    To_y = to_y + (_loc4-_LOC8)/2;    var _loc6 = new Mx.transitions.Tween (obj, "_x", Mx.transitions.easing.Strong.easeOut, Obj._x, to_x, duration, false);    _loc6.start ();    var _loc7 = new Mx.transitions.Tween (obj, "_y", Mx.transitions.easing.Strong.easeOut, Obj._y, To_y, duration, false); _loc7.start ();} End of the Functionstop (); Stage.align = "TL"; Stage.scalemode = "Noscale"; var ReSizer = new Object ();    Resizer.onresize = function () {var _loc1 = 20; Center2 (laoding, 0, 0, 275, _loc1);}; Stage.addlistener (ReSizer); Resizer.onresize ();

  

AS2 Full-screen adaptive

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.