<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=Flash_%2F_Flex_%2F_ActionScript%2FLanguage%2Fpackage</id>
		<title>Flash / Flex / ActionScript/Language/package - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=Flash_%2F_Flex_%2F_ActionScript%2FLanguage%2Fpackage"/>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=Flash_/_Flex_/_ActionScript/Language/package&amp;action=history"/>
		<updated>2026-04-04T12:09:33Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://wbex.ru/index.php?title=Flash_/_Flex_/_ActionScript/Language/package&amp;diff=4690&amp;oldid=prev</id>
		<title> в 09:19, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=Flash_/_Flex_/_ActionScript/Language/package&amp;diff=4690&amp;oldid=prev"/>
				<updated>2010-05-26T09:19:13Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 09:19, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://wbex.ru/index.php?title=Flash_/_Flex_/_ActionScript/Language/package&amp;diff=4691&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=Flash_/_Flex_/_ActionScript/Language/package&amp;diff=4691&amp;oldid=prev"/>
				<updated>2010-05-26T08:15:08Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==A package-level function==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
package com.example.shape&lt;br /&gt;
{&lt;br /&gt;
    public function testShapes():void&lt;br /&gt;
    {&lt;br /&gt;
        trace(&amp;quot;test the shapes here...&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Global Scope: Code placed directly outside a package body or at the top-level of a package body resides in the global scope.==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
package {&lt;br /&gt;
  // Code here is in the global scope&lt;br /&gt;
}&lt;br /&gt;
// Code here is also in the global scope&lt;br /&gt;
package {&lt;br /&gt;
  // Definitions here are accessible to all code in the global scope&lt;br /&gt;
}&lt;br /&gt;
// Definitions here are accessible to all code in the same source file&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Import all the classes in a particular package by using the wildcard operator (*) trailing the package name==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
package&lt;br /&gt;
{&lt;br /&gt;
    import com.example.shapes.*;&lt;br /&gt;
    public class PackagesTest&lt;br /&gt;
    {&lt;br /&gt;
        public function PackagesTest()&lt;br /&gt;
        {&lt;br /&gt;
            var r:Rectangle = new Rectangle();&lt;br /&gt;
            10 + DEFAULT_SIZE;&lt;br /&gt;
            testShapes();&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
package com.example.shapes&lt;br /&gt;
{&lt;br /&gt;
    public const DEFAULT_SIZE:int = 256;&lt;br /&gt;
}&lt;br /&gt;
package com.example.shapes&lt;br /&gt;
{&lt;br /&gt;
    public class Rectangle&lt;br /&gt;
    {&lt;br /&gt;
        // define Rectangle here.&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==package level function==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
package {&lt;br /&gt;
  import flash.display.Sprite;&lt;br /&gt;
  public class CallPackagedFunction extends Sprite {&lt;br /&gt;
    public function CallPackagedFunction() {&lt;br /&gt;
      PackagedFunction(graphics);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
package {&lt;br /&gt;
  import flash.display.Graphics;&lt;br /&gt;
  public function PackagedFunction(target:Graphics):void {&lt;br /&gt;
    target.lineStyle(0);&lt;br /&gt;
    target.lineTo(100,100);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Packages groups classes==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
package com.example.shapes&lt;br /&gt;
{&lt;br /&gt;
    public class Rectangle&lt;br /&gt;
    {&lt;br /&gt;
        // define Rectangle here.&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
class SecretClass&lt;br /&gt;
{&lt;br /&gt;
    // define SecretClass here.&lt;br /&gt;
}&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References to the classes by using their full name==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
package&lt;br /&gt;
{&lt;br /&gt;
    import com.example.shapes.Rectangle;&lt;br /&gt;
    import flash.geom.Rectangle;&lt;br /&gt;
    public class PackagesTest&lt;br /&gt;
    {&lt;br /&gt;
        public function PackagesTest()&lt;br /&gt;
        {&lt;br /&gt;
            var a:com.example.shapes.Rectangle =&lt;br /&gt;
                new com.example.shapes.Rectangle();&lt;br /&gt;
            var b:flash.geom.Rectangle =&lt;br /&gt;
                new flash.geom.Rectangle();&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
package com.example.shapes&lt;br /&gt;
{&lt;br /&gt;
    public class Rectangle&lt;br /&gt;
    {&lt;br /&gt;
        // define Rectangle here.&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==The general form of a package definition directive==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
package packageName {&lt;br /&gt;
}&lt;br /&gt;
To add a class to a package&lt;br /&gt;
package packageName {&lt;br /&gt;
  Class source code goes here&lt;br /&gt;
}&lt;br /&gt;
To create a new class: use a class definition&lt;br /&gt;
class Identifier {&lt;br /&gt;
}&lt;br /&gt;
package com.wbex {&lt;br /&gt;
  class MyClass {&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==To gain access to all the public classes in another package.==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
import packageName.*&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Variables, functions, and namespace declarations can also be contained inside packages.==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
package com.example.shapes&lt;br /&gt;
{&lt;br /&gt;
    public const DEFAULT_SIZE:int = 256;&lt;br /&gt;
}&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>