Friday, March 27, 2009

OOPs Interview Questions Part IV

Question: What is an interface? How to implement an interface? 
Answer: An Interface is a collection of semantically related abstract members. An interface expresses through the members it defines, the behaviors that a class needs to support. An interface is defined using the keyword interface. The members defined in an interface contain only definition, no implementation. The members of an interface are all public by default, any other access specifier cannot be used. 

An interface is implemented using implements keyword. A class may implement more than one keyword. 

When a class inherits and implements at the same time, the inherited parent class name is written first, followed by the names of the interfaces to be implemented. 

Question: Is multiple inheritance possible in .NET? 
Answer: No. Multiple inheritance is not possible in .NET. This means it is not possible for one class to inherit from multiple classes. However, a class may implement multiple interfaces. We may also declare objects of different classes in a class. This way, the encapsulated class may be instantiated in other classes. 

OOPs Interview Questions Part III

Question: What is the difference between abstract class and interface?
Answer: If a class is to serve the purpose of providing common fields and members to all subclasses, we create an Abstract class. For creating an abstract class, we make use of the abstract keyword. Such a class cannot be instantiated. Syntax below: 
abstract public class Vehicle { } 
Above, an abstract class named Vehicle has been defined. We may use the fields, properties and member functions defined within this abstract class to create child classes like Car, Truck, Bike etc. that inherit the features defined within the abstract class. To prevent directly creating an instance of the class Vehicle, we make use of the abstract keyword. To use the definitions defined in the abstract class, the child class inherits from the abstract class, and then instances of the Child class may be easily created.
Further, we may define abstract methods within an abstract class (analogous to C++ pure virtual functions) when we wish to define a method that does not have any default implementation. Its then in the hands of the descendant class to provide the details of the method. There may be any number of abstract methods in an abstract class. We define an abstract method using the abstract keyword. If we do not use the abstract keyword, and use the virtual keyword instead, we may provide an implementation of the method that can be used by the child class, but this is not an abstract method.
Remember, abstract class can have an abstract method, that does not have any implementation, for which we use the abstract keyword, OR the abstract class may have a virtual method, that can have an implementation, and can be overriden in the child class as well, using the override keyword. Read example below 
Example: Abstract Class with Abstract method?
namespace Automobiles
{
public abstract class Vehicle
{
public abstract void Speed() //No Implementation here, only definition
}
}

Example: Abstract Class with Virtual method
namespace Automobiles
{
public abstract class Vehicle
{
public virtual void Speed() //Can have an implementation, that may be overriden in child class
...
}
}

Public class Car : Vehicle
{
Public override void Speed() 
//Here, we override whatever implementation is there in the abstract class 
{
... //Child class implementation of the method Speed()
}
}
}

An Interface is a collection of semantically related abstract members. An interface expresses through the members it defines, the behaviors that a class needs to support. An interface is defined using the keyword interface. The members defined in an interface contain only definition, no implementation. The members of an interface are all public by default, any other access specifier cannot be used. See code below: 
Public interface IVehicle //As a convention, an interface is prefixed by letter I
{
Boolean HasFourWheels()
}

Question: Difference between Abstract Class and Interface
Answer: 1) A class may inherit only one abstract class, but may implement multiple number of Interfaces. Say a class named Car needs to inherit some basic features of a vehicle, it may inherit from an Aabstract class named Vehicle. A car may be of any kind, it may be a vintage car, a sedan, a coupe, or a racing car. For these kind of requirements, say a car needs to have only two seats (means it is a coupe), then the class Car needs to implement a member field from an interface, that we make, say ICoupe.
2) Members of an abstract class may have any access modifier, but members of an interface are public by default, and cant have any other access modifier.
3) Abstract class methods may OR may not have an implementation, while methods in an Interface only have a definition, no implementation. 
Question: What is Delegate
Answer: 
Definition:
Delegate is type which holds the method(s) reference in an object. It is also reffered as a type safe function pointers.
Advantages:
Encapsulating the method's call from caller. 
Effective use of Delegat improves the performance of application. 
Used to call a method asynchronously.
Declaration:
public delegate type_of_delegate delegate_name()
Example : public delegate int mydelegate(int delvar1,int delvar2)
Note:
you can use delegeate without parameter or with parameter list. 
you should follow the same syntax as in the method.
(if you are reffering the method with two int parameters and int return type the delegate which you are declaring should be the same format.This is how it is reffered as type safe function pointer)
Sample Program using Delegate :
public delegate double Delegate_Prod(int a,int b);
class Class1
{
static double fn_Prodvalues(int val1,int val2)
{
return val1*val2;
}
static void Main(string[] args)
{
//Creating the Delegate Instance
Delegate_Prod delObj = new Delegate_Prod(fn_Prodvalues);

Console.Write("Please Enter Values");
int v1 = Int32.Parse(Console.ReadLine());
int v2 = Int32.Parse(Console.ReadLine());
//use a delegate for processing
double res = delObj(v1,v2);
Console.WriteLine ("Result :"+res);
Console.ReadLine();
}
}
Explanation:
Here I have used a small program which demonstrates the use of delegate.
The delegate "Delegate_Prod" is declared with double return type and which accepts only two interger parameters.
Inside the Class the method named fn_Prodvalues is defined with double return type and two integer parameters.(The delegate and method is having the same signature and 
parameters type)
Inside the Main method the delegate instance is created and the function name is passed to the delegae instace as following.
Delegate_Prod delObj = new Delegate_Prod(fn_Prodvalues);
After this we are accepting the two values from the user and passing those values to the delegate as we do using method .
delObj(v1,v2);
Here delegate object encapsulates the method functionalities and return the result as we specified in the method. 
Multicast Delegate

It is a Delegate which holds the reference of more than one methods.

Multicast delegates must contain only methods that return void, else there is a run-time exception.
Simple Program using Multicast Delegate
delegate void Delegate_Multicast(int x, int y);
Class Class2
{
static void Method1(int x, int y) {
Console.WriteLine("You r in Method 1");
}
static void Method2(int x, int y) {
Console.WriteLine("You r in Method 2");
}
public static void Main() 
{
Delegate_Multicast func = new Delegate_Multicast(Method1);
func += new Delegate_Multicast(Method2);
func(1,2); // Method1 and Method2 are called
func -= new Delegate_Multicast(Method1);
func(2,3); // Only Method2 is called
}
Explanation:
In the above example you can see that two methods are defined named method1 and method2 whchi takes two integer parameters and return type as void.
In the main method the Delegate object is created using the following statement
Delegate_Multicast func = new Delegate_Multicast(Method1);
Then the Delegate is added using the += operator and removed using -= operator.

How do you implement push on a flex applications

Question :How do you implement push on a flex applications?
Answer :Using BlazeDS Server, LiveCycle Data Services,

I am going to add images into a tag. How will it resize itself

Question :I am going to add images into a tag. How will it resize itself?
Answer :To let Flex resize the image as part of laying out your application, set the height or width
properties to a percentage value. Flex attempts to resize components with percentage values for these
properties to the specified percentage of their parent container.

I am going to add images into a tag. How will it resize itself

Question :I am going to add images into a tag. How will it resize itself?
Answer :To let Flex resize the image as part of laying out your application, set the height or width
properties to a percentage value. Flex attempts to resize components with percentage values for these
properties to the specified percentage of their parent container.

What is a resource Manager

Question :What is a resource Manager??
Answer :the ResourceManager — now handles access to all localized resources in an application. Any
components that extend UIComponent, Formatter, or Validator now have a new resourceManager
property, which lets you easily access the singleton instance of this manager. If you’re writing some
other kind of class that needs to use the ResourceManager, you can call
ResourceManager.getInstance() to get a reference to it.

What are the similarities between java and flex

Question :What are the similarities between java and flex?
Answer :
Both can be used as client application, both have packages, OOP based , support XML , import
external packages, up casting, support ArrayCollection ,almost same primitive data types, both
support class library packaging( .jar , .swc).

What is the dynamic keyword used for

Question :What is the dynamic keyword used for?
Answer :Specifies that instances of a class may possess dynamic properties added at runtime. If you use
the dynamic attribute on a class, you can add properties to instances of that class at runtime. Classes
that are not marked as dynamic are considered sealed, which means that properties cannot be added
to instances of the class.

How do you implement push with flex data services

Question :How do you implement push with flex data services?
Answer :Using Blaze DS Server & LCDS

What are the methods called when a UI component is intialized

Question :What are the methods called when a UI component is intialized?
Answer :all components dispatch the following events that let you specify ActionScript to initialize a
component:
preInitialize
Dispatched when a component has been created in a rough state, and no children have been created.
initialize
Dispatched when a component and all its children have been created, but before the component size
has been determined.
creationComplete
Dispatched when the component has been laid out and the component is visible (if appropriate).

Can you write to the file system from flex

Question :Can you write to the file system from flex?
Answer :Yes .
import flash.filesystem.*;
private var stream:FileStream;
private function saveFile():void{
var file:File = File.desktopDirectory.resolvePath("HelloWorld.txt");
var stream:FileStream = new FileStream()
stream.open(file, FileMode.WRITE);
var str:String = "Congratulations on your 1st file, Rich Tretola - EverythingFlex.com";
stream.writeUTFBytes(str);
stream.close();
mx.controls.Alert.show("File has been saved to \n" + file.nativePath, "Notice");

What is a drag manager

Question :What is a drag manager?
Answer :The Flex Drag and Drop Manager lets you select an object, such as an item in a List control, or a
Flex control, such as an Image control, and then drag it over another component to add it to that
component.

How do you call javascript from Flex

Question :How do you call javascript from Flex?
Answer :: Using the ExternalInterface API to access JavaScript from Flex and Using the navigateToURL()
method in Flex. The navigateToURL() method is in the flash.net package
flash.external.ExternalInterface.call(function_name:String[, arg1, ...]):Object;
navigateToURL(request:URLRequest, window:String):void

How do you use a repeater

Question :How do you use a repeater?
Answer :

[Bindable]
public var myArray:Array=[1,2,3,4];
]]>

