Форум 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)
-   -   миграция исходника flash5 - flash8 (http://www.flasher.ru/forum/showthread.php?t=114383)

lakehouse 27.07.2008 21:34

миграция исходника flash5 - flash8
 
Вложений: 1
исходник ведёт себя абсолютно по-разному во флэш 5, 6 и 8.
видимо из-за аттачей из библиотеки и глубин.
как его заставить нормально публиковаться в 8ой версии?

кода мало, он такой:

Код:

var c = 0;
branches = 3
MovieClip.prototype.rand = function(num){
        if (arguments.length == 1) return Math.floor(Math.random()*num) + 1
        return Math.floor(Math.random()*(Math.abs(arguments[1] - num)+1)) + Math.min(num,arguments[1])
}
MovieClip.prototype.Plant = function(count){
        this.attachMovie("stem","stem"+ ++depth,depth)
        clip = this["stem"+ depth]
        clip.level = 1
        clip.stump = this
}
MovieClip.prototype.Grow = function(linker, count){
        for(i=0;i<count;i++){
                stump.attachMovie(linker, linker+ ++stump.depth,stump.depth)
                clip = stump[linker+ stump.depth]
                clip.level = level + 1
                clip.stump = stump
                clip._xscale = clip._yscale =_xscale * .73
                if(i==0){
                        clip._rotation = rand(-95,-50)
                }else if(i==1){
                        clip._rotation = rand(-45,30)
                }else if(i==2){
                        clip._rotation = rand(35,95)
                }
                if(clip.level>5){
                        clip._rotation = rand(-125,125)
                }
                angle = (_rotation+90) * Math.PI/180
                clip._x = _x - Math.cos(angle)*.5*_xscale
                clip._y = _y - Math.sin(angle)*.5*_xscale
        }
}

и в библиотеке на символе:

Код:

stop()
if (level < 7) Grow("stem", _root.branches)
else
Grow("brush", 1)



спасибо

lakehouse 28.07.2008 13:39

вопрос закрыт
 
Вложений: 1
разобрался - переделал.
спасибо http://www.kirupa.com/
прикрепляю кому надо


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

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