![]() |
|
||||||||||
|
|||||
|
Регистрация: Dec 2005
Сообщений: 2
|
Здравствуйте!
Переделал одну флэшку под свой нужды. Никак не могу найти, где выставляется исходный размер картинок при загрузки (при наведение на картинки они приходят в оригинальный размер) и отступы между картинками. Помогите пожалуйста люди добрые ![]() Заранее большое спасибо! Вот код: MovieClip.prototype.linearTween = function (t, b, c, d) { return (c * t / d + b); }; MovieClip.prototype.easeInQuad = function (t, b, c, d) { t = t / d; return (c * t * t + b); }; MovieClip.prototype.easeOutQuad = function (t, b, c, d) { t = t / d; return (-c * t * (t - 2) + b); }; MovieClip.prototype.easeInOutQuad = function (t, b, c, d) { t = t / (d / 2); if (t < 1) { return (c / 2 * t * t + b); } return (-c / 2 * (--t * (t - 2) - 1) + b); }; MovieClip.prototype.easeInCubic = function (t, b, c, d) { t = t / d; return (c * t * t * t + b); }; MovieClip.prototype.easeOutCubic = function (t, b, c, d) { t = t / d - 1; return (c * (t * t * t + 1) + b); }; MovieClip.prototype.easeInOutCubic = function (t, b, c, d) { t = t / (d / 2); if (t < 1) { return (c / 2 * t * t * t + b); } // end if t = t - 2; return (c / 2 * (t * t * t + 2) + b); }; MovieClip.prototype.easeInQuart = function (t, b, c, d) { t = t / d; return (c * t * t * t * t + b); }; MovieClip.prototype.easeOutQuart = function (t, b, c, d) { t = t / d - 1; return (-c * (t * t * t * t - 1) + b); }; MovieClip.prototype.easeInOutQuart = function (t, b, c, d) { t = t / (d / 2); if (t < 1) { return (c / 2 * t * t * t * t + b); } t = t - 2; return (-c / 2 * (t * t * t * t - 2) + b); }; MovieClip.prototype.easeInQuint = function (t, b, c, d) { t = t / d; return (c * t * t * t * t * t + b); }; MovieClip.prototype.easeOutQuint = function (t, b, c, d) { t = t / d - 1; return (c * (t * t * t * t * t + 1) + b); }; MovieClip.prototype.easeInOutQuint = function (t, b, c, d) { t = t / (d / 2); if (t < 1) { return (c / 2 * t * t * t * t * t + b); } t = t - 2; return (c / 2 * (t * t * t * t * t + 2) + b); }; MovieClip.prototype.easeInSine = function (t, b, c, d) { return (-c * Math.cos(t / d * 1.570796E+000) + c + b); }; MovieClip.prototype.easeOutSine = function (t, b, c, d) { return (c * Math.sin(t / d * 1.570796E+000) + b); }; MovieClip.prototype.easeInOutSine = function (t, b, c, d) { return (-c / 2 * (Math.cos(3.141593E+000 * t / d) - 1) + b); }; MovieClip.prototype.easeInExpo = function (t, b, c, d) { return (t == 0 ? (b) : (c * Math.pow(2, 10 * (t / d - 1)) + b)); }; MovieClip.prototype.easeOutExpo = function (t, b, c, d) { return (t == d ? (b + c) : (c * (-Math.pow(2, -10 * t / d) + 1) + b)); }; MovieClip.prototype.easeInOutExpo = function (t, b, c, d) { if (t == 0) { return (b); } if (t == d) { return (b + c); } t = t / (d / 2); if (t < 1) { return (c / 2 * Math.pow(2, 10 * (t - 1)) + b); } return (c / 2 * (-Math.pow(2, -10 * --t) + 2) + b); }; MovieClip.prototype.easeInCirc = function (t, b, c, d) { t = t / d; return (-c * (Math.sqrt(1 - t * t) - 1) + b); }; MovieClip.prototype.easeOutCirc = function (t, b, c, d) { t = t / d - 1; return (c * Math.sqrt(1 - t * t) + b); }; MovieClip.prototype.easeInOutCirc = function (t, b, c, d) { t = t / (d / 2); if (t < 1) { return (-c / 2 * (Math.sqrt(1 - t * t) - 1) + b); } t = t - 2; return (c / 2 * (Math.sqrt(1 - t * t) + 1) + b); }; import flash.display.*; loadLogo = function () { var cl = ico.duplicateMovieClip("ico" + nr, nr); icoArr.push(cl); cl.n = curArr[nr][2]; var ml = new MovieClipLoader(); var ll = new Object(); ll.onLoadInit = function (tmc, status) { tmc._alpha = 100; tmc._x = 0; tmc._y = 0; var img = new BitmapData(tmc._width, tmc._height, false, 0); img.draw(tmc._parent); var l = tmc._parent.createEmptyMovieClip("logo_up", 1); l.attachBitmap(img, 1, "auto", true); l._x = -l._width / 2; var h = l._height; l._y = -h; tmc._visible = false; var base = tmc._parent._parent; var t = new mx.transitions.Tween(base, "_x", mx.transitions.easing.Strong.easeOut, 0, nr * step + step / 2, 1, true); _root.soundEvent("brand_show"); var r = l.createEmptyMovieClip("rover", 200); with (r) { beginFill(16777215, 0); moveTo(-20, -300); lineTo(l._width + 100, -100); lineTo(l._width + 1000, l._height + 100); lineTo(-1000, l._height + 1000); lineTo(-1000, -1000); } prep(r); var txt = base.attachMovie("txt", "txt", 50); txt.txtF.text = base.nm.toUpperCase(); txt.txtF.autoSize = "center"; txt._y = 100; txt._visible = false; l.x = l._x; mir.x = mir._x; ++nr; loadLogo(); }; ml.addListener(ll); if (curArr[nr][1] != undefined) { var lnk = curArr[nr][1]; cl.gfx.holder._alpha = 0; ml.loadClip(lnk, cl.gfx.holder); cl.nm = curArr[nr][0]; } else { initMouse(); } }; nr =0; var curArr = []; var icoArr = []; my_xml = new XML(); my_xml.ignoreWhite = true; if (_root.xmlUrl == undefined) { my_xml.load("main.xml"); } else { my_xml.load(_root.xmlUrl); } my_xml.onLoad = function (loaded) { if (loaded) { xmlNode = this.childNodes[0].childNodes; var len = xmlNode.length; if (_root.bgWidth != undefined) { _root.brandsC.bgnd._width = 100; _root.brandsC.step = 100; } else { _root.brandsC.step = _root.brandsC.bgnd._width / len; } for (var i=0; i<=xmlNode.length;i++) { if (i<xmlNode.length) { var rArr = []; rArr[0] = xmlNode[i].attributes.iname; rArr[1] = xmlNode[i].attributes.iurl; rArr[2] = xmlNode[i].attributes.ilink; _root.brandsC.curArr[i] = rArr; } else { loadLogo(); } } } else { trace ("file not loaded!"); } }; initMouse = function () { onMouseMove = function () { if (this.bgnd.hitTest(_root._xmouse, _root._ymouse, true)) { over = true; for (var _loc5 in icoArr) { var _loc4 = icoArr[_loc5]; render(_loc4); } } else if (over == true) { over = false; for (var _loc2 in icoArr) { var _loc1 = icoArr[_loc2]; _loc1.twx = new mx.transitions.Tween(_loc1, "_xscale", mx.transitions.easing.Back.easeOut, _loc1._xscale, 100, 9, false); _loc1.twy = new mx.transitions.Tween(_loc1, "_yscale", mx.transitions.easing.Back.easeOut, _loc1._yscale, 100, 9, false); _loc1.transX = new mx.transitions.Tween(_loc1.gfx, "_x", mx.transitions.easing.Back.easeOut, _loc1.gfx._x, 0, 9, false); _loc1.transX2 = new mx.transitions.Tween(_loc1.mir, "_x", mx.transitions.easing.Back.easeOut, _loc1.mir._x, 0, 9, false); } } }; }; render = function (cl) { if (!over) { return; } var _loc4 = cl._x - cl._parent._xmouse; var _loc6 = _loc4 > 0 ? (1) : (-1); var _loc5 = Math.abs(_loc4); if (_loc6 > 0) { if (_loc4 < 250) { var _loc3 = easeOutCubic(_loc4, 100, -50, 250); } else { _loc3 = 50; } } else if (_loc4 > -250) { _loc3 = easeOutCubic(_loc4, 100, -50, -250); } else { _loc3 = 50; } /**/if (_loc5 > 100 && _loc5 < 900) { var _loc1 = easeInOutExpo(_loc5/2, 70, -100, 200); } else if (_loc5 <= 100) { _loc1 = easeOutSine(_loc5, 0, 70, 100); } else { _loc1 = 0; } _loc1 = _loc1 * _loc6; cl._yscale = cl._xscale = _loc3; cl.gfx._x = _loc1; }; prep = function (cl) { cl.onRollOver = function () { var _loc3 = new GlowFilter(16777215, 1, 15, 15, 1, 3); this._parent.filters = [_loc3]; _root.soundEvent("rollOver"); this._parent._parent._parent.txt._visible = true; }; cl.onRollOut = function () { this._parent.filters = []; this._parent._parent._parent.txt._visible = false; }; cl.onPress = function () { var _loc3 = this._parent._parent._parent.n; getURL(_loc3); }; }; |
|
|||||
|
Регистрация: Dec 2006
Сообщений: 1,764
|
оу, кроме ужастного кода, так это еще и декомпилированая фигня, противоречит это пункту 3 правил, данного форума
__________________
а за окном атлантический океан! |
![]() |
![]() |
Часовой пояс GMT +4, время: 07:32. |
|
|
« Предыдущая тема | Следующая тема » |
| Опции темы | |
| Опции просмотра | |
|
|