paddingRight="10" paddingTop="10">




What are three ways to skin a component in flex

Question :What are three ways to skin a component in flex?
Answer :: Skinning is the process of changing the appearance of a component by modifying or replacing its
visual elements. These elements can be made up of images, SWF files, or class files that contain
drawing API methods.
There are several ways that you can define skins: inline, by using the setStyle() method, and by using
Cascading Style Sheets (CSS).

How do you use css styles in flex

Question :How do you use css styles in flex?
Answer :External styles are defined in a separate file and can be used in any MXML file that references the
CSS file. You reference a CSS file into an MXML file with the source property of the
tag, as follows:

Embedded styles are defined in an MXML file and can only be used in that file. Embedded styles
are defined with the tag, as follows:

.myclass { background-color: xFF0000 }
TextInput { font-family: Helvetica; font-size: 12pt }




Inline styles are defined in an MXML tag and can only be used in that tag. Inline styles are defined
as follows:

What is the difference between sealed class and dynamic classes

Question :What is the difference between sealed class and dynamic classes?
Answer :Classes are sealed by default, i.e. properties cannot be added dynamically at runtime.
1) Dynamic classes can add additional dynamic properties at runtime; sealed classes cannot.
2) Sealed classes conserve memory because no internal hash table is needed to store dynamic
properties, and the compiler can provide better error feedback.

What is MVC and how do you relate it to flex apps

Question :What is MVC and how do you relate it to flex apps?
Answer :: (Separation of concerns) The goal of the Model-View-Controller (MVC) architecture is that by
creating components with a well-defined and limited scope in your application, you increase the
reusability of the components and improve the maintainability of the overall system. Using the MVC
architecture, you can partition your system into three categories of components:
* Model components Encapsulates data and behaviors related to the data.
* View components Defines your application's user interface.
* Controller components Handles the data interconnectivity in your application.

What is state what is the difference between states and ViewStack

Question :What is state? what is the difference between states and ViewStack?
Answer :The State class defines a view state, a particular view of a component. For example, a product
thumbnail could have two view states; a base view state with minimal information, and a rich view
state with additional information. The overrides property specifies a set of child classes to add or
remove from the base view state, and properties, styles, and event handlers to set when the view state
is in effect. You use the State class in the states property of Flex components. You can only specify a states
property at the root of an application or a custom control, not on child controls.
Diff :
1) View Stack is to handle different MXML file eg TAB control and states is the transition within
single MXML file.
2) ViewStack should be used were there is complete change in the controls used and States should be
used when you just want to add or remove a few components based on certain conditions.
3) ViewStates are virtual state of an existing page apearing at an instance i.e. only one state can be
shown at a time while viewStack are collection of different view containers which can be shown at a time

How does item renderer work How do I add item renderer at runtime

Question : How does item renderer work? How do I add item renderer at runtime?
Answer :: Each list control has a default mechanism for controlling the display of data, or view, and lets
you override that default. To override the default view, you create a custom item renderer.
Note: With reusable inline item renderers you use data binding to bind to the item renderer. When
you use a component as an item renderer, you do not use data binding but specify the name of the
custom component to use as an item renderer.
Add itemrendrer at run time: Create the basic item renderer. One of the things I needed to accomplish
with my item renderer was the ability to add it to different columns (ie the dataField was not always
the same). This meant I needed a way from within the renderer to determine what column it was
bound to so I could get and display the correct data. To do this the renderer needs to implement the
IDropInListItemRenderer. This interface allows the renderer to have access to information about the
list and column it is in via the BaseListData and DataGridListData classes. The DataGridListData
gives you everything you need to get the data required to make a flexible, reusable renderer.
To Modify itemrenderer at runtime we Need to use mx.core.ClassFactory. Basically, in order to
change a Flex itemRenderer at runtime, you need to cast it to a type ClassFactory.

What keyword allows you to refer to private variables of a class

Question :What keyword allows you to refer to private variables of a class?
Answer :private keyword , this keyworld

How polymorphism works on actionscript

Question :How polymorphism works on actionscript?
Answer :class UnpaidIntern extends Employee {
override public function receivePayment():Number {
return 0;
}
}
class Manager extends Employee {
override public function receivePayment():Number {
return baseSalary*3;
}
}
class Engineer extends Employee {
override public function receivePayment():Number {
return this.baseSalary*2;
}
}
class Employee {
internal var baseSalary:Number = 1000;
public function receivePayment():Number {
return this.baseSalary;
}
}

How do you overload functions in actionscript

Question :How do you overload functions in actionscript?
Answer :Method overloading using namespaces.

What is dynamic keyword used for

Question :What is dynamic keyword used for?
Answer :Dynamic classes, which allow you to programmatically add new properties and behavior to
classes during the run-time. Just add the magic keyword dynamic to the class definition:
dynamic class Person {
var name:String;
}
Now let’s add dynamically two variables name and age and the function printme() to the object of
type Person:
Person p= new Person();
p.name=”Joe”;
p.age=25;
p.printMe = function () {
trace (p.name, p.age);
}
p.printMe(); // Joe 25

What are sealed classes

Question :What are sealed classes ?
Answer :A sealed class possesses only the fixed set of properties and methods that were defined at
compile-time; additional properties and methods cannot be added. This makes stricter compile-time
checking possible, resulting in more robust programs.

What are runtime shared libraries

Question :What are runtime shared libraries?
Answer :Macromedia Flex 1.5 you can build runtime shared libraries (RSLs) that can be individually loaded,
cached, and used by multiple applications.
Use Flex 3 runtime-shared-libraries (RSLs) to reduce the size of your applications and thereby
reduce the time required to download the application. RSLs are just SWF files whose code is used as
a shared library between different application SWF files. There are two kinds of RSLs, signed and
unsigned. Signed RSLs are libraries that are signed by Adobe and may be stored in the Flash Player
Cache, which can be accessed by applications from any domain. This means if your application is
using a signed RSL, the RSL may not even need to be downloaded if the RSL is already in the Flash
Player Cache. The signed RSL may have been put into the Flash Player Cache by visiting another
web site that was using the same signed RSL. Signed RSLs have a "swz" extension.
Unsigned RSLs are normal SWF files and are not loaded into the Flash Player Cache. Instead, these
RSLs rely on the browser's cache to keep them from being downloaded.

What is cairnghorm ? how do you use it Have you worked with Cairnghorn

Question :What is cairnghorm ? how do you use it?Have you worked with Cairnghorn?
Answer :Cairngorm is the lightweight micro-architecture for Rich Internet Applications built in Flex or
AIR. A collaboration of recognized design patterns, Cairngorm exemplifies and encourages bestpractices
for RIA development advocated by Adobe Consulting, encourages best-practice leverage of
the underlying Flex framework, while making it easier for medium to large teams of software
engineers deliver medium to large scale, mission-critical Rich Internet Applications.
The benefits of the Cairngorm architecture are realized when developing complex RIA applications
with multiple use-cases and views, with a team of developers, and with a multi-disciplinary
development team that includes designers as well as creative and technical developers.
How is the MVC pattern carried out in a Flex + Cairngorm application?
- Model:???? Role of the ModelLocator & Model Objects
- View:???? Role of View Components & Event Objects
- Controller: Role of the FrontController & Command Objects

What keyword allows you to implement abstraction better

Question :What keyword allows you to implement abstraction better?
Answer :Flex does not support abstart class directly.

What design patterns have you used in Actionscript and java

Question :What design patterns have you used? in Actionscript and java?
Answer :1. Creational Pattern
* Factory Method Pattern
* Singleton Pattern
2. Structural Patterns
* Decorator Pattern
* Adapter Pattern
* Coposite Pattern
3. Behavioral Patterns
* Command Pattern
* Observer Pattern
* Template Metod Pattern
* State Pattern
* Strategy Pattern
4. Multiple Patterns
* MVC Pattern
* Symetric Proxy Pattern

Explain how binding works in mxml components.

Question :Explain how binding works in mxml components.
Answer :Binding in MXML
Lets look at the following code…


Here you are binding the text property of the TextInput to the label. So whatever you type in the
textInput automatically reflects in the label. That’s the power of Binding…
The best practice for defining components that return information back to the main application is to
design the component to dispatch an event that contains the return data. In that way, the main
application can define an event listener to handle the event and take the appropriate action. You also
use events in data binding. The following example uses the Bindable metadata tag to make
useShortNames a bindable property. The implicit setter for the useShortNames property dispatches
the change event that is used internally by the Flex framework to make data binding work.

What’s the difference between ChangeWatcher.watch, and BindingUtils.bindProperty

