![]() |
|
| Правила Форума редакция от 22.06.2020 |
|
|||||||
|
|
Окажите посильную поддержку, мы очень надеемся на вас. Реквизиты для переводов ниже. |
|
![]() |
|
|
Опции темы | Опции просмотра |
Language
|
|
|
#1
|
|
Неактивный пользователь
Пол:
Регистрация: 05.08.2007
Сообщений: 51
Репутация: 6
|
Хочу на ДЛЕ движок прикрутить плеер- но не работает кнопа сохранить! Почему?
![]() вот плеер с кнопкой СОХРАНИТЬ, но не сохраняет, а просто открывается окошко и при нажатие сохранить окошко закрывается... mp3.swf Код:
return "<!--dle_audio_begin:{$url}--><object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" \"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"275\" height=\"50\">
<param name=\"movie\" value=\"".$config['http_home_url']."engine/classes/flashplayer/mp3.swf?mp3url={$url}&txt={$txt}&bgcolor=#ffffff\" />
<param name=\"allowFullScreen\" value=\"true\" />
<param name=\"quality\" value=\"high\" />
<param name=\"bgcolor\" value=\"#ffffff\" />
<param name=\"wmode\" value=\"opaque\" />
<embed src=\"".$config['http_home_url']."engine/classes/flashplayer/mp3.swf?mp3url={$url}&txt={$txt}&bgcolor=#ffffff\" quality=\"high\" bgcolor=\"#ffffff\" wmode=\"opaque\" width=\"275\" height=\"50\" align=\"middle\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />
</object><!--dle_audio_end-->";
******************************************** баг , как я понял в плеере, в самом .swf'е .... Вот разобрал плеер и там 2 скрипта- Код:
//Frame 1 // Action tag #0 Stage.scaleMode = "noScale"; Stage.align = "TL"; stop(); Код:
//Sprite 24
// Frame 0
// Action tag #0
function loadProgress()
{
var __reg1 = sndObject.getBytesLoaded() / sndObject.getBytesTotal();
percentBar._width = __reg1 * barWidth;
if (__reg1 == 1)
{
clearInterval(loadProgressInt);
}
}
function playProgress()
{
var __reg1 = sndObject.position / sndObject.duration * sndObject.getBytesLoaded() / sndObject.getBytesTotal();
progressBar._width = __reg1 * barWidth;
}
function scrubProgress()
{
var __reg1 = percentBar._xmouse * percentBar._xscale / 100;
if (__reg1 > percentBar._width)
{
__reg1 = percentBar._width;
}
progressBar._width = __reg1;
var __reg2 = __reg1 / barWidth;
pausePos = __reg2 * sndObject.duration / 1000;
}
function playSong()
{
if (pausePos == 0)
{
sndObject.setVolume(songVolume);
sndObject.loadSound(file, true);
loadProgressInt = setInterval(loadProgress, 50);
}
sndObject.start(pausePos);
playProgressInt = setInterval(playProgress, 50);
pauseBut._visible = true;
playBut._visible = false;
}
function pauseSong(p)
{
if (p)
{
pausePos = p;
}
else
{
pausePos = sndObject.position / 1000;
}
sndObject.stop();
pauseBut._visible = false;
playBut._visible = true;
clearInterval(playProgressInt);
}
if (_root.file)
{
var file = _root.file;
}
else
{
var file = "sound.mp3";
}
if (_root.showDownload)
{
var showDownload = _root.showDownload;
}
else
{
var showDownload = "true";
}
if (_root.autoStart)
{
var autoStart = _root.autoStart;
}
else
{
var autoStart = "false";
}
if (_root.repeatPlay)
{
var repeatPlay = _root.repeatPlay;
}
else
{
var repeatPlay = "false";
}
if (_root.songVolume)
{
var songVolume = int(_root.songVolume);
}
else
{
var songVolume = 90;
}
if (_root.backColor)
{
var backColor = "0x" + _root.backColor;
}
else
{
var backColor = "0xeeeeee";
}
if (_root.frontColor)
{
var frontColor = "0x" + _root.frontColor;
}
else
{
var frontColor = "0x333333";
}
var w = Stage.width;
var sndObject = new Sound();
var pausePos = 0;
var loadProgressInt = new Number();
var playProgressInt = new Number();
var scrubProgressInt = new Number();
pauseBut.onPress = function ()
{
pauseSong();
}
;
playBut.onPress = function ()
{
playSong();
}
;
percentBar.onPress = function ()
{
pauseSong();
scrubProgressInt = setInterval(scrubProgress, 50);
}
;
percentBar.onRelease = percentBar.onReleaseOutside = function ()
{
clearInterval(scrubProgressInt);
playSong();
}
;
sndObject.onSoundComplete = function ()
{
if (repeatPlay == "true")
{
pausePos = 0.001;
playSong();
return;
}
progressBar._width = 0.1;
pauseSong(0.001);
}
;
var listener = new Object();
listener.onSelect = function (file)
{
trace("onSelect: " + file.name);
}
;
listener.onCancel = function (file)
{
trace("onCancel");
}
;
listener.onOpen = function (file)
{
trace("onOpen: " + file.name);
}
;
listener.onProgress = function (file, bytesLoaded, bytesTotal)
{
trace("onProgress with bytesLoaded: " + bytesLoaded + " bytesTotal: " + bytesTotal);
}
;
listener.onComplete = function (file)
{
trace("onComplete: " + file.name);
}
;
listener.onIOError = function (file)
{
trace("onIOError: " + file.name);
}
;
var fileRef = new flash.net.FileReference();
fileRef.addListener(listener);
saveBut.onPress = function ()
{
var __reg1 = file.substr(file.lastIndexOf("/") + 1);
fileRef.download(file, __reg1);
trace(__reg1);
}
;
var leftBgColor = new Color(leftBg);
var centerBgColor = new Color(centerBg);
var rightBgColor = new Color(rightBg);
leftBgColor.setRGB(int(backColor));
centerBgColor.setRGB(int(backColor));
rightBgColor.setRGB(int(backColor));
var playButColor = new Color(playBut);
var pauseButColor = new Color(pauseBut);
var percentBarColor = new Color(percentBar);
var progressBarColor = new Color(progressBar);
var saveButColor = new Color(saveBut);
playButColor.setRGB(int(frontColor));
pauseButColor.setRGB(int(frontColor));
percentBarColor.setRGB(int(frontColor));
progressBarColor.setRGB(int(frontColor));
saveButColor.setRGB(int(frontColor));
leftBg._x = leftGlow._x = 0;
centerBg._x = centerGlow._x = 7;
centerBg._width = centerGlow._width = w - 14;
rightBg._x = rightGlow._x = w - 7;
playBut._x = pauseBut._x = 12;
percentBar._x = progressBar._x = 21;
if (showDownload == "true")
{
var barWidth = percentBar._width = progressBar._width = w - 45;
saveBut._x = w - 17;
}
else
{
var barWidth = percentBar._width = progressBar._width = w - 32;
}
percentBar._alpha = 50;
pauseBut._visible = false;
progressBar._width = percentBar._width = 0;
if (w <= 35 || showDownload == "false")
{
saveBut._visible = false;
}
if (w <= 60)
{
percentBar._visible = progressBar._visible = false;
}
if (autoStart == "true")
{
playSong();
}
Последний раз редактировалось kavadims; 24.10.2008 в 08:08.. |
|
|
|
| Реклама: | сергей катышев дом кранкенгагена | металлический наполнитель | Серьги Лисички из красного золота 585 пробы с эмалью | Мебельный магазин: прихожая в коридор купить - Переходи на сайт! | купить клапан кпу-2н-о-н-200*200-2*ф-мv220-сн веза |
|
|
#2
|
|
Неактивный пользователь
Пол:
Регистрация: 30.07.2009
Сообщений: 90
Репутация: 15
|
вот неплохой плеер http://playmju.ru/
|
|
|
|
|
|
#3
|
|
Неактивный пользователь
Пол:
Регистрация: 02.02.2011
Сообщений: 1
Репутация: 0
|
Спасибо
|
|
|
|
|
|
#4
|
|
Неактивный пользователь
Пол:
Регистрация: 23.02.2011
Сообщений: 6
Репутация: 4
|
Спасибо!
|
|
|
|
![]() |
Похожие темы
|
||||
| Тема | Автор | Раздел | Ответов | Последнее сообщение |
| KM Player | osso | Скорая помощь | 12 | 25.11.2008 13:57 |
| Помогите найти кодеки для "Gom Player" и" Real Player" | Attila | Скорая помощь | 5 | 06.06.2008 18:56 |
| AVS DVD Player | westwild | Варезник | 0 | 29.12.2007 12:34 |
|
|