Referring to the problem description from your link:
Now if I call loginFails() or loginSuccess(), then its showing error because its in controller Index and not in other view controller. How to solve this?
In order to reference an element inside a required view, you have to use getView('elementId').
index.xml
<Alloy>
<Window id="fblogin" class="container">
<Require src="loginsuccess" id="loginsuccess"></Require>
<Require src="loginFailure" id="loginFailure"></Require>
<Require src="loginPage" id="loginPage"></Require>
</Window>
</Alloy>
loginsuccess.xml
<Alloy>
<View class="container" id="successContainer" visible="false">
<Label>Login Successful</Label>
</View>
</Alloy>
index.js
var successView = $.loginsuccess.getView('successContainer');
You can now perform your crossfade on successView.
Edit:
Added visible="false" to the container view