![]() |
mc.startDrag(); и startDrag(mc); - это разные вещи?
Т.е. работают по разному?! :eek: :wacko:
|
А где Вы нашли startDrag(mc) ? ))))
|
Цитата:
startDrag(target:Object, [lock:Boolean, left:Number, top:Number, right:Number, bottom:Number]) : Void Makes the target movie clip draggable while the movie plays. Only one movie clip can be dragged at a time. After a startDrag() operation is executed, the movie clip remains draggable until it is explicitly stopped by stopDrag() or until a startDrag() action for another movie clip is called. Availability: ActionScript 1.0; Flash Player 4 Parameters target:Object - The target path of the movie clip to drag. lock:Boolean [optional] - A Boolean value specifying whether the draggable movie clip is locked to the center of the mouse position (true ) or locked to the point where the user first clicked the movie clip (false ). left,top,right,bottom:Number [optional] - Values relative to the coordinates of the movie clip's parent that specify a constraint rectangle for the movie clip. Example The following example creates a movie clip, pic_mc, at runtime that users can drag to any location by attaching the startDrag() and stopDrag() actions to the movie clip. An image is loaded into pic_mc using the MovieClipLoader class. Код:
var pic_mcl:MovieClipLoader = new MovieClipLoader(); |
Так, и в чем Вы увидели разницу? Этот вариант - с использованием глобального метода, а не метода класса MovieClip. У меня работает совершенно одинаково в этом примере что startDrag(this); что this.startDrag();
|
Разница в синтаксисе - this.startDrag(); - в 4 плеере не работал. startDrag(this); - Оставлен в 5 и up для обратной совместимости. Также как и все setProperty.
|
Цитата:
т.е. при замене строчки mc.startDrag(); на строчку startDrag(mc); получается совсем не то, что ожидалось...)) |
Цитата:
|
Цитата:
могу куда-нибудь скинуть, если интересно..)) просто нет времени сейчас резать скрипты, чтобы в форум доступно выложить..)) |
| Часовой пояс GMT +4, время: 22:48. |
Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.