Login_Click issue in Flash Builder 3.5 SDK

Everything about the SmartFoxBits UI Components for SmartFoxServer 2X. Post your questions, suggestions and bug reports.

Moderators: Lapo, Bax

normannorman
Posts: 14
Joined: 09 Jul 2011, 16:08

Login_Click issue in Flash Builder 3.5 SDK

Postby normannorman » 14 Jul 2011, 04:27

is it me or is the Login_Click doesn't work in Flash Builder 3.5 SDK?
1. I named my loginBox component as "loginBox".
2. I've used your latest SWC for the Smartfoxbits 2x and imported the BitEvents from the com.smartfoxserver.smartfoxbits.events.BitEvents.

when i declare a new listener event to the "loginBox", i dont get the LOGIN_CLICK constant. i get the error,
Access to an undefined property LOGIN_CLICK through the reference with Static Type Class.


Code: Select all

LoginBox.addEventListener(BitEvent.LOGIN_CLICK, onLoginClickHandler)
User avatar
Bax
Site Admin
Posts: 4608
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 14 Jul 2011, 10:12

You have to add the listener to your class instance. Give the component an id, like lb, and then:

Code: Select all

lb.addEventListener(BitEvent.LOGIN_CLICK, onLoginClickHandler)
Paolo Bax
The SmartFoxServer Team
normannorman
Posts: 14
Joined: 09 Jul 2011, 16:08

Postby normannorman » 15 Jul 2011, 03:21

bax wrote:You have to add the listener to your class instance. Give the component an id, like lb, and then:

Code: Select all

lb.addEventListener(BitEvent.LOGIN_CLICK, onLoginClickHandler)


and how is that different from my code

Code: Select all

LoginBox.addEventListener(BitEvent.LOGIN_CLICK, onLoginClickHandler)
?

as I've said before, i did import and created an instance. the Login_click is not showing. all i can see is add_buddy_click, block_buddy_click,clear_click,custom_event,remove_buddy_click, room_change, send_msg_click, unblock_buddy_click,user_change.
User avatar
Bax
Site Admin
Posts: 4608
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 15 Jul 2011, 09:28

Sorry, I stopped to the first issue I saw in your code, as I thought you were adding the listener statically to the LoginBox class, instead of its instance.

Back to your issue, it seems you are using an old version of the SmartFoxBits. Download the latest version and make sure you update the SWC file in your project.
Paolo Bax
The SmartFoxServer Team

Return to “SmartFoxBits for SFS 2X”

Who is online

Users browsing this forum: No registered users and 3 guests