how to trigger the parentclass method from the child class? - actionscript

I am new to AS 3.0. Please clear my doubts. I am preparing the game, which will initially display login page. After username validation, it enters into the game.
I have 2 separate pages for login and a game. To load all these files, I have main file which loads the login page and game file. When the preloaded completes, the login page opens. Using application domain, I will access the login button.
When the login button is pressed, the user name and password entered will be sent to the server for validation. If authenticated, the user enters the game.
Now the problem is, I want to show game screen based on the username validation response. I am not sure how to do this.

super() from constructors
super.functionYouAreInheriting() from inherited methods
remember to pass the appropiate arguments as well
http://ntt.cc/2009/07/26/beginning-actionscript-3-super-this-setter-getter.html

Related

Login form vs Login Dialogue - Delphi Application

For a mobile phone application, would it be better to have a login form (I'm thinking would be the main form), which when you pass authentification would take you to the "MainPage" form, or a login dialog which opens before the main form and only allows the main form to open if it passes authentification?
My thoughts would be as a mobile app, if you log out, you don't necessarily want the entire app to close therefore having the login form as the main form, would be there (keeping the application alive) until you want to fully close it. And vice versa, with the login dialogue, since the main form is once you've logged in, when you log out you'd close that form as you don't have access to it, and therefore close the app.
it is better to make the main form with a TPageControl with some pages, the first will occupe the password and others the app things.
when you verify the password, you can pass to other tabs.

Should it step 2 registration / onboarding be a method or a new controller?

So I'm working on an app. Registration of user is through omniauth, and using Twitter.
What I'd like to do is after that registration is complete, ask that you add your email.
Should I create a new controller called say setups, or should I create a method called setup under the users_controller?
Technically either is fine, I would however just drop them on their show action and prompt them there to enter their email address.

Google + signin 'signInCallback' not triggered on signInButton load

To give sign in with google, I am using Google+ sign button in html as per this link https://developers.google.com/+/web/signin/add-button . In the documentation it is mentioned that, after loading the signIn button, the signInCallback will be triggered with authResult, then we can proceed with our function on successful login.In my case, I am having signIn button in say example.com#signIn url only. Once successfully signed in, page will be different say example.com#homePage. Note : Not having signIn button in any other page
Similarly on logout, I need to call gapi.auth.signOut() function. This url https://developers.google.com/+/web/signin/sign-out says :
This method must be called after your sign-in button's callback has fired. A new authorization result object is passed to your sign-in callback function, this object will contain the user_signed_out value in its error property. When you detect this value, you can reset your client state and notify your server (if applicable) that the user has signed out.
To achieve this scenario, I am loading page which will render signInButton,then when signincallback get triggered, I am using gapi.auth.signOut(). But the issue I am facing is, when the page is loaded, sometime the signIncallback is triggered, sometime not getting triggered.
May I know what the issue could be?

Making user follow another user can get its twitter username

I have a button on my website which says "Follow"
When a user clicks on this button I want the following to happen:
Twitter login window opens
User enters user/password and logs in
User has now started following
That login window now closes (or a close button clicking on which closes the window) and user is back on my website and I get its twitter username through some API which user just entered so I can insert it in my database.
Is this possible?
What I want to achieve is, I want to get username of users who follow me and save them in database.
In case #penartur's answer doesn't work for you, you may want to look at: https://dev.twitter.com/docs/intents/events. Although I have to admit that I've never used it : )

Twitter oauth authorization in a pop-up instead of in main browser window

I feel incredibly stupid for even asking this since the answer might already be under my nose but here it goes:
TweetMeme has a Re-tweet twitter widget that publishers can place on their blogs. When a user clicks on the widget, it pops open a window which allows the user to authenticate themselves with twitter and then re-tweet.
This seems to use some special Twitter oauth popup form factor - unless there is something fancier happening under the surface to authenticate the user.
The pop-up window looks like this:
http://twitpic.com/1kepcr
I'd rather handle an authentication via a pop-up rather than send the user to a brand new page (for the app I'm working on) and they seem to have the most graceful solution. Thoughts on how they did this?
I think that the process is something like this (I assume that they have used php on server-side):
First it opens a jQuery-like popup, but it's not strictly related to twitter sign in functions.
The real sign-in process begin when you confirm that popup, so it open new popup, with some php inside, that # hold a session.
Those scripts ask to twitter the request tokens, using site's application params, and save them into $_SESSION array.
If it's all-right, twitter send you to twitter authenticate page (https://twitter.com/oauth/authenticate), and after you have inserted your login params, twitter send you to the callback page defiend by that site. Here there is another php page that request access tokens, and save them into $_SESSION array. If it's all-right now the site has params that he needs for querying your profile, so last scripts inside popup refresh opener window (main site) and close himself.
Now main window has all the interesting params inside $_SESSION array.
Check this useful library for all the server-side work.
All they're doing is opening a page http://api.tweetmeme.com/share?url=someURL&source=tweetmeme in a new window (using target _blank), then starting the process from there.
EDIT: I was looking at the wrong retweet button. For your specific example, clicking the retweet button first opens Tweetmeme page http://tweetmeme.com/ajax/partial?... in a new window. Clicking yes then initiates the OAuth process by sending you (still in that window) to https://twitter.com/oauth/authenticate (with appropriate parameters).

Resources