Question :What’s the difference between ChangeWatcher.watch, and BindingUtils.bindProperty?
Answer :ChangeWatcher:
Acts like the watch on AS2. It watches a variable for changes and when something happens fires an
event. Make sure you call the canWatch to ensure that you can watch it!
There are 3 ways to specify the second parameter, the chain.
1. A String containing the name of a public bindable property of the host object.
ChangeWatcher.watch(this, "myvar", handler)
2. An Object in the form: { name: property name, access: function(host) { return host[name] } }.
The Object contains the name of a public bindable property, and a function which serves as a getter
for that property.
ChangeWatcher.watch(this, { name:"myvar", getter: function():String { return "something" }},
handler);
3. A non-empty Array containing any combination of the first two options. This represents a chain
of bindable properties accessible from the host. For example, to watch the property host.a.b.c, call
the method as: watch(host, ["a","b","c"]
BindingUtils.bindProperty
Works pretty much the same way as the watch, but instead of having to handle and event it allows
you to immediately bind two properties one-way.
The first two parameters are for the the target, the second parameters are the triggers.
BindingUtils.bindProperty( this, "va1", this, "var2");
Note : Make sure you add the flex framework.swc to your project Library Path to have access to the
mx.binding.util class.

Why would you want to keep a reference to a ChangeWatcher and call unwatch()

Question :Why would you want to keep a reference to a ChangeWatcher and call unwatch()?
Answer :So we can reattach the watcher again & We can change the source object (of changewatcher) by
reset method.
The ChangeWatcher class defines utility methods that you can use with bindable Flex properties.
These methods let you define an event handler that is executed whenever a bindable property is
updated.
unwatch () method:
Detaches this ChangeWatcher instance, and its handler function, from the current host. You can use
the reset() method to reattach the ChangeWatcher instance, or watch the same property or chain on a
different host object.
public function unwatch():void

How do you add event listeners in mxml components. Now AS3 components

Question :How do you add event listeners in mxml components. Now AS3 components?
Answer :1) addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0,
useWeakReference:Boolean = false):void
2) removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
3) dispatchEvent(event:Event):Boolean
4) hasEventListener(type:String):Boolean
5) willTrigger(type:String):Boolean

What does calling preventDefault() on an event do How is this enforced

Question :What does calling preventDefault() on an event do? How is this enforced?
Answer :Cancels an event's default behavior if that behavior can be canceled.. For example, the
doubleClick event has an associated default behavior that highlights the word under the mouse
pointer at the time of the event. Your event listener can cancel this behavior by calling the
preventDefault() method.
You can use the Event.cancelable property to check whether you can prevent the default behavior
associated with a particular event. If the value of Event.cancelable is true, then preventDefault() can
be used to cancel the event; otherwise, preventDefault() has no effect.

What is the problem with calling setStyle()

Question :What is the problem with calling setStyle()?
Answer :Calling the setStyle() method can result in decreased performance. Use it only when necessary.
You should try to apply style sheets rather than use the setStyle() method because it is
computationally expensive. This method should only be used when you are changing an object's
styles during run time.
You cannot get or set style properties directly on a component as you can with other properties.
Instead, you set style properties at run time by using the getStyle() and setStyle() ActionScript
methods.

Explain the difference between creating an effect and setting the target as opposed to adding an

Question :Explain the difference between creating an effect and setting the target as opposed to adding an
effectListener


Answer :To create a behavior, you define a specific effect with a unique ID and bind it to the trigger.
For example, the following code creates two zoom effects: one for shrinking the component slightly,
and one for reverting it to its original size. These effects are assigned, by using their unique IDs, to
the mouseDownEffect and mouseUpEffect triggers on the Button component.



paddingLeft="10" paddingRight="10" autoLayout="false" left="41" top="24" right="42">
mouseDownEffect="{shrink}" mouseUpEffect="{revert}"/>

How do you identify a component created in a repeater

Question :How do you identify a component created in a repeater?
Answer :: If currentIndex value is greater than startIndex value means a component is created in Repeater.
We can use count property to find number of children.
A Repeater component executes initially when it is instantiated. If the Repeater component's
dataProvider property exists, it proceeds to instantiate its children, and they instantiate their
children, recursively.
The Repeater component re-executes whenever its dataProvider, startingIndex, or count
properties are set or modified either explicitly in ActionScript, or implicitly by data binding.
When a Repeater component re-executes, it destroys any children that it previously created
(assuming the recycleChildren property is set to false), and then reinstantiates its children based
on the current dataProvider property.

Differences between defining bindings in MXML and ActionScript

Question :Differences between defining bindings in MXML and ActionScript?
Answer :: There are a few differences between defining data bindings in MXML at compile time and in
defining them at runtime in ActionScript:
* You cannot include ActionScript code in a data binding expression defined by the bindProperty()
or bindSetter() method. Instead, use the bindSetter() method to specify a method to call when the
binding occurs.
* You cannot include an E4X expression in a data binding expression defined in ActionScript.
* You cannot include functions or array elements in property chains in a data binding expression
defined by the bindProperty() or bindSetter() method. For more information on property chains, see
Working with bindable property chains.
* The MXML compiler has better warning and error detection support than runtime data bindings
defined by the bindProperty() or bindSetter() method.

What is the difference between httpService and Data Service

Question :What is the difference between httpService and Data Service?
Answer :The Flex presentation layer communicates with the business layer by using Flex
data services, which are objects you insert in a Flex file. Specifically, you can use Flex data services
to interact with the following:
* Web services
* HTTP services
* Remote objects
A Flex data service is an object you insert in an MXML file to communicate with the business layer
of a multi-tier application. You use data services to send and receive data from web services, HTTP
URLs, and remote objects such as server-based Java objects.
An HTTP service is nothing more than an HTTP request to a URL. The primary purpose of HTTP
services is to retrieve XML data from an external source.

: How do you generate random numbers within a given limit with actionscript

Question :: How do you generate random numbers within a given limit with actionscript?
Answer :public function randRange(min:Number, max:Number):Number {
var randomNum:Number = Math.floor(Math.random() * (max - min + 1)) + min;
return randomNum;
}

What are the methods called when a UI component is intialized

Question :What are the methods called when a UI component is intialized?
Answer :createChildren()

What is a drag manager

Question :What is a drag manager?
Answer :The DragManager class manages drag and drop operations, which let you move data from one place
to another in a Flex application. For example, you can select an object, such as an item in a List
control or a Flex control, such as an Image control, and then drag it over another component to add it
to that component.
All methods and properties of the DragManager are static, so you do not need to create an instance of
it.
All Flex components support drag and drop operations. Flex provides additional support for drag and
drop to the List, Tree, and DataGrid controls.
When the user selects an item with the mouse, the selected component is called the drag initiator. The
image displayed during the drag operation is called the drag proxy.
When the user moves the drag proxy over another component, the dragEnter event is sent to that
component. If the component accepts the drag, it becomes the drop target and receives dragOver,
dragExit, and dragDrop events.
When the drag is complete, a dragComplete event is sent to the drag initiator.

How do you call javascript from Flex

Question :How do you call javascript from Flex?
Answer :The ExternalInterface class is the External API, an application programming interface that enables
straightforward communication between ActionScript and the Flash Player container– for example,
an HTML page with JavaScript. Adobe recommends using ExternalInterface for all JavaScript-
ActionScript communication.
You can call an ActionScript function in Flash Player, using JavaScript in the HTML page. The
ActionScript function can return a value, and JavaScript receives it immediately as the return value
of the call.
This functionality replaces the fscommand() method.
The ExternalInterface class requires the user's web browser to support either ActiveX® or the
NPRuntime API that is exposed by some browsers for plug-in scripting. Even if a browser and
operating system combination are not listed above, they should support the ExternalInterface class if
they support the NPRuntime API. See http://www.mozilla.org/projects/plugins/npruntime.html.
Note: When embedding SWF files within an HTML page, make sure that the id and name attributes
of the object and embed tags do not include the following characters: . - + * / \
From ActionScript, you can do the following on the HTML page:
•Call any JavaScript function.
•Pass any number of arguments, with any names.
•Pass various data types (Boolean, Number, String, and so on).
•Receive a return value from the JavaScript function.
From JavaScript on the HTML page, you can:
•Call an ActionScript function.
•Pass arguments using standard function call notation.
•Return a value to the JavaScript function.
Flash Player does not currently support SWF files embedded within HTML forms.

How do you use a repeater

Question :How do you use a repeater?
Answer :: The Repeater class is the runtime object that corresponds to the tag. It creates
multiple instances of its subcomponents based on its dataProvider. The repeated components can be
any standard or custom controls or containers.
You can use the tag anywhere a control or container tag is allowed, with the
exception of the container tag. To repeat a user interface component, you place
its tag in the tag. You can use more than one tag in an MXML
document. You can also nest tags.
You cannot use the tag for objects that do not extend the UIComponent class.
MXML Syntax Hide MXML Syntax
The class has the following properties:
recycleChildren="false|true" startingIndex="0"
Events
repeat="No default" repeatEnd="No default" repeatStart="No default" >

What is state what is the difference between states and ViewStack

Question :What is state? what is the difference between states and ViewStack?
Answer :View Stack is to handle different MXML file eg TAB control. And states is the transition within
single MXML file
ViewStack should be used were there is complete change in the controls used and States should be
used when you just want to add or remove a few components based on certain conditions.
Login/Registration/Forgot password is the best example for using States as each page will either add
or remove to the already existing one.

Can I dynamically instantiate a WebService or HTTPService in ActionScript

Question :Can I dynamically instantiate a WebService or HTTPService in ActionScript?
Answer :Flex 1.5 does not support this. First declare the tags in MXML and then manipulate the URLs,
request objects, and so forth using ActionScript.

Can I load CSS style sheets dynamically at runtime

Question :Can I load CSS style sheets dynamically at runtime?
Answer :Dynamic loading of CSS files is not supported in Flex. CSS in Flex is processed on the server side
during MXML compilation rather than on the client side at runtime. There is a trick though: A CSS
file can be compiled into a separate SWF file and loaded dynamically into the application using the
Loader component.

