swf-version meaning

Flash -swf-version meaning

It’s getting more and more versions! We can’t remember them all, so here we go!

SWF Version

Compiler Option Flash Player Version AIR version
-swf-version=9 9.0.115.0 N/A
-swf-version=10 10.0, 10.1 1.5, 2.0
-swf-version=11 10.2 2.6
-swf-version=12 10.3 2.7
-swf-version=13 11.0 3
-swf-version=14 11.1 3.1
-swf-version=15 11.2 3.2
-swf-version=16 11.3 3.3
-swf-version=17 11.4 3.4
-swf-version=18 11.5 3.5
-swf-version=19 11.6 3.6
-swf-version=20 11.7 3.7
-swf-version=21 11.8 3.8

 

AIR SDK Path

  • MacOS : /Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.348297/AIRSDK

Features

Release notes

Download Flash Player

Download AIR

Labs

Document

Java vs AS3

java


package abc ;

public class C1 extends c2 {
    private int v1;
    public c1() {
        this.v1 = 5;
    }

    int method(int 1) {
        return v1;
    }
}

Actionscript 3.0


package abc{
    public class c1 extends c2 {

        private var v1:int;
        public function c1() {
            this.v1 = 5;
        }
        function method(v1:int):int {
            return v1;
        }
    }
}

In a java application, the main class has to have a main method,
public static void main(String{} args) to start the program.


public class Test {
    public static void main(String[] args) {
        //starting point
    }
}

In a Actionscript 3.0 application, the main class starts the program from its non-arg consructor.

Moreover, the class must inherit MovieClip or Sprite from the flash.display package, otherwise, compile error will occur


package {
    import flash.display.*;
    public class Example extends MovieClip {
        public function Example() {
            //the starting point of the program
        }
        public function Example(args:int) {
        }
    }
}

Flash Professional CC Update 1

Today there is a new update to Flash Professional CC (13.0.1). You can receive these updates through the creative cloud desktop application. I have not tried to get the updates through the update in the Flash IDE, but I am sure that will work as well.

Some of the new bug fixes in this update

Flash Professional CC 13.0.1 Update contains important bugs fixes. The following is a list of all bugs fixed in this update:

