Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Extensions and Plugins > Components

Reply
 
Thread Tools Rate Thread Display Modes
Old 10-10-2002, 05:01 PM   #1
leandrosalem
Registered User
 
Join Date: May 2002
Location: Rio de Janeiro - Brazil
Posts: 16
Send a message via ICQ to leandrosalem
Default Actions from items of ComboBox

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
leandrosalem is offline   Reply With Quote
Old 10-10-2002, 05:39 PM   #2
pom
Allez les Bleus!!!
 
pom's Avatar
 
Join Date: Oct 2002
Location: Paname
Posts: 2,495
Default

There are 2 problems in your code:

Your test:
ActionScript Code:
if(mycombobox.getSelectedItem().label [b]=[/b] ball )[b];[/b] {
You're assigning, not testing, and you have to remove the semi colon.
ActionScript Code:
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 like
ActionScript Code:
function 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
pom is offline   Reply With Quote
Old 10-10-2002, 06:11 PM   #3
JHallam
Dosed...By Flash!
 
Join Date: Feb 2001
Location: England - Nottm
Posts: 1,192
Send a message via Yahoo to JHallam
Default

Beat me to it....lol
JHallam is offline   Reply With Quote
Old 10-10-2002, 06:40 PM   #4
pom
Allez les Bleus!!!
 
pom's Avatar
 
Join Date: Oct 2002
Location: Paname
Posts: 2,495
Default

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
pom is offline   Reply With Quote
Old 10-10-2002, 07:48 PM   #5
JHallam
Dosed...By Flash!
 
Join Date: Feb 2001
Location: England - Nottm
Posts: 1,192
Send a message via Yahoo to JHallam
Default

you've done it! lol

YAAAAAAAAAAAAAAAAAY! lol

it's just the olde

____ Underscore ____

Magic-cal
JHallam is offline   Reply With Quote
Old 10-10-2002, 07:55 PM   #6
pom
Allez les Bleus!!!
 
pom's Avatar
 
Join Date: Oct 2002
Location: Paname
Posts: 2,495
Default

Nonono, I meant where it says "member"
pom is offline   Reply With Quote
Old 10-10-2002, 08:08 PM   #7
JHallam
Dosed...By Flash!
 
Join Date: Feb 2001
Location: England - Nottm
Posts: 1,192
Send a message via Yahoo to JHallam
Default

ooooooooooooooooooooohhh,

USER CP

Edit Profile

Custom text

there you go chappy
JHallam is offline   Reply With Quote
Old 10-10-2002, 09:32 PM   #8
pom
Allez les Bleus!!!
 
pom's Avatar
 
Join Date: Oct 2002
Location: Paname
Posts: 2,495
Default

??? I don't have it

OR

I'm going blind. Dunno yet.
pom is offline   Reply With Quote
Old 10-10-2002, 10:33 PM   #9
JHallam
Dosed...By Flash!
 
Join Date: Feb 2001
Location: England - Nottm
Posts: 1,192
Send a message via Yahoo to JHallam
Default

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!

Last edited by JHallam; 10-11-2002 at 12:16 PM..
JHallam is offline   Reply With Quote
Old 10-10-2002, 11:01 PM   #10
tg
done
 
Join Date: Jun 2001
Location: portland, or
Posts: 8,048
Default

gh, for some reason, some members don't have that option, i don't know if it depends on number of posts, or what...
__________________
tg
---
what the hell was i thinking?
tg is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:01 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.