This is driving me insane…
SWF A is a photo gallery, SWF B is an mp3 player. B has a volume control slider…
When i launch B by itself everything works. When i load B into A and launch A the slider does not work… Every other button from B works… The sliders on mouse down is firing (i traced it). The drag aspect from B’s slider just wont slide when loaded from A.
here is the code:
/* volumeStartDragging(event:MouseEvent):void
* Returns a mathematical value that we can use to adjust the volume
* the value is the relation of the volume ball to the line
*/
function volumeStartDragging(event:MouseEvent):void
{
trace("volumeStartDragging");
/* */
initialX = comp_volume.volume_ball.x ;
comp_volume.volume_ball.startDrag(false, rectangle);
dragging = true;
comp_volume.volume_ball.addEventListener(Event.ENTER_FRAME, adjustVolume);
}
/* adjustVolume(event:Event):void
* We adjust the volume based upon the value from volumeStartDragging
*/
function adjustVolume(event:Event):void
{
trace("adjustVolume");
volumeLevel = (Math.round(comp_volume.volume_ball.x) ) / 100 ;
trace("volume level " + volumeLevel);
if (volumeLevel > 1) {
volumeLevel = 1;
}
var mySoundTransform:SoundTransform = new SoundTransform(volumeLevel);
if (soundChannel != null) {
soundChannel.soundTransform = mySoundTransform;
}
}
I have tried so many variations and nothing works… I even created a listener on A that fires when B loads and then attaches B to a container and that does not work… Any ideas.
Thanks in advance…