# Adding Pause,Play,FastForward,Rewind controls to a swf file via a loaded swf file

**URL:** https://forum.kirupa.com/t/adding-pause-play-fastforward-rewind-controls-to-a-swf-file-via-a-loaded-swf-file/327746
**Category:** flash
**Created:** [March 26, 2012, 1:35am UTC](https://forum.kirupa.com/t/adding-pause-play-fastforward-rewind-controls-to-a-swf-file-via-a-loaded-swf-file/327746 "2012-03-26T01:35:31Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![media\_mixx](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@media\_mixx](https://forum.kirupa.com/u/media_mixx)
#### Post date: [March 26, 2012, 1:35am UTC](https://forum.kirupa.com/t/adding-pause-play-fastforward-rewind-controls-to-a-swf-file-via-a-loaded-swf-file/327746/1 "2012-03-26T01:35:31Z")

</div>

[TABLE=“class: tborder, width: 100%, align: center”]  
[TR]  
[TD=“class: alt1, bgcolor: #FFFFFF”][COLOR=#000000]Hello,

I will try to be as clear as I can. I have an existing swf file that I want to add Play,Pause, FF and Rewind via an externally loaded swf file that has the controls contained in it.

I am loading an external swf file that has all of the controls on it via this code:

// Set up the Mouse to use a listener  
var mouseListener = new Object();  
Mouse.addListener(mouseListener);

// Set the speed value for the fade  
var speed = 16;

// Set the fade down and fade up to values  
var fadeDownTo = 0;  
var fadeUpTo = 100;

// Listen for movement using the onMouseMove event  
mouseListener.onMouseMove = function()  
{  
// If the mouse is over the load\_mc  
if(load\_mc.hitTest(\_root.\_xmouse, \_root.\_ymouse, false))  
{  
// Use onEnterFrame to fade the clip down  
\_root.onEnterFrame = function()  
{  
if(load\_mc.\_alpha \>= fadeUpTo)  
{  
load\_mc.\_alpha = fadeUpTo;  
delete \_root.onEnterFrame;  
} else {  
load\_mc.\_alpha += speed;  
}  
}  
}  
else {  
// Works the same as above but fades up  
\_root.onEnterFrame = function()  
{  
if(load\_mc.\_alpha \<= fadeDownTo)  
{  
load\_mc.\_alpha = fadeDownTo;  
// Delete the onEventFrame so that  
// it doesn’t keep fading down  
delete \_root.onEnterFrame;  
} else {  
load\_mc.\_alpha -= speed;  
}  
}  
}  
}

I am doing this so I can rollover the viewing window and have it appear. I cannot get any code to work to control the timeline (which is broken down into sections with individual MC’s in each section.

What I am looking for is the code to apply to the buttons on the external swf file that has the controls to control the playing of the movie.

Any help would be greatly appreciated.

Thank you  
[COLOR=#000000][HR][/HR]  
[/COLOR]  
[/COLOR][/TD]  
[/TR]  
[/TABLE]
