# Flash Help

**URL:** https://forum.kirupa.com/t/flash-help/69721
**Category:** Uncategorized
**Created:** [November 7, 2004, 11:58am UTC](https://forum.kirupa.com/t/flash-help/69721 "2004-11-07T11:58:35Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Nominator](https://avatars.discourse-cdn.com/v4/letter/n/e95f7d/32.png) [@Nominator](https://forum.kirupa.com/u/Nominator)
#### Post date: [November 7, 2004, 11:58am UTC](https://forum.kirupa.com/t/flash-help/69721/1 "2004-11-07T11:58:35Z")

</div>

Hey I’m trying to make something in flash and I need a certain button to go to slide5 when clicked and the other to go to slide8.

This is code one of the buttons have:

```auto
on (keyPress "<Down>") { 

	  // Locate the screen that is the target of the behavior 
	  var screen = null; 
	  var target = slide5; 
	  while((screen == null) && (target != undefined) && (target != null)) 
	  { 
		if(target instanceof mx.screens.Screen) 
		{ 
		  screen = target; 
		} 
		else 
		{ 
		  target = target._slide5; 
		} 
	  } 
	  
	  // If there's a Slide to apply the behavior to, then do so 
	  if(screen instanceof mx.screens.Slide) 
	  { 
		screen.rootSlide.gotoslide5(); 
	  } 

}

```

I need that to point to slide5

Heres a screen shot:

![](http://img123.exs.cx/img123/7186/Flas.gif)

This is what it does ATM  
[[color=#800080]http://img122.exs.cx/my.php?loc=img122&image=Test.swf[/color][url=“http://img123.exs.cx/img123/7186/Flas.gif”]](http://img122.exs.cx/my.php?loc=img122&image=Test.swf)
