Step 2: Add Access Modifiers - Adobe FLEX 2-MIGRATING APPLICATIONS TO FLEX 2 Manual

Migrating applications to flex 2
Table of Contents

Advertisement

Effects/behaviors
For each effect, such as Fade, Sequence, and Parallel, change the
remove the
<mx:Effect>
<mx:Sequence id="myWipes">
<mx:WipeLeft/>
<mx:WipeRight/>
<mx:WipeUp/>
<mx:WipeDown/>
</mx:Sequence>
For more information, see
getURL() method
Replace the
getURL()
This global method takes a URLRequest object; for example:
var url:URLRequest = new URLRequest("http://mysite.com");
navigateToURL(url,"_self");
For more information, see Chapter 34, "Communicating with the Wrapper," in Flex 2
Developer's Guide.

Step 2: Add access modifiers

You must add access modifiers to all your properties, variables, methods, and classes. Available
access modifiers are
public
When you first write or port an application, it is easiest to set every method and property to
. You can then revisit the application when it is working and begin restricting access by
public
adding the
identifier where necessary.
private
The following table shows some common situations where you add modifiers:
Flex 1.x
function processVariables() {
// Returns a Boolean
}
function getBalance() { ... }
var s = "My name is Fred.";
class MyButton extends Button { ... }
14
Getting Started
tags; for example:
Chapter 8, "Behaviors," on page
method with the
navigateToURL()
,
,
internal
private
name
129.
method in the flash.net package.
, or
.
protected
Flex 2
public function processVariables():Boolean {
// Returns a Boolean
}
private function getBalance():Number { ... }
private var s:String = "My name is Fred.";
public class MyButton extends Button { ... }
property to
. Also,
id

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex 2

Table of Contents