-
mediaplayer buffering animation
Hi,
I just want to play a movieclip animation when my media player is buffering.
In the documentation it says this:
----------
isBuffering property
isBuffering:Boolean [read-only]
Returns a boolean value indicating if the media player is currently buffering media content.
Implementation
public function get isBuffering():Boolean
------------
So I tried this:
----------------AS3----------
if (mediaplayer.isBuffering = true)
{
mc1.play();
}
else
{
gotoAndPlay(2);
}
---------------------
I also tried this:
----------------
mediaplayer.addEventListener("isBuffering", isBufferingHandler);
function isBufferingHandler(e:Event){
if (mediaplayer.isBuffering = true)
{
mc1.play();
}
else
{
gotoAndPlay(2);
};
}
------------------
neither worked.
What am I doing wrong?
any help is appreciated
cheers
-
KoolMoves Moderator
hmm well the first one won't work as it's not continuing to check if isBuffering, the second wont because isBuffering isn't an event so you can't listen for it.
I think you are going to have to create a timer or something to keep checking the status of isBuffering.
and I would have a really small little animation that I addChild and removeChild to show/hide it.
-
I figured out there is an in-built buffer animation in the media player.. I just have to edit the setup.as in the mediaplayer skin and add:
bufferIconColor = 0xFF00009F;
with the colour being ARBG format.
I have a question though.
There are colours that can be paramatized in koolmoved mediaplayer properties window, and they are represented in the setup.as of the skin as being c[1], c[2], c [3] etc.
But these are RBG format hex with 6 digits, and the buffericon colour is 8 digits ARBG format.
How can I set the buffericon colour using one of the paramtetized colours?
like this?
bufferIconColor = 0xFFC[1];
or this?
bufferIconColor = 0xFF000000 + C[1];
?
-
The second one is correct.
What also often is used is the bitwise or operator.
bufferIconColor = 0xFF000000 | c[1];
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|