PDA

View Full Version : flash pull down menu problems


nrvus19
10-17-2002, 09:01 PM
hi.
for some reason, when i try to link any action, other than 'get url' to the menu items in my pulldown menu it will not work.

im trying to advance to a frame and load a movie but nothing is happening.

anyone have any ideas as to why?

thanks.


link to the zipped file: http://www.silverleafbooking.com/help.zip

spazmaster
10-17-2002, 10:32 PM
uhm i dont know what problem you have but i just put some simple actionscript on one of them buttons


on (rollOver) {
gotoAndStop(1);
}


and it worked fine.

whats the problem?

nrvus19
10-18-2002, 06:01 PM
could it be my flash installation?
i did the same thing and nothing happened...
very strange.

nrvus19
10-21-2002, 05:58 PM
Ive downloaded mx and tried this pulldown menu, and i still cannot get the menu items to move to different frames or load other movies. please help.

tg
10-21-2002, 06:55 PM
make a test file... i looked at all the buttons i could find on your fla, and didn't see any code on any of your buttons... maybe i was looking in the wrong place.
anyway... make a test file and try to reproduce the exact problem. doing this will often help you solve the problem on your own.

i did notice one problem:

//on frame 2 of your maint timeline
//change the first line
// from if (/:textloaded="OK") {
//to
if(_root.textLoaded=="OK"){
gotoAndPlay (4);
}

