Home Tutorial Flex Flex-components Package in Action Script 3

 
 

Share on Google+Share on Google+
Package in Action Script 3
Posted on: July 13, 2010 at 12:00 AM
Advertisement
Package is the collection of related classes. Package describe the directory structure of your component of your application

Package in Action Script:-

Package is the collection of related classes. Package describe the directory structure of your component of your application. You must define your ActionScript custom components within a package. we have create a simple class name hello.as within hello package name. The package structure is like:

package hello {

public class hello {

.............

}

}

In this example you can see how to create a package in Flex application. First we will create folder with name hello under the src directory after that we will create hello.as class within this package. If we will used these class then we have use namespace prefix and package in the Flex application. for example:

<?xml version="1.0"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"

xmlns:helloclass="hello.*">

<helloclass:hello/>

</mx:Application>

This is the process to access the hello class in your application.

Advertisement

Related Tags for Package in Action Script 3:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: July 13, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com