: When I set visible="false", the component still takes up space and appears in the tab order. Why is

Question :: When I set visible="false", the component still takes up space and appears in the tab order. Why is
that?

Answer :You can often achieve the "display=none" effect by setting the height/width to zero when you set it
invisible, and then set it back to a fixed value or to undefined when you make it visible again.

Why are my ValueObject member variables undefined in the results from my RemoteObject requests

Question :Why are my ValueObject member variables undefined in the results from my RemoteObject requests?
Answer :Flash Player deserializes objects in a special order that can confuse developers used to object
serialization from other RPC systems. When a strongly typed object is returned to the player, it first
creates an instance from the prototype of the registered class without calling the constructor. It then
populates the object with the properties sent in the result. Finally, it calls the constructor without
arguments.
If your ValueObject constructor expects arguments to initialize an instance, be sure to check whether
arguments were actually sent to the constructor before overriding member variable values.

Why do strongly typed objects appear as "undefined" in the NetConnection Debugger

Question :Why do strongly typed objects appear as "undefined" in the NetConnection Debugger?
Answer :The NetConnection Debugger is an old utility from the early days of Flash Remoting that some
developers still find useful. It has an issue, however, displaying types that have been registered with
Object.registerClass(). If your Flex server is installed locally, we suggest enabling server-side
"debug" level logging in /WEB-INF/flex/gateway-config.xml to watch the raw trace information in
the Flex server console/logs from the AMF Gateway as it processes your RemoteObject requests.
Flex Builder also includes a Network Debugger that allows you to monitor AMF traffic.

How do I get access to the J2EE session from my RemoteObjects

Question :How do I get access to the J2EE session from my RemoteObjects?
Answer :The AMF Gateway provides access to the current HttpServletRequest instance in a thread local
variable. The session can be obtained from the request, as follows:
flashgateway.Gateway.getHttpRequest().getSession();

Can I resize the Internet Explorer browser window from Flex

Question :Can I resize the Internet Explorer browser window from Flex?
Answer :Use getURL() to communicate with JavaScript in the HTML wrapper:
getURL('javascript:window.resizeTo(1050,900)');

Is double-clicking supported on various components

Question :Is double-clicking supported on various components?
Answer :Unfortunately, double-clicking is not supported by default. If you wish to add this functionality to,
say, a List or DataGrid component, you will have to add the following ActionScript 2.0 code to your
application:
var someTimestamp:Number;
public function doubleClickHandler( evt:Object ):Void {
var now = getTimer();
// we got a double-click
if( ( now - someTimestamp ) < 500 ) {
// do something here ...
}
someTimestamp = now;
}

Why are there errors with the macromedia.css.LocatorParser class and WebLogic

Question :Why are there errors with the macromedia.css.LocatorParser class and WebLogic?
Answer :WebLogic ships with its own version of the fop.jar, which in turn includes the batik.jar, which is
older and breaks Flex. To resolve this issue, remove the fop.jar from the CLASSPATH in the
startWebLogic.cmd file. This may apply to non-WebLogic servers as well, where batik.jar was
included.

What does "The URL is not in the Proxy's whitelist" mean

Question :What does "The URL is not in the Proxy's whitelist" mean?
Answer :The whitelist is a security feature in Flex that requires you to define explicitly which URLs a data
service call can access.
You set this by editing the following file: ...\[flexroot]\WEB-INF\flex\flex-config.xml
There are three sections, one each for WebService, HTTPService, and RemoteObject. Be sure you
edit the correct section! Each has a subsection which contains nodes. To enable a URL for access by
a Flex dataService call, enter that URL between the tags.
For development phase only, you can allow global access with the wildcard rows. The flex-config
file is heavily commented. Open it up and you will see more detailed instructions there.

: Sometimes, if I don't move the mouse, "click" and "mouseDown" don't work. Why is that

Question :Sometimes, if I don't move the mouse, "click" and "mouseDown" don't work. Why is that?
Answer :This is a focus issue with Flash Player; usually when the UI changes "underneath" the mouse pointer,
as in a ViewStack navigation where the buttons are in the same screen location.

Why is myTreeNode.label or myTreeNode.attributes.label undefined

Question :Why is myTreeNode.label or myTreeNode.attributes.label undefined?
Answer :Make sure you use the TreeDataProvider methods to modify a node. Don't rely on the node being
XML. For example, the above should be myTreeNode.getProperty("label") instead.

When I add or modify an item in my dataProvider, why doesn't it show up in my DataGrid

Question :When I add or modify an item in my dataProvider, why doesn't it show up in my DataGrid?
Answer :Low-level methods like Array.push() or myArray[0] = "whatever" do not cause the
dataProvider's modelChanged event to fire.
When you work with a dataProvider, it is always best to use the dataProvider API. In the above
example, you might code: myDataProvider.addItem(myItemObject) to add an item or use
editField() to modify a value programmatically.
Alternatively, you can call myDataProvider.modelChanged yourself or reassign dataProvider to
the control, as follows: myDataGrid.dataProvider = myDataProvider;

myTree appears just fine but why can't I access the node attributes

Question :myTree appears just fine but why can't I access the node attributes?
Answer :Select a node in your myTree. In ActionScript, you can reference this node by using the following
code: myTree.selectedNode;
To access the attributes of the node, use the tree DataProvider API. These methods will work for
any format dataProvider item, which might be an object, array, or XML node.
The following example might work: myTree.selectedNode.attributes.myAttribute
But the following example is far more reliable:
myTree.selectedNode.getProperty("myAttribute");

How do I get Flex to query my database

Question :How do I get Flex to query my database?
Answer :Flex does not have any native database integration functionality. You must have your own server-side
tier that provides the database-access tier and sends the data back to Flex through one of the
following protocols:
•RemoteObjects: This is the fastest. It communicates with server-side EJBs or POJOs using
AMF, a binary compressed format.
•HTTPService: This one uses the HTTP protocol. Sources can be JSP, ASPx, .NET, or any
URL that returns HTTP.
•WebService: This is the slowest. It uses the SOAP protocol. Sources can be .NET or any web
service.

I'm sending my request, and I see the data traffic in the command window, but why is the result always

Question :I'm sending my request, and I see the data traffic in the command window, but why is the result always
empty?


Answer :You are probably trying to read the result immediately after the send(), right? You're expecting
synchronous behavior?

How do you implement push on a flex applications

Question :How do you implement push on a flex applications?
Answer :Using BlazeDS Server, LiveCycle Data Services,

I am going to add images into a tag. How will it resize itself

Question :I am going to add images into a tag. How will it resize itself?
Answer :To let Flex resize the image as part of laying out your application, set the height or width
properties to a percentage value. Flex attempts to resize components with percentage values for these
properties to the specified percentage of their parent container.

I am going to add images into a tag. How will it resize itself

Question :I am going to add images into a tag. How will it resize itself?
Answer :To let Flex resize the image as part of laying out your application, set the height or width
properties to a percentage value. Flex attempts to resize components with percentage values for these
properties to the specified percentage of their parent container.

What is a resource Manager

Question :What is a resource Manager??
Answer :the ResourceManager — now handles access to all localized resources in an application. Any
components that extend UIComponent, Formatter, or Validator now have a new resourceManager
property, which lets you easily access the singleton instance of this manager. If you’re writing some
other kind of class that needs to use the ResourceManager, you can call
ResourceManager.getInstance() to get a reference to it.

What are the similarities between java and flex

Question :What are the similarities between java and flex?
Answer :
Both can be used as client application, both have packages, OOP based , support XML , import
external packages, up casting, support ArrayCollection ,almost same primitive data types, both
support class library packaging( .jar , .swc).

What is the dynamic keyword used for

Question :What is the dynamic keyword used for?
Answer :Specifies that instances of a class may possess dynamic properties added at runtime. If you use
the dynamic attribute on a class, you can add properties to instances of that class at runtime. Classes
that are not marked as dynamic are considered sealed, which means that properties cannot be added
to instances of the class.

How do you implement push with flex data services

Question :How do you implement push with flex data services?
Answer :Using Blaze DS Server & LCDS

What are the methods called when a UI component is intialized

Question :What are the methods called when a UI component is intialized?
Answer :all components dispatch the following events that let you specify ActionScript to initialize a
component:
preInitialize
Dispatched when a component has been created in a rough state, and no children have been created.
initialize
Dispatched when a component and all its children have been created, but before the component size
has been determined.
creationComplete
Dispatched when the component has been laid out and the component is visible (if appropriate).

Can you write to the file system from flex

Question :Can you write to the file system from flex?
Answer :Yes .
import flash.filesystem.*;
private var stream:FileStream;
private function saveFile():void{
var file:File = File.desktopDirectory.resolvePath("HelloWorld.txt");
var stream:FileStream = new FileStream()
stream.open(file, FileMode.WRITE);
var str:String = "Congratulations on your 1st file, Rich Tretola - EverythingFlex.com";
stream.writeUTFBytes(str);
stream.close();
mx.controls.Alert.show("File has been saved to \n" + file.nativePath, "Notice");

What is a drag manager

Question :What is a drag manager?
Answer :The Flex Drag and Drop Manager lets you select an object, such as an item in a List control, or a
Flex control, such as an Image control, and then drag it over another component to add it to that
component.

How do you call javascript from Flex

Question :How do you call javascript from Flex?
Answer :: Using the ExternalInterface API to access JavaScript from Flex and Using the navigateToURL()
method in Flex. The navigateToURL() method is in the flash.net package
flash.external.ExternalInterface.call(function_name:String[, arg1, ...]):Object;
navigateToURL(request:URLRequest, window:String):void

How do you use a repeater

Question :How do you use a repeater?
Answer :

[Bindable]
public var myArray:Array=[1,2,3,4];
]]>