your original code is assigning the value'ok' to the variable textloaded(using '=').
the changed code is compairing the value of textloaded to 'ok'(using '==).
(side note: the'/:' is flash4 syntax).

tost
10-21-2002, 06:56 PM
nrvs, i don't get the problem neither.
i looked at your file, the first pop-up-menu has a whole lot of buttons in it (on the frame 'items'), but none of 'em seems to have any actions placed on 'em (?)

which timeline are you trying to redirect? the main one?
please explain, a'ight?

nrvus19
10-21-2002, 06:58 PM
Hi,
thanks for the reply. yes, im trying to direct the main timeline. everytime i attempt to assign an action to any of the menu items nothing seems to happen.
I cant figure out why.

tost
10-21-2002, 07:01 PM
i was reply-ing at the same time - which explains why i posted after yours
but btw
how can u be a new member and have over 2000 posts?

nrvus19
10-21-2002, 07:02 PM
If you take a look at the menu item (first link on the left) in the edit mode you will be able to see that in frame 5 I have attempted to assign and action to the first button. On release goto scene 2 frame 1. It wont do anything when i click on it.

tost
10-21-2002, 07:06 PM
first something else:
if you fix the if statement as tg proposed correctly, you must also change it to a gotoAndStop, or put a stop on frame 4 (or 5, whatever), otherways it's just going to loop and jump to frame 1 > reloading the vars over again

after you fixed that,
let's say you stop the main scene on frame 4
and the action to load a (sub)movie is on frame 5
put a
_parent.gotoAndStop(5)
on any of your itembuttons
and it should work

succes
tost

nrvus19
10-21-2002, 07:26 PM
Im uploading the new file created in mx.

if you check the first button on the left in the edit mode you will see ive attempted to add an action of 'on release goto and play scene 2 frame 1'

every other action has also failed in terms of this menu.
im really stumped.

http://www.silverleafbooking.com/temp/silverleaf10_14.zip

tost
10-21-2002, 08:11 PM
i don't know what it is, but it seems to me that you're doing something wrong here. The new file you uploaded has no buttons with any code on em, exept the up and down scroll.
i used the movie explorer to search for the code you mentioned.
it's not in this fla - anywhere
also
there is no scene 2, so even if you would put any code on your buttons, and try to target scene 2, it won't work.

are you okay?
this story starts to remind me of those rare moments that i do the most stupid things you could ever imagine, mostly after haven't slept for too many clockrounds, changing code for hours to discover i was uploading the wrong file all the time
and more like that
must sound familiar for a lot of us i guess

check the basics i would say, or listen to tg and build a testfile
it's just a little more work but it can save hours of wasted time
tost

nrvus19
10-21-2002, 08:18 PM
hmmm,
very interesting. i just downloaded the zip file and checked it to make double sure i wasnt out of my mind.
im seeing the file ok (minus one image which im not bothered about right now).

the button in question is located top left. it has text which reads 'roster'.

if you check that in 'edit' mode you should be able to see goto actions placed on the second and third items in the drop down menu.

im wondering why the second scene isnt showing up for you either...

...and yes, very tired of messing with this thing, ive tried multiple versions of different drop down menus and this will be day 6 of my battle.

getting past this barrier will help me immeasurably.

tg
10-21-2002, 08:41 PM
dont know if this fixed what you wanted, but i made some changes that really need to to be made... actually the best way to do this would be to build the whole menu system on the fly, but don't have time to help you with that now.

anyhooo.

take a look at this:
changes:
added keyframe on frame4 on root.
added a layer on your button movieclip, and put the frame label in there.
cleared the keyframe from the last frame of your action layer on your button mc
changed your on(rollover code) on the button mc from gotoAndPlay("items") to gotoAndStop("items")

heres the fla:


well, the fla is too big... make the changes i mentioned above and try it out.

tg
10-21-2002, 08:48 PM
ok, i stripped down your fla... so if you download, don't overwrite your old file, cause i got rid of all the extra junk (not that your work is junk... no offense) that had nothing to do with your question.

nrvus19
10-21-2002, 08:49 PM
well...ive tried those steps and it still wont do anything. the rollover works fine, its just the menu items wont do anything.

thanks for the help.
im calling it a day for now.

until tomorrow.
john.

nrvus19
10-21-2002, 08:56 PM
I just downloaded the zip file.

Did the menu items work for you?

Im clicking on the first one, 'aloha' and the script is saying it should be going to scene 2 frame 1, but it just wont go.

When you are clicking on it, is it moving to scene 2 frame 1?

ahhhh.....

tg
10-21-2002, 09:03 PM
ok, well, i'll repeat something here, that if you search you probably see around here alot. scenes suck.

so
change your gotoAndStop("scene 2",1);
to
gotoAndStop("scene2begin");
then on the first frame of scene2 label it 'scene2begin'

look at the attached file... it works.

nrvus19
10-21-2002, 09:06 PM
well.

that is very impressive indeed.

i would have never figured that out.

what exactly went wrong?

you know even when i tried directing it to a different frame, lets say 'frame 6' in the same scene...it wouldnt go.


thank you. i really appreciate the time.

john.

tg
10-21-2002, 09:12 PM
np
your actions are nested inside a movieclip... you movieclip only had 3-4 frames so gotoAndStop(6) wouldn't go.
also... you wanted the _root timeline to goto the next scene, so you need to make sure you are targeting the correct timeline with:
_root.gotoAndStop(label/number);

nrvus19
10-21-2002, 09:17 PM
would this also mean if i intend on using something such as 'loadmovie' it will have to have similar '_root' syntax?

tg
10-21-2002, 09:19 PM
if you are loading your movie into an mc on the _root timeline, yes.
if you are loading the movie into a mc in another mc, you need to target the correct mc.

take a look at a couple of the tutorials here, particularly the paths tutorials. they may help.

nrvus19
10-21-2002, 09:24 PM
well, yes.
what im trying to do it load the external .swf into a movie clip on scene 2.

the clip is moving nicely to scene 2 (thanks) but im not seeing the loaded clip.

i havent really spent time with it yet, so im hoping ill be able to sort it out.

the strange thing that is happening is that although it will not load into scene 2 properly, when i click on the button again while in scene 2 it loads into a new page or movie?

hopefully ill work it out.
youve been a tremendous help.

nrvus19
10-21-2002, 09:55 PM
Ive read the 'paths' tutorials.

Im assuming something such as: loadmovie("_root/content/empty") should load the movie clip 'content' into the movie clip 'empty' on the main timeline, considering both of these movie clips already exist in the main .swf

i dont quite understand the correct syntax for loading an external .swf into a movie clip on the main timeline.

would it be:

loadmovie("_root/content.swf/empty")
??



!! right...so ive been able to load the external .swf into my main timeline like this:

on (release) {
_root.gotoAndStop("content");
loadMovie("aloha.swf", "../empty");
}


however...
when the external .swf loads, it is midway across and 3/4 of the way down the middle of the 'empty' MC.

any suggestions as to how to line it up at 0,0 point of the 'empty' movie clip?


-- Just got it.

Thanks tg and tort for all the help

john

tg
10-21-2002, 10:55 PM
you'll need to adjust your registration points on your swf./movieclip, to the upper left corner (alignment 0:0)