5 Replies - 1411 Views - Last Post: 12 May 2007 - 02:37 AM

#1 nikising  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 21-March 07

How to target main timeline from within 3 mcs in a slidemenu?

Posted 07 May 2007 - 06:45 AM

Hello there,

I am trying to modify a slidemenu script but don't really know how to accomplish it. I have a series of buttons within three mcs. (this is necessary for the sliding script to work). In the original script, the button name is targeted to a label with the same name in a new scene.

The code on the button is:
on (release) {
gotoAndStop("/:" add eval("..:text"));
// THIS goes to the FRAME with the name of the button you just clicked on.
}

The MC code is:

// --------------------------------------------
// tmi=total menu items
// dup=new movie duplicates
// butn=original movie button
// --------------------------------------------
// FIX original Button:
butn:text = /:Menu0;
while (Number(n)<Number((/:tmi*2)-1)) {
n = Number(n)+1;
dup = "butn" add n;
duplicateMovieClip("butn", dup, n);
setProperty(dup, _x, Number(getProperty(dup, _x))+Number(n*getProperty(dup, _width)));
setProperty(dup add "/b", _x, getProperty (dup add "/b", _x) + (1));
set(dup add ":n", n);
// assign button name from variables
if (Number(n)<Number(..:tmi)) {
set(dup add ":text", eval("/:Menu" add n));
} else {
set(dup add ":text", eval("/:Menu" add (n-/:tmi)));
}
}



The problem I am having is that I don't want to go to a new scene ( because I am only loading photos) but would like to target a label on the main menu. I have tried many ways including (my label is named "one"):
on (release) {
_root.gotoAndStop("Main" "one");
}

on (release) {
_root.gotoAndStop("one");
}

on (release) {
gotoAndStop("Main" "one");
}
on (release) {
_level0.gotoAndStop("one");
}


But none of these work. There must be a way to do this no? Please someone enlighten me! I need all the help I can get.

Thanks very much for your support,

Niki

Is This A Good Question/Topic? 0
  • +

Replies To: How to target main timeline from within 3 mcs in a slidemenu?

#2 theRemix  Icon User is offline

  • D.I.C Regular

Reputation: 15
  • View blog
  • Posts: 440
  • Joined: 19-October 05

Re: How to target main timeline from within 3 mcs in a slidemenu?

Posted 07 May 2007 - 05:51 PM

View Postnikising, on 7 May, 2007 - 06:45 AM, said:

Hello there,

I am trying to modify a slidemenu script but don't really know how to accomplish it. I have a series of buttons within three mcs. (this is necessary for the sliding script to work). In the original script, the button name is targeted to a label with the same name in a new scene.

The code on the button is:
on (release) {
gotoAndStop("/:" add eval("..:text"));
// THIS goes to the FRAME with the name of the button you just clicked on.
}

The MC code is:

// --------------------------------------------
// tmi=total menu items
// dup=new movie duplicates
// butn=original movie button
// --------------------------------------------
// FIX original Button:
butn:text = /:Menu0;
while (Number(n)<Number((/:tmi*2)-1)) {
n = Number(n)+1;
dup = "butn" add n;
duplicateMovieClip("butn", dup, n);
setProperty(dup, _x, Number(getProperty(dup, _x))+Number(n*getProperty(dup, _width)));
setProperty(dup add "/b", _x, getProperty (dup add "/b", _x) + (1));
set(dup add ":n", n);
// assign button name from variables
if (Number(n)<Number(..:tmi)) {
set(dup add ":text", eval("/:Menu" add n));
} else {
set(dup add ":text", eval("/:Menu" add (n-/:tmi)));
}
}



The problem I am having is that I don't want to go to a new scene ( because I am only loading photos) but would like to target a label on the main menu. I have tried many ways including (my label is named "one"):
on (release) {
_root.gotoAndStop("Main" "one");
}

on (release) {
_root.gotoAndStop("one");
}

on (release) {
gotoAndStop("Main" "one");
}
on (release) {
_level0.gotoAndStop("one");
}


But none of these work. There must be a way to do this no? Please someone enlighten me! I need all the help I can get.

Thanks very much for your support,

Niki



if nothing is happening... see if the code on the button itself is functioning

on(release){
	trace("this button works and is located here: " + this)
}



now run this, and click the button, if an output window does NOT pop up, then there may be something blocking your button "in front of it" or something similar.

if this still isn't working, maybe post up your fla?
Was This Post Helpful? 0
  • +
  • -

#3 nikising  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 21-March 07

Re: How to target main timeline from within 3 mcs in a slidemenu?

Posted 08 May 2007 - 06:07 AM

Thanks for the response. Nothing happens with the test script. The button goes nowhere and no pop up screen. Where can I post up my fla?

Thanks for the help,

Niki
Was This Post Helpful? 0
  • +
  • -

#4 theRemix  Icon User is offline

  • D.I.C Regular

Reputation: 15
  • View blog
  • Posts: 440
  • Joined: 19-October 05

Re: How to target main timeline from within 3 mcs in a slidemenu?

Posted 08 May 2007 - 01:05 PM

View Postnikising, on 8 May, 2007 - 06:07 AM, said:

Thanks for the response. Nothing happens with the test script. The button goes nowhere and no pop up screen. Where can I post up my fla?

Thanks for the help,

Niki


you can attach it here or email me the .fla . i sent you a pm with my email address
Was This Post Helpful? 0
  • +
  • -

#5 theRemix  Icon User is offline

  • D.I.C Regular

Reputation: 15
  • View blog
  • Posts: 440
  • Joined: 19-October 05

Re: How to target main timeline from within 3 mcs in a slidemenu?

Posted 08 May 2007 - 02:35 PM

what version of flash do you have?

it looks like you are trying to export it as flash 4 also? is this really necessary?

when i run your flash from flash 8 professional, i get these errors in output

WARNING: This movie uses features that are not supported in the Flash 4 player
Symbol=bt+txt, layer=SEE ACTIONS!, frame=1:Flash MX Button Instance Name
Symbol=bt+txt, layer=SEE ACTIONS!, frame=1:Flash MX Button Instance Name
Symbol=bt+txt, layer=SEE ACTIONS!, frame=1:Flash MX Button Instance Name
Symbol=bt+txt, layer=SEE ACTIONS!, frame=1:Flash MX Button Instance Name
Symbol=bt+txt, layer=SEE ACTIONS!, frame=1:Flash MX Button Instance Name
Symbol=bt+txt, layer=SEE ACTIONS!, frame=1:Flash MX Button Instance Name



but it still runs, and some of the buttons on the bottom work.

i'll see what i can do to get them all to work.
Was This Post Helpful? 0
  • +
  • -

#6 nikising  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 21-March 07

Re: How to target main timeline from within 3 mcs in a slidemenu?

Post icon  Posted 12 May 2007 - 02:37 AM

Hi Remix,

Ya I was for some reason publishing as flash 4 , I have no idea why. Anyway no more error messages so that's good. But ya still the problem. Yes some of the buttons work ( basically one of the buttons which is being duplicated works because in the original fla I was modifying there was only one button being duplicated. I thought maybe that was it but then the script says you can have as many buttons and (menus =scenes) as you want. When I tried using the scenes as the script intends it works but I would just like to get rid of the scene navigation system because when the scene is loaded the slidemenu is whiped out because its on the main menu ( and I can't copy it into a scene). So this won't work.

Thanks for any ideas you have, I'm at a loss,

Niki
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1