paddingRight="10" paddingTop="10">




What are three ways to skin a component in flex

Question :What are three ways to skin a component in flex?
Answer :: Skinning is the process of changing the appearance of a component by modifying or replacing its
visual elements. These elements can be made up of images, SWF files, or class files that contain
drawing API methods.
There are several ways that you can define skins: inline, by using the setStyle() method, and by using
Cascading Style Sheets (CSS).

How do you use css styles in flex

Question :How do you use css styles in flex?
Answer :External styles are defined in a separate file and can be used in any MXML file that references the
CSS file. You reference a CSS file into an MXML file with the source property of the
tag, as follows:

Embedded styles are defined in an MXML file and can only be used in that file. Embedded styles
are defined with the tag, as follows:

.myclass { background-color: xFF0000 }
TextInput { font-family: Helvetica; font-size: 12pt }




Inline styles are defined in an MXML tag and can only be used in that tag. Inline styles are defined
as follows:

What is the difference between sealed class and dynamic classes

Question :What is the difference between sealed class and dynamic classes?
Answer :Classes are sealed by default, i.e. properties cannot be added dynamically at runtime.
1) Dynamic classes can add additional dynamic properties at runtime; sealed classes cannot.
2) Sealed classes conserve memory because no internal hash table is needed to store dynamic
properties, and the compiler can provide better error feedback.

What is MVC and how do you relate it to flex apps

Question :What is MVC and how do you relate it to flex apps?
Answer :: (Separation of concerns) The goal of the Model-View-Controller (MVC) architecture is that by
creating components with a well-defined and limited scope in your application, you increase the
reusability of the components and improve the maintainability of the overall system. Using the MVC
architecture, you can partition your system into three categories of components:
* Model components Encapsulates data and behaviors related to the data.
* View components Defines your application's user interface.
* Controller components Handles the data interconnectivity in your application.

What is state what is the difference between states and ViewStack

Question :What is state? what is the difference between states and ViewStack?
Answer :The State class defines a view state, a particular view of a component. For example, a product
thumbnail could have two view states; a base view state with minimal information, and a rich view
state with additional information. The overrides property specifies a set of child classes to add or
remove from the base view state, and properties, styles, and event handlers to set when the view state
is in effect. You use the State class in the states property of Flex components. You can only specify a states
property at the root of an application or a custom control, not on child controls.
Diff :
1) View Stack is to handle different MXML file eg TAB control and states is the transition within
single MXML file.
2) ViewStack should be used were there is complete change in the controls used and States should be
used when you just want to add or remove a few components based on certain conditions.
3) ViewStates are virtual state of an existing page apearing at an instance i.e. only one state can be
shown at a time while viewStack are collection of different view containers which can be shown at a time

How does item renderer work How do I add item renderer at runtime

Question : How does item renderer work? How do I add item renderer at runtime?
Answer :: Each list control has a default mechanism for controlling the display of data, or view, and lets
you override that default. To override the default view, you create a custom item renderer.
Note: With reusable inline item renderers you use data binding to bind to the item renderer. When
you use a component as an item renderer, you do not use data binding but specify the name of the
custom component to use as an item renderer.
Add itemrendrer at run time: Create the basic item renderer. One of the things I needed to accomplish
with my item renderer was the ability to add it to different columns (ie the dataField was not always
the same). This meant I needed a way from within the renderer to determine what column it was
bound to so I could get and display the correct data. To do this the renderer needs to implement the
IDropInListItemRenderer. This interface allows the renderer to have access to information about the
list and column it is in via the BaseListData and DataGridListData classes. The DataGridListData
gives you everything you need to get the data required to make a flexible, reusable renderer.
To Modify itemrenderer at runtime we Need to use mx.core.ClassFactory. Basically, in order to
change a Flex itemRenderer at runtime, you need to cast it to a type ClassFactory.

What keyword allows you to refer to private variables of a class

Question :What keyword allows you to refer to private variables of a class?
Answer :private keyword , this keyworld

How polymorphism works on actionscript

Question :How polymorphism works on actionscript?
Answer :class UnpaidIntern extends Employee {
override public function receivePayment():Number {
return 0;
}
}
class Manager extends Employee {
override public function receivePayment():Number {
return baseSalary*3;
}
}
class Engineer extends Employee {
override public function receivePayment():Number {
return this.baseSalary*2;
}
}
class Employee {
internal var baseSalary:Number = 1000;
public function receivePayment():Number {
return this.baseSalary;
}
}

How do you overload functions in actionscript

Question :How do you overload functions in actionscript?
Answer :Method overloading using namespaces.

What is dynamic keyword used for

Question :What is dynamic keyword used for?
Answer :Dynamic classes, which allow you to programmatically add new properties and behavior to
classes during the run-time. Just add the magic keyword dynamic to the class definition:
dynamic class Person {
var name:String;
}
Now let’s add dynamically two variables name and age and the function printme() to the object of
type Person:
Person p= new Person();
p.name=”Joe”;
p.age=25;
p.printMe = function () {
trace (p.name, p.age);
}
p.printMe(); // Joe 25

What are sealed classes

Question :What are sealed classes ?
Answer :A sealed class possesses only the fixed set of properties and methods that were defined at
compile-time; additional properties and methods cannot be added. This makes stricter compile-time
checking possible, resulting in more robust programs.

What are runtime shared libraries

Question :What are runtime shared libraries?
Answer :Macromedia Flex 1.5 you can build runtime shared libraries (RSLs) that can be individually loaded,
cached, and used by multiple applications.
Use Flex 3 runtime-shared-libraries (RSLs) to reduce the size of your applications and thereby
reduce the time required to download the application. RSLs are just SWF files whose code is used as
a shared library between different application SWF files. There are two kinds of RSLs, signed and
unsigned. Signed RSLs are libraries that are signed by Adobe and may be stored in the Flash Player
Cache, which can be accessed by applications from any domain. This means if your application is
using a signed RSL, the RSL may not even need to be downloaded if the RSL is already in the Flash
Player Cache. The signed RSL may have been put into the Flash Player Cache by visiting another
web site that was using the same signed RSL. Signed RSLs have a "swz" extension.
Unsigned RSLs are normal SWF files and are not loaded into the Flash Player Cache. Instead, these
RSLs rely on the browser's cache to keep them from being downloaded.

What is cairnghorm ? how do you use it Have you worked with Cairnghorn

Question :What is cairnghorm ? how do you use it?Have you worked with Cairnghorn?
Answer :Cairngorm is the lightweight micro-architecture for Rich Internet Applications built in Flex or
AIR. A collaboration of recognized design patterns, Cairngorm exemplifies and encourages bestpractices
for RIA development advocated by Adobe Consulting, encourages best-practice leverage of
the underlying Flex framework, while making it easier for medium to large teams of software
engineers deliver medium to large scale, mission-critical Rich Internet Applications.
The benefits of the Cairngorm architecture are realized when developing complex RIA applications
with multiple use-cases and views, with a team of developers, and with a multi-disciplinary
development team that includes designers as well as creative and technical developers.
How is the MVC pattern carried out in a Flex + Cairngorm application?
- Model:???? Role of the ModelLocator & Model Objects
- View:???? Role of View Components & Event Objects
- Controller: Role of the FrontController & Command Objects

What keyword allows you to implement abstraction better

Question :What keyword allows you to implement abstraction better?
Answer :Flex does not support abstart class directly.

What design patterns have you used in Actionscript and java

Question :What design patterns have you used? in Actionscript and java?
Answer :1. Creational Pattern
* Factory Method Pattern
* Singleton Pattern
2. Structural Patterns
* Decorator Pattern
* Adapter Pattern
* Coposite Pattern
3. Behavioral Patterns
* Command Pattern
* Observer Pattern
* Template Metod Pattern
* State Pattern
* Strategy Pattern
4. Multiple Patterns
* MVC Pattern
* Symetric Proxy Pattern

Explain how binding works in mxml components.

Question :Explain how binding works in mxml components.
Answer :Binding in MXML
Lets look at the following code…


Here you are binding the text property of the TextInput to the label. So whatever you type in the
textInput automatically reflects in the label. That’s the power of Binding…
The best practice for defining components that return information back to the main application is to
design the component to dispatch an event that contains the return data. In that way, the main
application can define an event listener to handle the event and take the appropriate action. You also
use events in data binding. The following example uses the Bindable metadata tag to make
useShortNames a bindable property. The implicit setter for the useShortNames property dispatches
the change event that is used internally by the Flex framework to make data binding work.

What’s the difference between ChangeWatcher.watch, and BindingUtils.bindProperty

