Unable to replicate the included fla file

3 views
Skip to first unread message

oreth

unread,
Jun 28, 2010, 1:53:50 PM6/28/10
to f4Player
I have downloaded the source code and can compile the fla file that
was inside the zip file. However, if I copy the Actionscript code over
to a new Flash 10 AS3 or Flash 9 AS3 file, as well as copying and
placing all of the assets in the correct place, I took a screen shot
of the errors:

http://cl.ly/5788a98aad57b0b687c7

I have not altered Player.as in anyway.

oreth

unread,
Jun 28, 2010, 2:20:19 PM6/28/10
to f4Player
I fixed the errors in the code.

The first error:
unable
is due to the fact we are trying to access a class variable that you
haven't instantiated.
Access of undefined property volumeTransform was fixed by adding:

private var volumeTransform:SoundTransform;


problem with the type coercion was fixed by wrapping the entire
percentage calculation, including the ".toFixed(2)" in a Number cast.
The toFixed() function spits out a string and was being fed into the
percentage variable that was explicitly typed as a Number.

the volume cache bug was fixed by giving the function a local
volumeCache number variable.
Reply all
Reply to author
Forward
0 new messages