Call to a possibly undefined method init through a reference with static type mx.containers:Form.
Reason: When using code-behind in Flex 1.5, you would override the init() event handler and listen for the "childrenCreated" event. (This was the Flex 1.5 equivalent of using the onLoad() event handler in Flash.) With Flex 2, the init() method no longer exists.
Here's an example of the old ActionScript 2/Flex 1.5 code:
[as]function init ():void
{
super.init();
addEventListener ( "childrenCreated", onLoad );
}[/as]
Solution: In Flex 2, your should override the initialize() event handler and listen for the FlexEvent.CREATION_COMPLETE event. The Flex 2 equivalent is shown below:
[as]override public function initialize():void
{
super.initialize();
addEventListener ( FlexEvent.CREATION_COMPLETE, creationCompleteHandler );
}
private function creationCompleteHandler ( event:FlexEvent ):void
{
onLoad();
}[/as]
Implicit coercion of a value with static type Object to a possibly unrelated type flash.events:Event.
Reason: You are defining an event as a simple Object instance -- eg. dispatchEvent ( { type: "orderProcessed" } );
Solution: Create an instance (or subclass) of the mx.events.Event class instead -- eg. dispatchEvent ( new Event ( "orderProcessed" ) );
Access of possibly undefined property length through a reference with static type mx.controls:List. (or ComboBox, DataGrid, etc.)
Reason: In Flex 1.5, components that took data providers would proxy data provider method calls to the data provider object. This meant that you could reference methods of a component's data provider directly through the component -- eg. myListBox.getItemAt(0);. This is no longer the case.
Solution: Reference the data provider of a component through the dataProvider property. eg. myListBox.dataProvider.getItemAt(0);
A file found in a source-path must have an externally visible definition. If a definition in the file is meant to be externally visible, please put the definition in a package.
and
Unable to locate specified base class 'org.osflash.arp.samples.pizza.flex2.view.OrderFormClass' for component class 'OrderForm'
Reason: You have not updated your ActionScript class to use the new package keyword. In ActionScript 3, you define a classes' package separately, not in the class signature.
Solution: Use the package keyword to define the package for your class -- package org.osflash.arp.samples.pizza.flex2.view { public class OrderForm { //... } }.
Attempting to initialize non-public inherited property 'ordersLb' from MXML.
Reason: You have declared components inherited from an MXML file as private properties. In order for code-behind to work in Flex 2, you have to declare components as public in your classes. This is a current limitation in the code-behind feature in Flex 2 and will hopefully be improved in future releases (I'm still holding my breath on an implementation of partial classes in a future revision of ActionScript 3.)
Solution: Declare components inherited from MXML documents as public in your classes.
Type was not found or was not a compile-time constant: Void.
Reason: In ActionScript the Void datatype has been replaced with the void datatype (lowercase "v")
Solution: Replace "Void" with "void"
A constructor can only be declared public.
Reason: In ActionScript 3, you cannot have a private constructor. This will affect you when migrating Singletons to AS3.
Solution: Make the constructor public. You can add some logic to your class to throw an error if it detects multiple intances of a Singleton class being created but, unfortunately, due to this limitation, you cannot have a true Singleton in AS3.
(Run-time error) ArgumentError: Error #1063: Argument count mismatch on org.osflash.arp.samples.pizza.flex2.view::OrderFormClass/::validateForm(). Expected 0, got 1.
Reason: Your event handler in ActionScript 2 did not take any arguments. In AS2, you could get away with creating event handlers that ignored the event object that was sent to them. You cannot do this in AS3 however, as it results in a run-time error.
Solution: Make sure your event handlers define an event parameter of type Event (or subclass of Event.)
(Warning) return value for function 'functionName' has no type declaration.
Reason: You will see this warning if you were not in the habit of explicitly declaring your public methods by using the public access modifier. In ActionScript 2, methods defaulted to being public. In ActionScript 3, they default to the new access modifier "internal".
Solution: Get into the habit of using access modifiers on all your method signatures -- eg. public function myFunction ():void {};
The Some notes on migrating applications from Flex 1.5 (AS2) to Flex 2 (AS3) article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.

Thanks.I found the following error:
A file found in a source-path must have an externally visible definition. If a definition in the file is meant to be externally visible, please put the definition in a package.
I could resolve it from the solution given here.
I have try ported HAccordion(http://www.mossyblog.com/archives/485.cfm) to flex 2
I have copied folder into project \mx from Flex 2 SDK, and have some problems with mx components:
———————————
1020: Method marked override must override another method. Application.as HAccordion/mx/core
//before my correcting
/* line 540 */ override public function set label(value:String):void
//after my correcting
/* line 540 */ public function set label(value:String):void
———————————
1084: Syntax error: expecting leftbrace before colon. VBox.as HAccordion/mx/containers line 52
//before my correcting
/* line 52 */ public class mx:Canvas extends Box
//after my correcting
/* line 52 */ public class VBox extends Box
———————————
The Project has compiled, but stopped at loading with Alert:
———————————
Error: Multiple sets of visual children have been specified for this component (component definition and component instance).
at mx.core::Container/initialize()
at mx.core::Application/initialize()
at HAccordion/initialize()
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()
at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()
at mx.core::Container/addChildAt()
at mx.core::Container/addChild()
at mx.core::Container/createComponentFromDescriptor()
at mx.core::Container/createComponentsFromDescriptors()
at mx.core::Container/mx.core:Container::createChildren()
at mx.core::UIComponent/initialize()
at mx.core::Container/initialize()
at mx.core::Application/initialize()
at HAccordion/initialize()
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::childAdded()
at mx.managers::SystemManager/::initializeTopLevelWindow()
at mx.managers::SystemManager/::frameEndHandler()
———————————
I get an error like this.
“Unable to locate specified base class ‘mx.core.Application’ for component class ‘aRunnableApp’
What can this be?
Thanks!
Hi Venkat i m also facing same issue, i went to link below but its not useful in my case:
http://www.flashdevelop.org/community/viewtopic.php?p=10526
Hi Venkat/ Prashanth,
Even I am facing the same problem, any help on this will be good.