Question :What’s the difference between ChangeWatcher.watch, and BindingUtils.bindProperty?
Answer :ChangeWatcher:
Acts like the watch on AS2. It watches a variable for changes and when something happens fires an
event. Make sure you call the canWatch to ensure that you can watch it!
There are 3 ways to specify the second parameter, the chain.
1. A String containing the name of a public bindable property of the host object.
ChangeWatcher.watch(this, "myvar", handler)
2. An Object in the form: { name: property name, access: function(host) { return host[name] } }.
The Object contains the name of a public bindable property, and a function which serves as a getter
for that property.
ChangeWatcher.watch(this, { name:"myvar", getter: function():String { return "something" }},
handler);
3. A non-empty Array containing any combination of the first two options. This represents a chain
of bindable properties accessible from the host. For example, to watch the property host.a.b.c, call
the method as: watch(host, ["a","b","c"]
BindingUtils.bindProperty
Works pretty much the same way as the watch, but instead of having to handle and event it allows
you to immediately bind two properties one-way.
The first two parameters are for the the target, the second parameters are the triggers.
BindingUtils.bindProperty( this, "va1", this, "var2");
Note : Make sure you add the flex framework.swc to your project Library Path to have access to the
mx.binding.util class.

Why would you want to keep a reference to a ChangeWatcher and call unwatch()

Question :Why would you want to keep a reference to a ChangeWatcher and call unwatch()?
Answer :So we can reattach the watcher again & We can change the source object (of changewatcher) by
reset method.
The ChangeWatcher class defines utility methods that you can use with bindable Flex properties.
These methods let you define an event handler that is executed whenever a bindable property is
updated.
unwatch () method:
Detaches this ChangeWatcher instance, and its handler function, from the current host. You can use
the reset() method to reattach the ChangeWatcher instance, or watch the same property or chain on a
different host object.
public function unwatch():void

How do you add event listeners in mxml components. Now AS3 components

Question :How do you add event listeners in mxml components. Now AS3 components?
Answer :1) addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0,
useWeakReference:Boolean = false):void
2) removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
3) dispatchEvent(event:Event):Boolean
4) hasEventListener(type:String):Boolean
5) willTrigger(type:String):Boolean

What does calling preventDefault() on an event do How is this enforced

Question :What does calling preventDefault() on an event do? How is this enforced?
Answer :Cancels an event's default behavior if that behavior can be canceled.. For example, the
doubleClick event has an associated default behavior that highlights the word under the mouse
pointer at the time of the event. Your event listener can cancel this behavior by calling the
preventDefault() method.
You can use the Event.cancelable property to check whether you can prevent the default behavior
associated with a particular event. If the value of Event.cancelable is true, then preventDefault() can
be used to cancel the event; otherwise, preventDefault() has no effect.

What is the problem with calling setStyle()

Question :What is the problem with calling setStyle()?
Answer :Calling the setStyle() method can result in decreased performance. Use it only when necessary.
You should try to apply style sheets rather than use the setStyle() method because it is
computationally expensive. This method should only be used when you are changing an object's
styles during run time.
You cannot get or set style properties directly on a component as you can with other properties.
Instead, you set style properties at run time by using the getStyle() and setStyle() ActionScript
methods.

Explain the difference between creating an effect and setting the target as opposed to adding an

Question :Explain the difference between creating an effect and setting the target as opposed to adding an
effectListener


Answer :To create a behavior, you define a specific effect with a unique ID and bind it to the trigger.
For example, the following code creates two zoom effects: one for shrinking the component slightly,
and one for reverting it to its original size. These effects are assigned, by using their unique IDs, to
the mouseDownEffect and mouseUpEffect triggers on the Button component.



paddingLeft="10" paddingRight="10" autoLayout="false" left="41" top="24" right="42">
mouseDownEffect="{shrink}" mouseUpEffect="{revert}"/>

How do you identify a component created in a repeater

Question :How do you identify a component created in a repeater?
Answer :: If currentIndex value is greater than startIndex value means a component is created in Repeater.
We can use count property to find number of children.
A Repeater component executes initially when it is instantiated. If the Repeater component's
dataProvider property exists, it proceeds to instantiate its children, and they instantiate their
children, recursively.
The Repeater component re-executes whenever its dataProvider, startingIndex, or count
properties are set or modified either explicitly in ActionScript, or implicitly by data binding.
When a Repeater component re-executes, it destroys any children that it previously created
(assuming the recycleChildren property is set to false), and then reinstantiates its children based
on the current dataProvider property.

Differences between defining bindings in MXML and ActionScript

Question :Differences between defining bindings in MXML and ActionScript?
Answer :: There are a few differences between defining data bindings in MXML at compile time and in
defining them at runtime in ActionScript:
* You cannot include ActionScript code in a data binding expression defined by the bindProperty()
or bindSetter() method. Instead, use the bindSetter() method to specify a method to call when the
binding occurs.
* You cannot include an E4X expression in a data binding expression defined in ActionScript.
* You cannot include functions or array elements in property chains in a data binding expression
defined by the bindProperty() or bindSetter() method. For more information on property chains, see
Working with bindable property chains.
* The MXML compiler has better warning and error detection support than runtime data bindings
defined by the bindProperty() or bindSetter() method.

What is the difference between httpService and Data Service

Question :What is the difference between httpService and Data Service?
Answer :The Flex presentation layer communicates with the business layer by using Flex
data services, which are objects you insert in a Flex file. Specifically, you can use Flex data services
to interact with the following:
* Web services
* HTTP services
* Remote objects
A Flex data service is an object you insert in an MXML file to communicate with the business layer
of a multi-tier application. You use data services to send and receive data from web services, HTTP
URLs, and remote objects such as server-based Java objects.
An HTTP service is nothing more than an HTTP request to a URL. The primary purpose of HTTP
services is to retrieve XML data from an external source.

: How do you generate random numbers within a given limit with actionscript

Question :: How do you generate random numbers within a given limit with actionscript?
Answer :public function randRange(min:Number, max:Number):Number {
var randomNum:Number = Math.floor(Math.random() * (max - min + 1)) + min;
return randomNum;
}

What are the methods called when a UI component is intialized

Question :What are the methods called when a UI component is intialized?
Answer :createChildren()

What is a drag manager

Question :What is a drag manager?
Answer :The DragManager class manages drag and drop operations, which let you move data from one place
to another in a Flex application. For example, you can select an object, such as an item in a List
control or a Flex control, such as an Image control, and then drag it over another component to add it
to that component.
All methods and properties of the DragManager are static, so you do not need to create an instance of
it.
All Flex components support drag and drop operations. Flex provides additional support for drag and
drop to the List, Tree, and DataGrid controls.
When the user selects an item with the mouse, the selected component is called the drag initiator. The
image displayed during the drag operation is called the drag proxy.
When the user moves the drag proxy over another component, the dragEnter event is sent to that
component. If the component accepts the drag, it becomes the drop target and receives dragOver,
dragExit, and dragDrop events.
When the drag is complete, a dragComplete event is sent to the drag initiator.

How do you call javascript from Flex

Question :How do you call javascript from Flex?
Answer :The ExternalInterface class is the External API, an application programming interface that enables
straightforward communication between ActionScript and the Flash Player container– for example,
an HTML page with JavaScript. Adobe recommends using ExternalInterface for all JavaScript-
ActionScript communication.
You can call an ActionScript function in Flash Player, using JavaScript in the HTML page. The
ActionScript function can return a value, and JavaScript receives it immediately as the return value
of the call.
This functionality replaces the fscommand() method.
The ExternalInterface class requires the user's web browser to support either ActiveX® or the
NPRuntime API that is exposed by some browsers for plug-in scripting. Even if a browser and
operating system combination are not listed above, they should support the ExternalInterface class if
they support the NPRuntime API. See http://www.mozilla.org/projects/plugins/npruntime.html.
Note: When embedding SWF files within an HTML page, make sure that the id and name attributes
of the object and embed tags do not include the following characters: . - + * / \
From ActionScript, you can do the following on the HTML page:
•Call any JavaScript function.
•Pass any number of arguments, with any names.
•Pass various data types (Boolean, Number, String, and so on).
•Receive a return value from the JavaScript function.
From JavaScript on the HTML page, you can:
•Call an ActionScript function.
•Pass arguments using standard function call notation.
•Return a value to the JavaScript function.
Flash Player does not currently support SWF files embedded within HTML forms.

How do you use a repeater

Question :How do you use a repeater?
Answer :: The Repeater class is the runtime object that corresponds to the tag. It creates
multiple instances of its subcomponents based on its dataProvider. The repeated components can be
any standard or custom controls or containers.
You can use the tag anywhere a control or container tag is allowed, with the
exception of the container tag. To repeat a user interface component, you place
its tag in the tag. You can use more than one tag in an MXML
document. You can also nest tags.
You cannot use the tag for objects that do not extend the UIComponent class.
MXML Syntax Hide MXML Syntax
The class has the following properties:
recycleChildren="false|true" startingIndex="0"
Events
repeat="No default" repeatEnd="No default" repeatStart="No default" >

What is state what is the difference between states and ViewStack

Question :What is state? what is the difference between states and ViewStack?
Answer :View Stack is to handle different MXML file eg TAB control. And states is the transition within
single MXML file
ViewStack should be used were there is complete change in the controls used and States should be
used when you just want to add or remove a few components based on certain conditions.
Login/Registration/Forgot password is the best example for using States as each page will either add
or remove to the already existing one.

Can I dynamically instantiate a WebService or HTTPService in ActionScript

Question :Can I dynamically instantiate a WebService or HTTPService in ActionScript?
Answer :Flex 1.5 does not support this. First declare the tags in MXML and then manipulate the URLs,
request objects, and so forth using ActionScript.

Can I load CSS style sheets dynamically at runtime

Question :Can I load CSS style sheets dynamically at runtime?
Answer :Dynamic loading of CSS files is not supported in Flex. CSS in Flex is processed on the server side
during MXML compilation rather than on the client side at runtime. There is a trick though: A CSS
file can be compiled into a separate SWF file and loaded dynamically into the application using the
Loader component.

: When I set visible="false", the component still takes up space and appears in the tab order. Why is

Question :: When I set visible="false", the component still takes up space and appears in the tab order. Why is
that?

