Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
ExternallInterface и swfobject 2.2 не работают в IE
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
dima.bezverkhiy@gmail.com  
View profile   Translate to Translated (View Original)
 More options Nov 17 2009, 12:54 pm
From: "dima.bezverk...@gmail.com" <dima.bezverk...@gmail.com>
Date: Tue, 17 Nov 2009 09:54:07 -0800 (PST)
Local: Tues, Nov 17 2009 12:54 pm
Subject: ExternallInterface и swfobject 2.2 не работают в IE
Выпадает ошибка
Object doesn't support this property or method

В остальных браузерах всё ок.
Пол дня бьюсь не могу понять, что такое. Подскажите.

Код флешки

package  {
        import flash.display.Sprite;
        import flash.events.Event;
        import flash.events.IOErrorEvent;
        import flash.events.ProgressEvent;
        import flash.external.ExternalInterface;
        import flash.media.Sound;
        import flash.media.SoundChannel;
        import flash.net.URLRequest;

        public class MicroPlayer extends Sprite {
                private var sound : Sound;
                private var channel:SoundChannel = new SoundChannel();

                public function MicroPlayer() {
                        if (ExternalInterface.available) {
                                try  {
                                        ExternalInterface.addCallback('play', startPlaying);
                                        ExternalInterface.addCallback('stop', stopPlaying);
                                }
                                catch (error:SecurityError) {
                    throw error;
                } catch (error:Error) {
                    throw error;
                }

                        }
                }

                private function stopPlaying() : void {
                        channel.stop();
                }

                private function startPlaying(url : String) : void {
                        sound = null;
                        sound = new Sound();
                        sound.addEventListener(IOErrorEvent.IO_ERROR, onErrorHandler);
                        sound.addEventListener(ProgressEvent.PROGRESS, onProgress);
                        try {
                                sound.load(new URLRequest(url));
                                channel = sound.play();
                                channel.addEventListener(Event.SOUND_COMPLETE,
onSoundComplete);
                        }
                        catch(err : Error) {
                                onErrorHandler(null);
                        }
                }

                private function onProgress(event : ProgressEvent) : void {

                }

                private function onSoundComplete(event : Event) : void {
                        ExternalInterface.call('end');
                }

                private function onErrorHandler(event : IOErrorEvent) : void {
                        ExternalInterface.call('soundError');
                }
        }

}

Код страницы

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<!--[if IE]><script type="text/javascript" src="http://getfirebug.com/
releases/lite/1.2/firebug-lite-compressed.js"></script><![endif]-->
<script type="text/javascript" src="swfobject.js"></script>
<script>
flashVars = {};
params = {allowScriptAccess: "always"};
attributes = {};
function end () {alert("end");}

function soundError () {alert("soundError");}

function playSound() {
        document.getElementById("microPlayer").play("Alenka.mp3");

}

swfobject.addDomLoadEvent(function () {swfobject.embedSWF
("MicroPlayer.swf","microPlayer","100","100","10.0.0","expressInstall.swf", flashVars,params,attributes);});
</script>
</head>

<body>
<div id="microPlayer">
</div>
<a rel="Alenka.mp3" onClick="playSound()">Play</a>

</body>
</html>


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dima.bezverkhiy@gmail.com  
View profile   Translate to Translated (View Original)
 More options Nov 17 2009, 2:45 pm
From: "dima.bezverk...@gmail.com" <dima.bezverk...@gmail.com>
Date: Tue, 17 Nov 2009 11:45:21 -0800 (PST)
Local: Tues, Nov 17 2009 2:45 pm
Subject: Re: ExternallInterface и swfobject 2.2 не работают в IE
Проблема решилась.

заменой
ExternalInterface.addCallback('play', startPlaying);
ExternalInterface.addCallback('stop', stopPlaying);
на
ExternalInterface.addCallback('playSound', startPlaying);
ExternalInterface.addCallback('stopSound', stopPlaying);

Оказалось, что для флешки в IE нельзя добавлять метод play, наверное,
уже есть такой.
Ввело в заблуждение, то что во всех других браузерах всё работало ок.


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
foreground  
View profile   Translate to Translated (View Original)
 More options Nov 18 2009, 1:29 am
From: foreground <foreground....@gmail.com>
Date: Wed, 18 Nov 2009 11:29:02 +0500
Local: Wed, Nov 18 2009 1:29 am
Subject: Re: [ruFlash] Re: ExternallInterface и swfobject 2.2 не работают в IE

> dima.bezverk...@gmail.com:
> Проблема решилась.

У нас такой же косяк постоянно получается. И дело не в названиях
методов. Что делать не понятно. Есть версия, что проблема в очистках
кэша и антивирусе или и вовсе в плагине.

    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dima.bezverkhiy@gmail.com  
View profile   Translate to Translated (View Original)
 More options Nov 18 2009, 8:46 am
From: "dima.bezverk...@gmail.com" <dima.bezverk...@gmail.com>
Date: Wed, 18 Nov 2009 05:46:35 -0800 (PST)
Local: Wed, Nov 18 2009 8:46 am
Subject: Re: ExternallInterface и swfobject 2.2 не работают в IE

> У нас такой же косяк постоянно получается. И дело не в названиях
> методов. Что делать не понятно. Есть версия, что проблема в очистках
> кэша и антивирусе или и вовсе в плагине.

Оказывается не решилась. Вчера всё работало. Сегодня уже нет.
Чертовщина, какая-то.

Пробовали отлаживать Визуал студией, она хорошо показывает
динамический код создаваемый, в ИЕ.
Обычно проблема возникала, на этапе добавления коллбека. А теперь
каждый раз в разных местах.


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alexey Hodkov  
View profile   Translate to Translated (View Original)
 More options Nov 20 2009, 8:25 am
From: Alexey Hodkov <alexey.hod...@gmail.com>
Date: Fri, 20 Nov 2009 16:25:39 +0300
Local: Fri, Nov 20 2009 8:25 am
Subject: Re: [ruFlash] Re: ExternallInterface и swfobject 2.2 не работают в IE

Мне кажется дело в html.

getElementById("microPlayer") обращается к диву. А нужен еще id у самого
объекта в параметрах (к которому обращение будет).
И эти id должны быть разными.


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google