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

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

Версия для печати  Отправить по электронной почте    « Предыдущая тема | Следующая тема »  
Опции темы Опции просмотра
 
Создать новую тему Ответ
Старый 21.07.2006, 20:50
Inverse_Design вне форума Посмотреть профиль Отправить личное сообщение для Inverse_Design Найти все сообщения от Inverse_Design
  № 1  
Ответить с цитированием
Inverse_Design
[+1.3 28.06.06]

Регистрация: May 2006
Сообщений: 60
По умолчанию Траблы SWFObject, не видно флехи в HTML-ке!!!

Цель такова, нужно создать хтмл page, в которой находиться флеха, то есть нужно:
- проверить версию флеш плеера у клиена;
- если версия плеера ниже 8-й, выполняеться сам expressInstall с корорым разбираюсь, обновление плеера до нужной версии и перегрузка сайта, reload...

html код...
Код:
<div align="center" id "flashcontent"></div>
<script type="text/javascript" src="swfobject.js"></script>         
<script type="text/javascript">
  var so = new SWFObject("efi-trance.swf","myFlashMovie","768","800","8","#FFFFFF",true);
  so.write("flashcontent");
</script>
fla код...
в первом кадре
Код:
#include "expressinstall.as"
Описание файла expressinstall.as:
Код:
var ExpressInstall = function():Void {
    // does the user need to update?
    this.needsUpdate = (_root.MMplayerType == undefined) ? false : true;
}

ExpressInstall.prototype = {
    init: function():Boolean {
        if (this.needsUpdate) {
            this.loadUpdater();
            return true;
        } else {
            return false;
        }
    },

    loadUpdater: function():Void {
        System.security.allowDomain("fpdownload.macromedia.com");

        // hope that nothing is at a depth of 10000000, you can change this depth if needed, but you want
        // it to be on top of your content if you have any stuff on the first frame
        this.updater = _root.createEmptyMovieClip("expressInstallHolder", 10000000);
        
        // register the callback so we know if they cancel or there is an error
        var _self = this;
        this.updater.installStatus = _self.onInstallStatus;
        this.hold = this.updater.createEmptyMovieClip("hold", 1);

        // can't use movieClipLoader because it has to work in 6.0.65
        this.updater.onEnterFrame = function():Void {
        if (typeof this.hold.startUpdate == 'function') {
                _self.initUpdater();
                this.onEnterFrame = null;
            }
        }

        var cacheBuster:Number = Math.random();
        this.hold.loadMovie("http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?"+ cacheBuster);
    },

    initUpdater: function():Void {
        this.hold.redirectURL = _root.MMredirectURL;
        this.hold.MMplayerType = _root.MMplayerType;
        this.hold.MMdoctitle = _root.MMdoctitle;
        this.hold.startUpdate();
    },

    onInstallStatus: function(msg):Void {
        if (msg == "Download.Complete") {
            // Installation is complete. In most cases the browser window that this SWF 
            // is hosted in will be closed by the installer or manually by the end user
        } else if (msg == "Download.Cancelled") {
            // The end user chose "NO" when prompted to install the new player
            // by default no User Interface is presented in this case. It is left up to 
            // the developer to provide an alternate experience in this case

            // feel free to change this to whatever you want, js errors are sufficient for this example
            getURL("javascript:alert('This content requires a more recent version of the Macromedia Flash Player.')");
        } else if (msg == "Download.Failed") {
            // The end user failed to download the installer due to a network failure
            // by default no User Interface is presented in this case. It is left up to 
            // the developer to provide an alternate experience in this case

            // feel free to change this to whatever you want, js errors are sufficient for this example
            getURL("javascript:alert('There was an error downloading the Flash Player update. Please try again later, or visit macromedia.com to download the latest version of the Flash plugin.')");
        }
    }
}

Помогите, я пока в away...далее буду разбираться, мож поможете будет быстрее...

P.S. Вопрос к знатокам =)

Старый 21.07.2006, 21:23
Inverse_Design вне форума Посмотреть профиль Отправить личное сообщение для Inverse_Design Найти все сообщения от Inverse_Design
  № 2  
Ответить с цитированием
Inverse_Design
[+1.3 28.06.06]

Регистрация: May 2006
Сообщений: 60
Тот кто юзал SWFObject Им файлик этот не нужен, он наверняка у них есть, как же без него, кто не знает что такое = swfobject.js, в топик не отписывать -)))

Создать новую тему Ответ Часовой пояс GMT +4, время: 11:53.
Быстрый переход
  « Предыдущая тема | Следующая тема »  
Опции темы
Опции просмотра

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

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


 


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


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