# Jump frames with Flashdock

**URL:** <https://forum.kirupa.com/t/jump-frames-with-flashdock/183142>\
**Category:** flash\
**Created:** [March 24, 2006, 4:18am UTC](https://forum.kirupa.com/t/jump-frames-with-flashdock/183142 "2006-03-24T04:18:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![drumsnroses](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@drumsnroses](https://forum.kirupa.com/u/drumsnroses)\
**Post date:** [March 24, 2006, 4:18am UTC](https://forum.kirupa.com/t/jump-frames-with-flashdock/183142/1 "2006-03-24T04:18:30Z")

</div>

I’m using the Flashdock component from [FlashWebTools](http://www.flashwebtools.com). The online tutorial gives the code for loading a swf in the mcTarget:

```auto

[FONT=Courier New]navigationMenu.addEventListener("onRelease", this, "onNavigationMenuRelease");
 
function onNavigationMenuRelease(Sender) {
    // Sender is the released button
    var content;
    switch (Sender.caption) {
        case "Home" :
        content = "flashdock_tut_home.swf";
        break;
        case "Portfolio" :
        content = "flashdock_tut_portfolio.swf";
        break;
        case "Services" :
        content = "flashdock_tut_services.swf";
        break;
        case "Downloads" :
        content = "flashdock_tut_downloads.swf";
        break;
        case "About Us" :
        content = "flashdock_tut_aboutus.swf";
        break;
        case "Contact" :
        content = "flashdock_tut_contact.swf";
        break;
    }
    mcTarget.loadMovie("contents/" + content);
}[/FONT]

```

[FONT=Courier New]What I want to do is have two of the buttons open an html page (\_blank), and the rest of the buttons to jump to a specific frame in the current flash movie. What code would I use for this? I’m assuming there would be no more need for the mcTarget symbol, right? (I don’t really know much about AS)[/FONT]

---

<div class="post-metadata">

**Author:** ![drumsnroses](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@drumsnroses](https://forum.kirupa.com/u/drumsnroses)\
**Post date:** [March 24, 2006, 7:46am UTC](https://forum.kirupa.com/t/jump-frames-with-flashdock/183142/2 "2006-03-24T07:46:31Z")

</div>

Okay, I messed with it long enough until I wrote something that seemed to work. I thought I tried this before but maybe I had it in the wrong place. Anyway, I used this and it works:

```auto

navigationMenu.addEventListener("onRelease", this,
"onNavigationMenuRelease");

function onNavigationMenuRelease(Sender) {
   // Sender is the released button
   var content;
   switch (Sender.caption) {
       case "PHOTO GALLERY" :
       content = "http://www.nucleusriders.com/imagevue";
       break;
       case "ONLINE STORE" :
       content = "http://www.cafepress.com/nucleusriders";
       break;
   }
   getURL(content, "_blank");
}

navigationMenu.addEventListener("onRelease", this,
"onNavMenuRelease");

function onNavMenuRelease(Sender) {
   // Sender is the released button
   var content;
   switch (Sender.caption) {
       case "ABOUT US" :
       content = 1;
       break;
	   case "UPCOMING EVENTS" :
	   content = 1;
	   break;
	   case "CHRONICLES" :
	   content = 1;
	   break;
	   case "CONTACT US" :
	   content = 1;
	   break;
	   case "LINKS" :
	   content = 1;
	   break;
   }
   gotoAndPlay(content);
}

```

---

<div class="post-metadata">

**Author:** ![drumsnroses](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@drumsnroses](https://forum.kirupa.com/u/drumsnroses)\
**Post date:** [March 24, 2006, 8:04am UTC](https://forum.kirupa.com/t/jump-frames-with-flashdock/183142/3 "2006-03-24T08:04:12Z")

</div>

ugh, well I thought I had it figured out. But now, if I click on a button that is defined with the second function (to jump frames) but is undefined with the first function (to open an html page), it does jump to the correct frame but also opens an undefined popup. Is there any way I can tell it that if the button is undefined in the first function, then for it to not “getURL”? Thanks for your help.

…

update:  
wow, I think I’m cursed to only find the answer AFTER I post questions. Anyway, 10 minutes after I posted, I figured out to change the getURL to

```auto

if (content != undefined) {
    getURL(content, "_blank")
}

```

anywho, sorry for all the posts for nothing. I’m just now starting to get into AS.
