PDA

View Full Version : Actions from items of ComboBox


leandrosalem
10-10-2002, 04:01 PM
I created a ComboBox with the following labels. [car,house,ball] .
I want getURL when the item ball is selected. I wrote this code:

onClipEvent (enterFrame) {
if(mycombobox.getSelectedItem().label = ball ); {
getURL("www.flashkit.com", "_blank");
}
}

When i test the movie,it's opening continuosly a new window automatically,without the click. it almost crashed my compu

pom
10-10-2002, 04:39 PM
There are 2 problems in your code:

Your test: if(mycombobox.getSelectedItem().label = ball ); {You're assigning, not testing, and you have to remove the semi colon.if(mycombobox.getSelectedItem().label == "ball" ) {Then you shouldn't test the value of the selected item onEnterFrame. It's better to do it only when the user selects one of the items, right?

So you have to create your own function and assign it to the component. Something likefunction goThere(c){
var i=c.getSelectedItem().label;
if (i=="ball") {getURL("http://www.flashkit.com","_blank");}
}

mycombobox.setChangeHandler("goThere");This is untested, but that's how it works. I'm sure there's a tute on this site explaining it better than I did. :)

pom :D

JHallam
10-10-2002, 05:11 PM
Beat me to it....lol

pom
10-10-2002, 05:40 PM
Hey JH, I was wondering: how do you put that line under your name?? I looked in the user cp but didn't find it and I don't want to ask on the general forum... too ashamed of myself :D

JHallam
10-10-2002, 06:48 PM
you've done it! lol

YAAAAAAAAAAAAAAAAAY! lol

it's just the olde

____ Underscore ____

Magic-cal :D

pom
10-10-2002, 06:55 PM
Nonono, I meant where it says "member" :D

JHallam
10-10-2002, 07:08 PM
ooooooooooooooooooooohhh,

USER CP

Edit Profile

Custom text

there you go chappy :D

pom
10-10-2002, 08:32 PM
??? :confused: I don't have it :( :( :(

OR

I'm going blind. Dunno yet.

JHallam
10-10-2002, 09:33 PM
kayyyyyyyy

USER CP (at the top of the forum, next to register, TOP BAR)

Then in the other menu that it brings

EDIT PROFILE

then search down the page for

Custom User Text:

This is the title that appears beneath your name on your posts.
You may enter up to 25 characters.
Check the reset box if you wish to use the the default title for your usergroup and post count.
HTML is not allowed.

then edit it, DONE!

tg
10-10-2002, 10:01 PM
gh, for some reason, some members don't have that option, i don't know if it depends on number of posts, or what...

pom
10-10-2002, 10:05 PM
I know, I know... :D

Am I going mad?

pom
10-10-2002, 10:08 PM
Oups tg, crossposts.

Is that so? I hope the limit is 100 then. That way I only have to post 2 stupid posts.

Edit: Well, 100 and still nothing... Why is this always happening to me?? :D

Mortimer Jazz
10-10-2002, 10:24 PM
I can't even see the bit where it says 'member' and I don't have the option.
I have abot the same amount of posts as GRaPHiX_FReaK..... so now I feel kinda cheated ;)

JHallam
10-11-2002, 12:06 AM
MAYBE...it's the only special superior members have this option :D :D :D :D :D :D :D

hehehe

Mortimer Jazz
10-11-2002, 11:21 AM
Grrrrr (mummble mummble......) ;)

JHallam
10-11-2002, 12:14 PM
Heh Heh!

http://www.tutorialforums.com/images/smilies/New/classic.gif

hehe ;)

JHallam
10-11-2002, 12:15 PM
why is the IMG command not working? Anyone?

tg
10-11-2002, 02:53 PM
Originally posted by Mortimer Jazz
I can't even see the bit where it says 'member' and I don't have the option.
I have abot the same amount of posts as GRaPHiX_FReaK..... so now I feel kinda cheated ;)
HELLO! McFly! *knock,knock* YOO HOO!

thats cuz yours says MX-ray specs... you've already changed it.

Mortimer Jazz
10-11-2002, 03:08 PM
oh the user text! right.....
Better change these MX-Ray specs for a pair of contact lenses ;)

I have now changed my profile to something more fitting....

pom
10-11-2002, 03:33 PM
I feel so left behind... :(
And thanks for the pic, JH...

JHallam
10-11-2002, 04:40 PM
LOL


you have nicked my piccy!!

But i suppose you need that pom, to warn people :D

hehe

pom
10-11-2002, 05:36 PM
Glad you like it :rolleyes: