# Startdrag from external swf not working

**URL:** <https://forum.kirupa.com/t/startdrag-from-external-swf-not-working/315334>\
**Category:** Uncategorized\
**Created:** [October 23, 2010, 6:15am UTC](https://forum.kirupa.com/t/startdrag-from-external-swf-not-working/315334 "2010-10-23T06:15:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![huggy77](https://avatars.discourse-cdn.com/v4/letter/h/eada6e/32.png) [@huggy77](https://forum.kirupa.com/u/huggy77)\
**Post date:** [October 23, 2010, 6:15am UTC](https://forum.kirupa.com/t/startdrag-from-external-swf-not-working/315334/1 "2010-10-23T06:15:21Z")

</div>

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:

```auto
	/* 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…
