Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript 1.0/2.0 (http://www.flasher.ru/forum/forumdisplay.php?f=93)
-   -   проблема с AS твином (http://www.flasher.ru/forum/showthread.php?t=73037)

benladen 11.12.2005 02:33

проблема с AS твином
 
2 вопроса:
1. выдает ошибку, хотя все работает:

делаю
import mx.transitions.*;

this.slides_mc1.holder0.onRollOver = function (){
var tween_handler:Object = new mx.transitions.Tween(slides_mc1.holder0, "_xscale", mx.transitions.easing.Zoom, slides_mc1.holder0._xscale, 120, 2, true);
var tween_handler2:Object = new mx.transitions.Tween(slides_mc1.holder0, "_yscale", mx.transitions.easing.Zoom, slides_mc1.holder0._xscale, 120, 2, true);
};

this.slides_mc1.holder0.onRollOut = function (){
var tween_handler:Object = new mx.transitions.Tween(slides_mc1.holder0, "_xscale", mx.transitions.easing.Zoom, slides_mc1.holder0._xscale, 100, 2, true);
var tween_handler2:Object = new mx.transitions.Tween(slides_mc1.holder0, "_yscale", mx.transitions.easing.Zoom, slides_mc1.holder0._xscale, 100, 2, true);
};

ОШИБКА:
**Warning** Scene=Scene 1, layer=Layer 18, frame=1:Line 275: There is no class or package with the name 'mx.transitions.easing.Zoom' found in package 'mx.transitions.easing'.
var tween_handler:Object = new mx.transitions.Tween(slides_mc1.holder0, "_xscale", mx.transitions.easing.Zoom, slides_mc1.holder0._xscale, 120, 2, true);

**Warning** Scene=Scene 1, layer=Layer 18, frame=1:Line 276: There is no class or package with the name 'mx.transitions.easing.Zoom' found in package 'mx.transitions.easing'.
var tween_handler2:Object = new mx.transitions.Tween(slides_mc1.holder0, "_yscale", mx.transitions.easing.Zoom, slides_mc1.holder0._xscale, 120, 2, true);

**Warning** Scene=Scene 1, layer=Layer 18, frame=1:Line 280: There is no class or package with the name 'mx.transitions.easing.Zoom' found in package 'mx.transitions.easing'.
var tween_handler:Object = new mx.transitions.Tween(slides_mc1.holder0, "_xscale", mx.transitions.easing.Zoom, slides_mc1.holder0._xscale, 100, 2, true);

**Warning** Scene=Scene 1, layer=Layer 18, frame=1:Line 281: There is no class or package with the name 'mx.transitions.easing.Zoom' found in package 'mx.transitions.easing'.
var tween_handler2:Object = new mx.transitions.Tween(slides_mc1.holder0, "_yscale", mx.transitions.easing.Zoom, slides_mc1.holder0._xscale, 100, 2, true);

Total ActionScript Errors: 4 Reported Errors: 4
---------------------------
2. как можно зумищейся мувик расширять от центра? пробывал делать центровку 1 мува (отдельного) - все получается, но т.к. у меня 4 холдера в 1 мувике, то ничерта не получается. что делать, подскажите плиз.

спасибо

MOHCTEP 11.12.2005 03:31

Надо так:
Код:

import mx.transitions.*;

this.slides_mc1.holder0.onRollOver = function (){
var tween_handler:Object = new Tween(this, "_xscale", easing.Zoom, this._xscale, 120, 2, true);
var tween_handler2:Object = new Tween(this, "_yscale", easing.Zoom, this._xscale, 120, 2, true);
};

this.slides_mc1.holder0.onRollOut = function (){
var tween_handler:Object = new Tween(this, "_xscale", easing.Zoom, this._xscale, 100, 2, true);
var tween_handler2:Object = new Tween(this, "_yscale", easing.Zoom, this._xscale, 100, 2, true);
};

Должно заработать.
И еще: импортируй конкретный класс, который пользуешь - нагрузку уменьшишь.
Код:

import mx.transitions.Tween;

Antares 11.12.2005 08:13

Цитата:

Сообщение от MOHCTEP
И еще: импортируй конкретный класс, который пользуешь - нагрузку уменьшишь.
Код:

import mx.transitions.Tween;

Не нагрузку, а объем результирующего файла (хотя не всегда, кстати) и время компиляции.

Nirth 11.12.2005 14:06

Импортируються только используемые классы, так что объем результирующего файла флэшу по боку(правда не знаю как делает МТАСК).

MOHCTEP 11.12.2005 17:19

Вложений: 1
2 Antares, 2 Nirth
Уж не знаю, чего там уменьшается? Но вот сэмплик, там все в комментах.
Посмотрите, объясните пожалуйста. (МХ2004) У меня получается 2 разных варианта при компиляции.

Nirth 11.12.2005 18:07

у меня нету RAR'а

Марк 11.12.2005 18:21

Вложений: 1
Цитата:

Сообщение от Nirth
у меня нету RAR'а

А как же ты без рар'a живешь ? _))

Antares 11.12.2005 20:17

Замечал не раз, что объем может варьироваться, хотя компилируются по идее только нужные. Но это уже отдельная тема. А эта тема закрыта.

Antares 11.12.2005 20:18

Цитата:

Сообщение от Марк
А как же ты без рар'a живешь ? _))

Я даже без The Bat живу, представляешь? :D


Часовой пояс GMT +4, время: 12:50.

Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.