📜 ⬆️ ⬇️

And again plagiarism habrapleera

And again the continuation of the epic plagiarism habrapleera :) (previous series here ).
The design was redrawn , and the code was underlined :) Yes, and such a serious company, and against the background of the fact that our podcasts were typed ( what the story with podcasts ended with ).

Immediately make a reservation, all this is my speculation, which in no case should not be assessed as claims or insults. Given that habrararedtsiya specifically made such a player with a different design and distributes it for free to those who ask ( contact ).

It seems to me that their code strikingly quotes parts of the habrapler code:

There
function initsound ()
{
_root.player = new Sound ();
player.onSoundComplete = function ()
{
_root.playerstate = "loaded";
};
player.loadSound (_root.song_url, true);
}

I have
function initsound ()
{
// create player object
_root.player = new Sound ();
player.onSoundComplete = function ()
{
_root.playstate = "stopped";
pausebuttn._visible = false;
player = undefined;
_root.stop ();
}
player.loadSound (_root.song_url, true);
}

')
There
this.onEnterFrame = function ()
{
bars_mc.loadline_mc._width = Math.round (100 * player.getBytesLoaded () / player.getBytesTotal ());
bars_mc.playline_mc._width = Math.round (100 * player.position / player.duration * player.getBytesLoaded () / player.getBytesTotal ());
};

I have
loadline._width = Math.round (254 * player.getBytesLoaded () / player.getBytesTotal ());
playline._width = Math.round (254 * player.position / player.duration * player.getBytesLoaded () / player.getBytesTotal ());


There
bars_mc.progress_btn.onRelease = function ()
{
control_mc.gotoAndStop ("pause_pos");
play_position = _root.player.duration / _root.bars_mc.loadline_mc._width * this._xmouse / 1000;
player.start (play_position);
};

I have
postn = _root.player.duration / _root.loadline._width * _xmouse / 1000;
_root.player.start (postn);


Copy-paste?

Good luck, guys!

Source: https://habr.com/ru/post/6262/


All Articles