Answer :You can often achieve the "display=none" effect by setting the height/width to zero when you set it
invisible, and then set it back to a fixed value or to undefined when you make it visible again.

Why are my ValueObject member variables undefined in the results from my RemoteObject requests

Question :Why are my ValueObject member variables undefined in the results from my RemoteObject requests?
Answer :Flash Player deserializes objects in a special order that can confuse developers used to object
serialization from other RPC systems. When a strongly typed object is returned to the player, it first
creates an instance from the prototype of the registered class without calling the constructor. It then
populates the object with the properties sent in the result. Finally, it calls the constructor without
arguments.
If your ValueObject constructor expects arguments to initialize an instance, be sure to check whether
arguments were actually sent to the constructor before overriding member variable values.

Why do strongly typed objects appear as "undefined" in the NetConnection Debugger

Question :Why do strongly typed objects appear as "undefined" in the NetConnection Debugger?
Answer :The NetConnection Debugger is an old utility from the early days of Flash Remoting that some
developers still find useful. It has an issue, however, displaying types that have been registered with
Object.registerClass(). If your Flex server is installed locally, we suggest enabling server-side
"debug" level logging in /WEB-INF/flex/gateway-config.xml to watch the raw trace information in
the Flex server console/logs from the AMF Gateway as it processes your RemoteObject requests.
Flex Builder also includes a Network Debugger that allows you to monitor AMF traffic.

How do I get access to the J2EE session from my RemoteObjects

Question :How do I get access to the J2EE session from my RemoteObjects?
Answer :The AMF Gateway provides access to the current HttpServletRequest instance in a thread local
variable. The session can be obtained from the request, as follows:
flashgateway.Gateway.getHttpRequest().getSession();

Can I resize the Internet Explorer browser window from Flex

Question :Can I resize the Internet Explorer browser window from Flex?
Answer :Use getURL() to communicate with JavaScript in the HTML wrapper:
getURL('javascript:window.resizeTo(1050,900)');

Is double-clicking supported on various components

Question :Is double-clicking supported on various components?
Answer :Unfortunately, double-clicking is not supported by default. If you wish to add this functionality to,
say, a List or DataGrid component, you will have to add the following ActionScript 2.0 code to your
application:
var someTimestamp:Number;
public function doubleClickHandler( evt:Object ):Void {
var now = getTimer();
// we got a double-click
if( ( now - someTimestamp ) < 500 ) {
// do something here ...
}
someTimestamp = now;
}

Why are there errors with the macromedia.css.LocatorParser class and WebLogic

Question :Why are there errors with the macromedia.css.LocatorParser class and WebLogic?
Answer :WebLogic ships with its own version of the fop.jar, which in turn includes the batik.jar, which is
older and breaks Flex. To resolve this issue, remove the fop.jar from the CLASSPATH in the
startWebLogic.cmd file. This may apply to non-WebLogic servers as well, where batik.jar was
included.

What does "The URL is not in the Proxy's whitelist" mean

Question :What does "The URL is not in the Proxy's whitelist" mean?
Answer :The whitelist is a security feature in Flex that requires you to define explicitly which URLs a data
service call can access.
You set this by editing the following file: ...\[flexroot]\WEB-INF\flex\flex-config.xml
There are three sections, one each for WebService, HTTPService, and RemoteObject. Be sure you
edit the correct section! Each has a subsection which contains nodes. To enable a URL for access by
a Flex dataService call, enter that URL between the tags.
For development phase only, you can allow global access with the wildcard rows. The flex-config
file is heavily commented. Open it up and you will see more detailed instructions there.

: Sometimes, if I don't move the mouse, "click" and "mouseDown" don't work. Why is that

Question :Sometimes, if I don't move the mouse, "click" and "mouseDown" don't work. Why is that?
Answer :This is a focus issue with Flash Player; usually when the UI changes "underneath" the mouse pointer,
as in a ViewStack navigation where the buttons are in the same screen location.

Why is myTreeNode.label or myTreeNode.attributes.label undefined

Question :Why is myTreeNode.label or myTreeNode.attributes.label undefined?
Answer :Make sure you use the TreeDataProvider methods to modify a node. Don't rely on the node being
XML. For example, the above should be myTreeNode.getProperty("label") instead.

When I add or modify an item in my dataProvider, why doesn't it show up in my DataGrid

Question :When I add or modify an item in my dataProvider, why doesn't it show up in my DataGrid?
Answer :Low-level methods like Array.push() or myArray[0] = "whatever" do not cause the
dataProvider's modelChanged event to fire.
When you work with a dataProvider, it is always best to use the dataProvider API. In the above
example, you might code: myDataProvider.addItem(myItemObject) to add an item or use
editField() to modify a value programmatically.
Alternatively, you can call myDataProvider.modelChanged yourself or reassign dataProvider to
the control, as follows: myDataGrid.dataProvider = myDataProvider;

myTree appears just fine but why can't I access the node attributes

Question :myTree appears just fine but why can't I access the node attributes?
Answer :Select a node in your myTree. In ActionScript, you can reference this node by using the following
code: myTree.selectedNode;
To access the attributes of the node, use the tree DataProvider API. These methods will work for
any format dataProvider item, which might be an object, array, or XML node.
The following example might work: myTree.selectedNode.attributes.myAttribute
But the following example is far more reliable:
myTree.selectedNode.getProperty("myAttribute");

How do I get Flex to query my database

Question :How do I get Flex to query my database?
Answer :Flex does not have any native database integration functionality. You must have your own server-side
tier that provides the database-access tier and sends the data back to Flex through one of the
following protocols:
•RemoteObjects: This is the fastest. It communicates with server-side EJBs or POJOs using
AMF, a binary compressed format.
•HTTPService: This one uses the HTTP protocol. Sources can be JSP, ASPx, .NET, or any
URL that returns HTTP.
•WebService: This is the slowest. It uses the SOAP protocol. Sources can be .NET or any web
service.

I'm sending my request, and I see the data traffic in the command window, but why is the result always

Question :I'm sending my request, and I see the data traffic in the command window, but why is the result always
empty?


Answer :You are probably trying to read the result immediately after the send(), right? You're expecting
synchronous behavior?

Have you built any components with actionscript? If so explain how you did it

Question :Have you built any components with actionscript? If so explain how you did it?
Answer :CountryComboBox.as
package components
{ import mx.controls.ComboBox;
public class CountryComboBox extends ComboBox
{ public function CountryComboBox()
{ dataProvider = [ "United States", "United Kingdom" ];
}
}
}

xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:custom="components.*"
width="220" height="115"
>

Have you built any components with actionscript? If so explain how you did it

Question :Have you built any components with actionscript? If so explain how you did it?
Answer :CountryComboBox.as
package components
{ import mx.controls.ComboBox;
public class CountryComboBox extends ComboBox
{ public function CountryComboBox()
{ dataProvider = [ "United States", "United Kingdom" ];
}
}
}

xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:custom="components.*"
width="220" height="115"
>

How do you generate random numbers within a given limit with actionscript

Question :How do you generate random numbers within a given limit with actionscript?
Answer :Math.round(Math.random() * (high - low)) + low

How do you generate random numbers within a given limit with actionscript

Question :How do you generate random numbers within a given limit with actionscript?
Answer :Math.round(Math.random() * (high - low)) + low

What is the difference between httpService and Data Service

Question :What is the difference between httpService and Data Service?
Answer :The services-config.xml configuration file is required at compile time if the Flex application uses
Flex Data Services. In the case of RPC services, this applies to all applications that use
RemoteObject or proxy-based WebService or HTTPService.

What is the difference between httpService and Data Service

Question :What is the difference between httpService and Data Service?
Answer :The services-config.xml configuration file is required at compile time if the Flex application uses
Flex Data Services. In the case of RPC services, this applies to all applications that use
RemoteObject or proxy-based WebService or HTTPService.

I need to load an image from flickr into my application. Do I need a crossdomain.xml file on flickr

Question :I need to load an image from flickr into my application. Do I need a crossdomain.xml file on flickr?
Answer :File is already there , we need to register our ip address to flicker’s crossdomain.xml.
Since the images are located on a flickr server like farm1.static.flickr.com and there is no
crossdomain.xml file on that server (there is a crossdomain.xml for api.flickr.com so you can use the
api) that means you can’t get access to the bitmapData of the loaded images when you load them
from flickr. This is dumb, but that’s the way it is. So you can load images just fine, but the reflection
class copies the bitmapData of the image, so that doesn’t work if you load them straight from the
flickr server. I also wanted to set bitmap smoothing to true on the images so the thumbnails don’t
look as pixelated, and that also requires access to the bitmapData of the loaded image.
So the answer is to create a proxy that loads the flickr image so it appears to come from the same
domain.

I need to load an image from flickr into my application. Do I need a crossdomain.xml file on flickr

Question :I need to load an image from flickr into my application. Do I need a crossdomain.xml file on flickr?
Answer :File is already there , we need to register our ip address to flicker’s crossdomain.xml.
Since the images are located on a flickr server like farm1.static.flickr.com and there is no
crossdomain.xml file on that server (there is a crossdomain.xml for api.flickr.com so you can use the
api) that means you can’t get access to the bitmapData of the loaded images when you load them
from flickr. This is dumb, but that’s the way it is. So you can load images just fine, but the reflection
class copies the bitmapData of the image, so that doesn’t work if you load them straight from the
flickr server. I also wanted to set bitmap smoothing to true on the images so the thumbnails don’t
look as pixelated, and that also requires access to the bitmapData of the loaded image.
So the answer is to create a proxy that loads the flickr image so it appears to come from the same
domain.

