Jump to content


Help with Flash Menu


  • You cannot reply to this topic
2 replies to this topic

#1 Dolph Ferg

    Young Padawan

  • Members
  • Pip
  • 7 posts

Posted 15 December 2005 - 04:18 PM

It's a lengthy explanation, i'm very appreciated if u can help

So, I'm hoping to finish my site by the end of this week, and all is looking good until last night. The actual interactive part of my site consists entirely of flash, with a total of 6 sections (maybe 7 if i do a contact page).

My problem lies in the menu. The menu is a MC on the main time line. When some1 rolls over the menu MC the timeline scrolls to the frame 15 inside the menu showing a quick animation of the links dropping down from beinhd the menu's main background that originally hides the links. when the viewers rolls off the menu the timeline goes to frame 30 where the links and subemnu roll back up into the background hidden from site. Well this all works fine the animation is perfect. I'll explain my problem i have with the buttons.

At frame 15 theres a new keyframe on each layer (layers explained below). This is where all my AS is taking place.

Just incase I'm rambling way to much the idea behind the links is to check whether or not a certain movie is loaded into the movieclip "movieLoader" on the main timeline. If its not the button will unload the current movie and load the new one.

For example on frame 15 (point on the timeline where buttons are visible) of the menu MC i have an MC instance of my home button with an instance name of homeButton.  on the AS layer i tried putting the code

homeButton.onRelease = function() {
	 if(_level0.movieLoader != mainMovie.swf) {
		 _level0.unloadMovie(movieLoader);
		  _level0.loadMovie("mainMovie.swf", movieLoader);
	 }
}

well nothing happened.  I tried replacing the if statement with a simple:	 trace("hello");	 just to see if anything would happen and nothing did.  i messed around with this for god knows probably 2 hours.  after tat i tried the next best thing (SO i thought).

i select the Home MC (homeButton) itself and placed this code on it:

onClipEvent (mouseDown) {
	trace("CLICK");
}

just to see if it worked.  To my enjoyment it did.  so i did this on each of the 7 buttons i have in the menu.  I ran a test on the movie.  No output erros, everything was dandy, so i rolled over the menu click a link and i about thru my laptop at the wall. on the output i got a trace msg from each of the 7 buttons & only clicked on one.  i tried click on each of the buttons and I would get the same damn thing.

For my second part of the problem, i ran a quick trace on the AS layer that loaded the movie stating:

if(movieLoader == mainMovie.swf) {
	 trace("mainMovie is loaded");
}

well i didnt get a trace msg in the output, so i changed it to:

if(movieLoader != mainMovie.swf) {
	 trace("mainMovie is not loaded");
}

and I got a trace msg back.  That was the only movie loaded at the time tho, so i ddint understand.  how to i check to see wut movie i've laoded into the MC movieLoader?


Here is a list of the Layers i have inside the menu MC:
Actions Contains all the actionscripts located on the Frames
mainMenu Graphic Instance of the main menu background

Folder: Contains MC Instance for Each button
Home
News
Bio
Resume
Sponsors
Schedule
Contact

Mask Simple Mask to hide the portion of the subMenu i dont want shown
subMenu Graphic Instance of the sub menu background

My .fla

THANKS SO MUCH
-rF

#2 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 16 December 2005 - 07:36 AM

Have you checked the levels where you loading the movies?

#3 Dolph Ferg

    Young Padawan

  • Members
  • Pip
  • 7 posts

Posted 17 December 2005 - 02:35 AM

Everything was right. I restructured the MC completely. O used the exact same onRelease commands, and everything is happy now :D. I was even using an absolute path too. the button was located in a MC on named mainMenu on the main timeline. so i would do _level0.mainMenu.buttonName. As long as it works now I guess.

Only thing is i dont get why the onClipEvent() function would work if i clicked the button, but when i would do an onRelease command targeting the button, nothing would happen. And why would the onClipEvent() target all the buttons causing them to execute each command associated with them.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users