[Reference #3590263]: The Welcome Screen fails to load on launching Flash CC. And also, Flash CC crashes on creating a document, if FlashFirebug add-on is enabled for Mozilla Firefox. Due to this, the Test Movie window does not load.
[Reference #3597140]: Frame scripts added, modified, and saved to a movieclip is lost on closing a reopened document.
[Reference #3606259]: Flash straightens the first curve drawn using a Wacom tablet.
[Reference #3603351]: “Cannot load scene into memory” on opening a saved file whose publish settings has duplicate profile entries.
[Reference #3588521]: Flash CC freezes on closing, intermittently. It is strongly recommended that you download and install this patch from Microsoft.
[Reference #3594685, #3592211, #3598994]: Memory corruption issues when working with Timeline and Sprite sheets.
[Reference #3585379]: Flash CC freezes when zooming-in on a large canvas, with filters applied for objects on stage.
[Reference #3549614]: Flash CC crashes on setting some specific fonts in code editor preferences.
[Reference #3427773]: Flash CC crashes on exporting images and SWF files on Mac 10.6.

Typewriter Text Effect with AS3

1. Create a new flash file (Actionscript 3.0) and save it as typewriter.fla.

2. Rename “layer 1″ to “actions”. Open the actions panel.
Declare the following variables:

var myText:String;
var counter:int = 0;

3. Create a TextFormat object in order to format our text.

var format : TextFormat = new TextFormat();
format.size = 16;
format.font = "Verdana";
format.bold = true;
format.color = 0xFFFFFF;

4. Create a TextField, set its properties as follow and add it to the display list.

var textField : TextField = new TextField();
textField.width = 600;
textField.height = 350;
textField.selectable = false;
textField.wordWrap = true;
textField.defaultTextFormat = format;
textField.x = textField.y =10;
addChild(textField);

5. Next create an initText function that set the “myText” variable to the string passed as argument. Also add an ENTER_FRAME event listener.

function initText(string:String):void{
   myText = string;
   addEventListener(Event.ENTER_FRAME, writeText);
}

6. The writeText function checks whether the counter variable is inferior or equal to the length of “myText”.
While it’s true, we use the substr method that returns a substring consisting of the characters that start at index 0 and with a length specified by counter. When it becomes false, we remove the ENTER_FRAME listener.

function writeText(e:Event):void{
   if (counter <= myText.length){
           textField.text = myText.substr(0,counter);
           counter++;
   }
   else{
      removeEventListener(Event.ENTER_FRAME,writeText);
   }
}

7. The text to be display is stored inside a text file. So create your text file, type your own text and save it as text.txt inside the same directory of your fla file. Then load the file. When the load is complete, it simply calls the initText function.

var textLoader:URLLoader = new URLLoader(new URLRequest("text.txt"));
textLoader.addEventListener(Event.COMPLETE, function(e:Event){initText(e.target.data);});

8. Here’s the final code, test your movie to see in action.

var myText:String;
var counter:int = 0;

var format : TextFormat = new TextFormat();
format.size = 16;
format.font = "Verdana";
format.bold = true;
format.color = 0xFFFFFF;

var textField : TextField = new TextField();
textField.width = 600;
textField.height = 350;
textField.selectable = false;
textField.wordWrap = true;
textField.defaultTextFormat = format;
textField.x = textField.y =10;
addChild(textField);

var textLoader:URLLoader = new URLLoader(new URLRequest("text.txt"));
textLoader.addEventListener(Event.COMPLETE, function(e:Event){initText(e.target.data);});

function initText(string:String):void{
   myText = string;
   addEventListener(Event.ENTER_FRAME, writeText);
}

function writeText(e:Event):void{
   if (counter <= myText.length){
           textField.text = myText.substr(0,counter);
           counter++;
   }
   else{
      removeEventListener(Event.ENTER_FRAME,writeText);
   }
}

To Download right-click, and save to your computer.

download_btn

Adobe Community Professional

I am honored to find out this past week that I have been chosen as a Adobe Community Professional (ACP) for 2013!

Adobe Community Professionals are a small worldwide team of highly skilled users from across the whole range of Adobe products, who contribute at high levels to supporting Adobe software users. I hope to continue to earn this going forward by continuing to provide you with useful Flash tutorials, video series, and more!

This means that you can expect a lot more Flash information from me this year. I plan to bring you new updates on advancing technologies via the blog, present more at area groups and lend my insight to publications.

This will be my first time being an ACP and I hope that I can give back to the Adobe Community for many years to come. I truly enjoy working with Adobe, as I have been a User Group Manager since 2009 and I love it. My hopes are to continue to continue promoting the Flash Platform, and to show why as the best choice for interactive websites, Multimedia, Games, etc.

My plans are to continue managing the Hawaii Flash User Group, speak at other user groups, as well as conferences (I am hosting & speaking at the Flash Camp Hawaii in about a week) and to contribute on the forms. Also, Please feel free to contact me with your Flash questions.

Adobe roadmap for the Flash runtimes

Say Hello to “Irving” and  “Jones” and Flash Player releases!

Flash Player and AIR “Irving” and “Jones”

Adobe is planning its next two releases for late 2013 and early 2014. These releases continue to focus on premium video, gaming, security, and stability.

Some of the features being worked on for these releases include the following:

  • OSX Mavericks support for desktop Flash Player and AIR
  • Significant reduction in iOS packaging times
  • ActionScript concurrency for mobile (beta)
  • iOS 7 support (depends upon Apple schedule)
  • Support for Windows 8.1 PlayTo
  • Support for Windows 8.1 tab suspension improvements
  • Support for Windows Internet Explorer 11 back navigation caching
  • XXHDPI icon support for AIR Android
  • pkg installer bundle for Mac OSX (vs .dmg)

Read more on Adobe’s site about the Flash Runtimes Roadmap – http://www.adobe.com/devnet/flashplatform/whitepapers/roadmap.html

 

Shark bites off snorkeler’s arm

A visitor from Germany was critically injured and lost her right arm in an apparent shark attack Wednesday afternoon at a Makena beach in South Maui.

It was the fifth shark attack so far this year in Maui waters, where a jump in attacks was seen last year, and was the eighth attack this year statewide, according to the Department of Land and Natural Resources.

This puts the state on pace to top 2012’s record of 11, the most attacks in the past 12 years and more than twice the yearly average of 4.75 attacks.

The woman, about 20, was snorkeling at Palauea Beach, also known as White Rock, when beachgoers heard her cries for help.

“She screamed and called for help,” said Maui Fire Services Chief Lee Mainaga. Beachgoers went to the woman’s aid and brought her to shore in a kayak.

The woman had been snorkeling roughly 50 yards offshore when the apparent attack occurred. The water was choppy with limited visibility, the county said.

The Maui Fire Department got the call at 4:41 p.m. Wednesday.

Responding firefighters administered first aid and cardiopulmonary resuscitation to the unconscious woman.

“Her right arm was severed right below the shoulder,” Mainaga said. The arm was not found, he said.

She was taken by ambulance in critical condition to Maui Memorial Medical Center, Mainaga said.

The woman was with a couple of friends, who did not see the attack or a shark, he said.

The shark attack could not be confirmed because no one saw anything, Mainaga said.

“Everybody is under the assumption that it was a shark.”

Maui County lifeguards worked with the Fire Department to fly a helicopter along the coastline to check for the presence of sharks, a Department of Land and Natural Resources spokeswoman said in an email.

They closed the shoreline 1 mile north to Mana Kai Maui Resort and 1 mile south to Makena Resort, Mainaga said. Officials said they will reassess the closure this morning.

Witnessed told Maui Now that it took some time before the woman was brought to shore.

Palauea Beach has no reef to prevent sharks from coming closer to shore.

DLNR has awarded a two-year, $186,000 contract to University of Hawaii shark researchers to study the spatial dynamics of tiger sharks around Maui.

DLNR education and outreach coordinator Laura Stevens had said that spear fishermen were reporting “increasing boldness of large sharks encountered in Maui waters.”

Tiger shark attacks are the most common, and the species is considered the most aggressive in Hawaii waters.

Most of the shark attacks in Hawaii waters do not, however, result in critical injuries, and fatalities are few. Perhaps the best known Hawaii shark attack survivor is surfer Bethany Hamilton, who lost her left arm in October 2003 off Haena, Kauai.

The last fatal attack was in April 2004, when 57-year-old Willis Mc­Innis was attacked by a tiger shark while surfing off Pohaku Park, Maui. He suffered a 14-inch bite wound in his right thigh and died of blood loss. That was the first fatal attack in more than 10 years here.

On Tuesday, a shark, estimated at roughly 10 to 12 feet long, bit an unmanned kiteboard at Kaa Point near Kahana Beach Park in Kahului. Morgan Flannery of San Francisco ditched her kiteboard a quarter-mile offshore after having trouble with it, swam to shore and watched as the shark attacked it.

At 8:15 a.m. July 31, a California woman, Evonne Cashman, was snorkeling about 125 yards offshore at Ulua Beach in Wailea when a shark attacked her in 10 feet of turbid water.

She suffered puncture wounds to both surfaces of the right side of her torso and cuts to her right hand.

At 6 p.m. Feb. 21, two attacks by reef sharks occurred on Maui, one at Honokowai in Kaanapali, and another in Paia Bay.

SHARK ATTACKS
There have been six shark attacks on people in Hawaii waters this year:

[list][list_item icon=”icon-th”]At 4:30 p.m. Jan. 16, a man was surfing in 10 feet of water about 200 yards off Kiholo Bay, Hawaii island, when a 10-foot-long tiger shark bit him. He suffered cuts on his right forearm and the lower part of his right leg.[/list_item][list_item icon=”icon-th”]About 6 p.m. Feb. 21, Jacob Lansky was surfing about 75 yards offshore of Paia Bay, Maui, when a 6-foot-long reef shark bit the rail of his foam board. Lansky was not injured.[/list_item][list_item icon=”icon-th”]At 8:30 a.m. April 2, a 58-year-old California man visiting Maui was bitten while surfing off Kaanapali. He suffered two deep cuts on his right thigh.[/list_item][list_item icon=”icon-th”]At 2 p.m. July 29, a 19-year-old Kaneohe man was bitten by what was believed to be a tiger shark at White Plains Beach. Kiowa Gatewood underwent emergency surgery.[/list_item][list_item icon=”icon-th”]Between 8:30 and 8:45 a.m. July 31, a woman was bitten about 30 feet off a rocky point at Ulua Beach in Wailea in murky water. The California visitor was taken to Maui Memorial Medical Center and underwent surgery.[/list_item][list_item icon=”icon-th”]At 4:41 p.m. Wednesday, a visitor from Germany was critically injured and lost her right arm in an apparent shark attack near Makena, Maui. Witnesses did not see a shark.[/list_item][/list]

Apache Flex 4.10 Released!

Today the Apache Flex Team has released the latest version to the Flex SDK, we are now at version 4.10.0!

Apache Flex 4.10.0 highlights include:

    • Support for latest versions of Flash Player and AIR runtimes. At the same time, we have made it easier for developers wanting to take advantage of the latest advances in the Flash runtimes by letting them choose the versions during installation. The Apache Flex SDK Installer now allows developers to select various combinations of the Flex SDK, Flash Player and AIR runtimes. All the settings and configurations are taken care of during the installation, so the developer can just start coding!
    • Improved support for older Flash Player versions. Enterprise environments have more stringent requirement in terms of upgrading Flash Player versions. Now, because of our improved backwards compatibility, those customers can safely upgrade to the latest version of the Flex SDK without having to force a Flash Player upgrade on their end users.
    • The new spark components ensure that SDK users can build functionalities quickly and in a more performant way. The need for handling these components in two different architecture styles (mx vs. spark) will be eliminated.
    • “Out of the box” support for Advanced Telemetry allowing developers to easily profile their application and improve performance using Adobe Scout.
    • Better localization for multiple languages. Flex 4.10.0 is better now when trying to make application for multiple countries and languages.
    • Better international support for dates in formatters, validators, and the DateField and DateChooser components.
    • Better for developer productivity – less Run Time Errors (RTEs) and workarounds required in 4.10.0
    • 480 dpi mobile resolution/skin support means that Flex SDK users can now target high resolution devices such as iOS Retina, etc.

Wrong wmode value in Starling

A common issue that occurs when you have not set the wmode attribute in the HTML page is the following message “This application is not correctly embedded (wrong wmode value)”.

The solution is very simple. Set the wmode attribute in the HTML to “direct”. I have included my HTML code below as an example. I have embedded the swf using the swfobject. In the Starling framework in order for Stage 3D and GPU acceleration to work the wmode must to be set to direct. If it is not set to direct you may get a runtime exception when you compile the swf. You will most likely get the Error 3707: Context3D not available.

<!DOCTYPE HTML>
<head>

 <title>Wrong wmode value in Starling</title>

 <script src="swfobject.js"></script> 

 <script>

  var flashvars ={};
  var params = {};
  var attributes = { wmode:"direct" };

  swfobject.embedSWF("main.swf", "flashContent", "550", "400", "11", false, flashvars, params, attributes);

 </script> 

</head> 

<body> 
 <div id="flashContent"></div>
</body> 

</html>