Page 1 of 1

Login_Click issue in Flash Builder 3.5 SDK

Posted: 14 Jul 2011, 04:27
by normannorman
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)

Posted: 14 Jul 2011, 10:12
by Bax
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)

Posted: 15 Jul 2011, 03:21
by normannorman
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.

Posted: 15 Jul 2011, 09:28
by Bax
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.