OOPs Interview Questions Part II

Question: What is the difference between Shared and Static?
Answer: They both mean the same. Shared is used in VB.NET. Static is used in C#.
When the static keyword is used to declare a class, the member in context must be directly invoked from the class, rather than from the instance. Consider the following example 
//Consider writing the following line of code...
Console obj = new Console(); 
obj.Writeline("Vishal likes static members"); //This line does'nt print

//This does'nt work, because WriteLine is a static method defined in the class Console
//The Console class is a static class 
To use static members, give a reference to the exact class, as an instance in this case won't work. 
To make this work, write...
Console.Writeline("Vishal likes static members"); 
To work with members of static classes, no need to create their instances.
Static Member - A class member declared with the keyword static is a static member. A static member is owned by the class, not by its instances (objects of the class). 
Note that static members are actually class members, while non-static members are instance members (means they are owned by the instances). Both in C# & VB.NET, we may create static/shared events, properties, fields and functions. 
Note Indexers in C# cannot be declared static.
Note Static member functions cannot access non-static members directly.
Virtual - If a base class method is to be overriden, it is defined using the keyword virtual (otherwise the sealed keyword is used to prevent overriding). 
Note that the class member method may be overriden even if the virtual keyword is not used, but its usage makes the code more transparent & meaningful. In VB.NET, we may use the overridable keyword for this purpose. 

When the override keyword is used to override the virtual method, in a scenario where the base class method is required in a child class along with the overriden method, then the base keyword may be used to access the parent class member. The following code example will make the usage more clear. 
public class Employee
{
public virtual void SetBasic(float money) //This method may be overriden
{ Basic += money; }
}


public class Manager : Employee
{
public override void SetBasic(float money) //This method is being overriden
{
float managerIncentive = 10000;
base.SetSalary(money + managerIncentive); //Calling base class method
}
}
Question: Explain overridable, overrides, notoverridable,mustoverride 
Answer: These keywords are used in VB.NET.

Overridable -The Overridable keyword is used when defining a property or method of an inherited class, as overridable by the inheriting class. 

Overides - The Overides keyword allows the inheriting class to disregard the property or method of the inherited class and implements ts own code. 

NotOverridable - The NotOverridable keyword explicitly declares a property or method as not overridable by an inheriting class, and all properties are "not overridable" by default. The only real advantage to using this keyword is to make your code more readable. 

MustOverride - The MustOverride keyword forces the inheriting class to implement its own code for the property or method. 
Question: What is the difference between Overriding and Shadowing?
Answer: Both Overriding and Shadowing are ways to alter the behaviour of members of a base class. Shadowing is a VB.NET concept. In C#, this concept is called Hiding, though there is a difference between the two.

When we do shadowing, we provide a new implementation to the base class member without overriding it. We may shadow a base class member in a derived class, by using the keyword shadows. The access level, return type, and the signature (means the datatypes of the arguments passed & the order of the types) of the derived class members which are shadowed, may differ from the base class. 

In C#, we may achieve shadowing using the keyword new. However, when Hiding in C#, the access level, the signature, return type of the derived class must be same as the base class. 

Overriding is the concept of providing a new implementation of derived class member as compared to its based class. In VB.NET, we do overriding using the overrides keyword, while in C#, overriding is achieved using the override keyword. For a class member to be overridable, we use the keyword virtual while defining it (in C#), and we use the keyword overridable (in VB.NET), though if we leave out specifying the overridable keyword, the member is overridable by default. 

Question: What is a static constructor? 
Answer: Static Constructor - It is a special type of constructor, introduced with C#. It gets called before the creation of the first object of a class(probably at the time of loading an assembly). See example below. 
Example:
public class SomeClass()
{
static SomeClass()
{
//Static members may be accessed from here
//Code for Initialization
}
}
While creating a static constructor, a few things need to be kept in mind:
* There is no access modifier require to define a static constructor
* There may be only one static constructor in a class
* The static constructor may not have any parameters
* This constructor may only access the static members of the class
* We may create more than one static constructor for a class

Question: Can a class be created without a constructor? 
Answer: No. In case we dont define the constructor, the class will access the no-argument constructor from its base class. The compiler will make this happen during compilation. 

OOPS Interview Questions Part 1

Question: What is Encapsulation? 
Answer: Encapsulation - is the ability of an object to hide its data and methods from the rest of the world. It is one of the fundamental principles of OOPs. 
Say we create a class, named Calculations. This class may contain a few members in the form of properties, events, fields or methods. Once the class is created, we may instantiate the class by creating an object out of it. The object acts as an instance of this class, the members of the class are not exposed to the outer world directly, rather, they are encapsulated by the class. 
Example:
Public class Calculations
{
private void fnMultiply(int x, int y)
{
return x * y;
}
}
...
...
Calculations obj;
int Result;
Result = obj.fnMultiply(5,10); 

Question: What is Class? 
Answer: A class is an organized store-house in object-oriented programming that gives coherent functional abilities to a group of related code. It is the definition of an object, made up of software code. Using classes, we may wrap data and behaviour together (Encapsulation). We may define classes in terms of classes (Inheritance). We can also override the behaviour of a class using an alternate behaviour (Polymorphism).
A Base Class is a class that is inherited by another class. In .NET, a class may inherit from only one class. 

Question: What is inheritance? 
Answer: Inheritance - is the concept of passing the traits of a class to another class. 
A class comprises of a collection of types of encapsulated instance variables and types of methods, events, properties, possibly with implementation of those types together with a constructor function that can be used to create objects of the class. A class is a cohesive package that comprises of a particular kind of compile-time metadata. A Class describes the rules by which objects behave; these objects are referred to as "instances" of that class. (Reference)

Classes can inherit from another class. This is accomplished by putting a colon after the class name when declaring the class, and naming the class to inherit from—the base class—after the colon.

Question: What is a class member? What is an object? 
Answer: The entities like events, properties, fields and functions encapsulated within a class are called class members. A constructor of a class that resides within it is also a form of a class member. 

When we instantiate a class in order to use its encapsulated class members, this instantiated class entity is called the object. 

Question: Whats the difference between a class and an object? 
Answer: In any object Oriented language, an object is the backbone of everything that we see. A class is a blueprint that describes how an instance of it (object) will behave. To create a class, we define it in a "Code File", with an extension *.cs or *.vb. We make use of the keyword class. 
Example
Lets create a class named Laptop
public class Laptop
{
private string sbrand;
public Laptop() {}
public Laptop(string name)
{
sbrand = name;
}
}

From our code that references this class, we write...
Laptop lp = new Laptop("Lenovo"); //Passing a variable to the class constructor
Once the class object is created, the object may be used to invoke the member functions defined within the class. We may allocate any number of objects using the new keyword. The new keyword returns a reference to an object on the heap. This reference is not to the actual object itself. The variable being refered is stored on a stack for usage in the application. When we allocate an object to a heap, its managed by the .NET runtime. The garbage collector takes care of the object by removing it from the heap, when it is no longer reachable by any part of the code. 

Question: What is polymorphism? 
Answer: Polymorphism means allowing a single definition to be used with different types of data (specifically, different classes of objects). For example, a polymorphic function definition can replace several type-specific ones, and a single polymorphic operator can act in expressions of various types. Many programming languages implement some forms of polymorphism. 

The concept of polymorphism applies to data types in addition to functions. A function that can evaluate to and be applied to values of different types is known as a polymorphic function. A data type that contains elements of different types is known as a polymorphic data type. 

Polymorphism may be achieved by overloading a function, overloading an operator, changing the order of types, changing the types using the same name for the member in context. 
Example:
Public Class Calc
{
public void fnMultiply(int x, int y)
{ return x * y; }
public void fnMultiply(int x, int y, int z)
{ return x * y * z; }
}
...
...
Calc obj;
int Result;
Result = obj.fnMultiply(2,3,4); // The second fnMultiply would be called
Result = obj.fnMultiply(3,4); // The first fnMultiply would be called
//Here, the call depends on the number of parameters passed, polymorphism is achieved using overloading 

Question: What is Overloading? What is Overloads? What is Overload? 
Answer: Overloading - is the concept of using one function or class in different ways by changing the signature of its parameters. We can define a function with multiple signatures without using the keyword Overloads, but if you use the Overloads keyword in one, you must use it in all of the function's Overloaded signatures. 
The Overloads keyword is used in VB.NET, while the Overload keyword is used in C# (There is no other difference). The Overloads property allows a function to be described using deferent combinations of parameters. Each combination is considered a signature, thereby uniquely defining an instance of the method being defined. 
Overloading is a way through which polymorphism is achieved.

Is it possible to make httpService Requests synchronous

Question :Is it possible to make httpService Requests synchronous?
Answer :No, Basically, what we are about to do is creating XMLHttpRequest with Javascript in Flex,
and calling a server data with the parameters we will give to the object.
For example: xmlHttpRequest.open("GET","http://localhost/Default.aspx",false);
1. Request Type: GET or POST
2. Requested URL
3. Communication Type: true for asynchronous, false for synchronous.

Is it possible to make httpService Requests synchronous

Question :Is it possible to make httpService Requests synchronous?
Answer :No, Basically, what we are about to do is creating XMLHttpRequest with Javascript in Flex,
and calling a server data with the parameters we will give to the object.
For example: xmlHttpRequest.open("GET","http://localhost/Default.aspx",false);
1. Request Type: GET or POST
2. Requested URL
3. Communication Type: true for asynchronous, false for synchronous.