Форум Flasher.ru
Ближайшие курсы в Школе RealTime
Список интенсивных курсов: [см.]  
  
Специальные предложения: [см.]  
  
 
Блоги Правила Справка Пользователи Календарь Поиск рулит! Сообщения за день Все разделы прочитаны
 

Вернуться   Форум Flasher.ru > Flash > ActionScript 1.0/2.0

Версия для печати  Отправить по электронной почте    « Предыдущая тема | Следующая тема »  
Опции темы Опции просмотра
 
Создать новую тему  
Старый 09.03.2010, 12:56
wvxvw вне форума Посмотреть профиль Отправить личное сообщение для wvxvw Найти все сообщения от wvxvw
  № 19  
Ответить с цитированием
wvxvw
Modus ponens
 
Аватар для wvxvw

модератор форума
Регистрация: Jul 2006
Адрес: #1=(list #1#)
Сообщений: 8,049
Записей в блоге: 38
Код:
movie 'loop.swf' // flash 9, total frames: 1, frame rate: 12 fps, 550x400 px


  frame 0
    constants 'a', 'b', 'i', 'k', 'Math', 'random', 'round', 'sumA', 'sumB', 'sumA ', ' sumB '  
    push 'a', 0.0, 0.0, 0.0, 0.0, 0.0, 5
    initArray
    varEquals
    push 'b', 0.0, 0.0, 0.0, 0.0, 0.0, 5
    initArray
    varEquals
    push 'i', 0.0
    varEquals
   label1:
    push 'i'
    getVariable
    push 100
    lessThan
    not
    branchIfTrue label2
    push 'k', 0.0, 'Math'
    getVariable
    push 'random'
    callMethod
    push 4
    multiply
    push 1, 'Math'
    getVariable
    push 'round'
    callMethod
    varEquals
    push 'b'
    getVariable
    push 'k'
    getVariable
    push 'b'
    getVariable
    push 'k'
    getVariable
    getMember
    increment
    setMember
    push 'a'
    getVariable
    push 0.0, 'Math'
    getVariable
    push 'random'
    callMethod
    push 4
    multiply
    push 1, 'Math'
    getVariable
    push 'round'
    callMethod
    push 'a'
    getVariable
    push 0.0, 'Math'
    getVariable
    push 'random'
    callMethod
    push 4
    multiply
    push 1, 'Math'
    getVariable
    push 'round'
    callMethod
    getMember
    increment
    setMember
    push 'i', 'i'
    getVariable
    increment
    setVariable
    branch label1
   label2:
    push 'sumA', 0.0
    varEquals
    push 'sumB', 0.0
    varEquals
    push 'i', 0.0
    setVariable
   label3:
    push 'i'
    getVariable
    push 5
    lessThan
    not
    branchIfTrue label4
    push 'sumA', 'sumA'
    getVariable
    push 'a'
    getVariable
    push 'i'
    getVariable
    getMember
    add
    setVariable
    push 'sumB', 'sumB'
    getVariable
    push 'b'
    getVariable
    push 'i'
    getVariable
    getMember
    add
    setVariable
    push 'i', 'i'
    getVariable
    increment
    setVariable
    branch label3
   label4:
    push 'sumA ', 'sumA'
    getVariable
    add
    push ' sumB '
    add
    push 'sumB'
    getVariable
    add
    trace
  end // of frame 0
end
Это вот что получается после компиляции - ну, давайте попробуем разобраться

Не знаю, я не вижу почему бы второй вариант должен так странно себя вести, скорее всего - баг плеера а не компилятора. (Хотя первый вариант все равно оптимальнее).
__________________
Hell is the possibility of sanity


Последний раз редактировалось wvxvw; 09.03.2010 в 13:08.
Создать новую тему   Часовой пояс GMT +4, время: 15:31.
Быстрый переход
  « Предыдущая тема | Следующая тема »  
Опции темы
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.


 


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


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