App used to work with AIR 3.2 or 3.4, doesn’t work with AIR 3.5 or 3.6

AIR 3.5 and 3.6 SDK for mobile require TLF Text to be merged into code.

Because I just spent the last full day dealing with this issue (without finding an answer on any forum) I thought I would share this so that you don’t have to bang your head against the wall. You probably found this page because your mobile project worked in AIR 3.2 or AIR 3.4 but when you try to publish your iPhone app or Android app using AIR 3.5 or AIR 3.6 SDK it  breaks.

This is the full error that I was getting when trying to publish from Flash CS6 using AIR 3.6:

Warning: Ignoring ‘secure’ attribute in policy file from http://fpdownload.adobe.com/pub/swz/crossdomain.xml. The ‘secure’ attribute is only permitted in HTTPS and socket policy files. See http://www.adobe.com/go/strict_policy_files for details.

TypeError: Error #1009: Cannot access a property or method of a null object reference. at startMeUp/firstRunAnim()[/Users/speedclimb/Documents/cjm/Flash/Mobile/MobileDev/STARTME/startMeUp.as:229] at startMeUp()[/Users/speedclimb/Documents/cjm/Flash/Mobile/MobileDev/STARTME/startMeUp.as:210]

Neither of these AS3 Warnings/ Errors make sense nor have any info to point you to a resolution. Don’t try and troubleshoot AS3 Error 1009 The problem is that Apple now requires that all of this is embedded. Adobe complied with the changes from Apple and because of this when creating a mobile app using AIR 3.5 SDK or AIR 3.6 SDK with TLF Text you must have the .swc “Merged into code”.

Solution:

In order to compile with AIR 3.5 or 3.6 SDK you have to do one of two things. You can change all of your TLF Text into “Classic” text. This works but is not ideal because then you lose all of the great formatting features of TLF Text. The better solution is that you change the “Default Linkage” in your ActionScript settings to “Merged into code”. Sounds complicated but it’s not. Go to File >> ActionScript Settings, when the dialog window pops up make sure you are on the “Library Path” tab and then change the drop down from “Runtime Shared Library” to “Merged into code”. Below is a screenshot showing how to solve this AIR 3.5+ SDK compiler issue. The important areas are highlighted in red.

Change the Default linkage from "Runtime shared library" to "Merged into code"

Change the Default linkage from “Runtime shared library (RSL)” to “Merged into code”

I hope this saves you 16 hours of brain damage trying to compile your code using AIR 3.5 or AIR 3.6 SDK.

As always Happy Flashing (for mobile)

Curtis J. Morley

 

Flex / Flash TypeError: Error #1006: value is not a function.

ActionScript Error #1006: A user-defined namespace attribute can only be used at the top level of a class definition.

Description:
This ActionScript error will pop-up when a namespace is declared anywhere besides the class definition. What is a class definition you ask? It is simply the code that names the class – something like ‘public class MyClass’

After the class is defined you are allowed to create custom(or ‘user-defined’) namespace on that level. Anywhere else in the code is not legal. This ActionScript Error is closely related to the Flash/Flex error #1114.
This AS3 error may also just be a typo. you may have typed something like ‘publi class’ rather than ‘public class’ or ‘prvate function’ rather than ‘private function’

Fix:
Either fix the misspelling in your code or place the ‘user-defined namespace’ inside the class definition. The second code example shows a namespace to separate cars and animals. Notice how the bad example nested the ‘user-defined namespace’ inside the constructor function.

Bad Code 1:

package com.cjm.somepackage
{
publi
class MyClass {
publi
function MyClass() {}
}
}

Good Code 1:

package com.cjm.somepackage
{
public
class MyClass {
public
function MyClass() {}
}
}

Bad Code 2:

package
{
public class MyClass
{
public namespace Cars;
public namespace Animals;

public function MyClass()
{
Animals var Jaguar:String = “A large cat chiefly of South America”;
Cars var jaguar:String = “A large car chiefly driven in North America”;
}

Cars function run():void {
trace(“At $30/mile”);
}

Animals function run():void {
trace(“On four legs”);
}
}
}

Good Code 2:

package
{
public class MyClass
{
public namespace Cars;
public namespace Animals;

Animals var Jaguar:String = “A large cat chiefly of South America”;
Cars var jaguar:String = “A large car chiefly driven in North America”;

public function MyClass()
{

}

Cars function run():void {
trace(“For 100,00 miles”);
}

Animals function run():void {
trace(“On four legs”);
}
}
}

Adobe has a great explanation of how to use namespaces as well as Collin Moock in Essential ActionScript 3 in Chapter 17

Related AS3 Error:
Flex / Flash Error #1006 addEventlistener is not a function

As always Happy Flashing

Comma Maker

Comma Separated Value Maker

Have you ever had a list in excel or word and needed that list to be separated by a comma and space instead of a new line. Well I have, and still do, so, I thought I would write this little Flash app that creates comma separated values from a list separated by new lines. In other words a list of zip codes will go from this:

84057
84119
84663
84523

to this:
84057, 84119, 84663, 84523

Enjoy and Happy Flashing. Parker, this ones for you.

Adobe Max 2009 Anouncement – Flash Player 10.1

Flash Player 10.1 is now available which gives mobile phones users the ability to run the full version of Flash on a mobile device.  This release has a tremendous amount of features and developments.  As you can see in this graphic from Kevin Lynch’s presentation Flash Player 10.1 is now:

  • Smartphone enabled
  • Multitouch capable
  • Accelerometer capable
  • Hardware accelerated
  • HTTP video streaming capable
  • Contains content protection
  • Has Peer assisted networking (social network integration)
Flash Player 10.1

Flash Player 10.1

Flash Player 10.1 also has significant performance enhancements as you can see in the graph below.

Flash Player 10.1 Performance Improvements

Flash Player 10.1 Performance Improvements

Talk about Happy Flashing!!!!

Which Browsers Come Preinstalled with Flash Player?

Here is the quiz of the day.
Which Browsers Come Preinstalled with Flash Player?

Icons for IE8, Chrome2, Safari 4, Firefox 3, Opera 9

Icons for IE8, Chrome2, Firefox 3, Safari 4, Opera 9

Which Browsers come preinstalled with the Flash Player plugin pre-installed?

  1. Internet Explorer 8 (8.0.7100.0)
  2. Google Chrome 2 (2.0.172.37)
  3. Firefox 3 (3.51)
  4. Opera 9.7 (9.64)
  5. Safari 4 (4.0.2)
Find out the answer after the break.
Break
If you guessed Internet Explorer 8 you would be right.  The way I found this out is because our computer failed and I took it in to get it fixed at EBC computers who did a great job (a little pricey) and replaced the harddrive and installed Windows 7 as the OS.  The first thing I did (after plugging it into our 25″ monitor at home) was to download the various browsers.  I then saw the page on Opera Mobile and wanted to check it out.  Surprisingly none of the browsers (including Opera which was the site I was on requiring Flash Player) had the Flash Player preinstalled  except for Internet Explorer 8.
And here are the screenshots to prove it.
Google Chrome Flash Plugin Screenshot
Google Chrome isn't presintalled with Flash Player
Google Chrome isn’t preinstalled with Flash Player
Safari Flash Plugin Screenshot
Safari Browser is not presintalled with Flash Player
Safari Browser is not presintalled with Flash Player but had a detiled pop-up
Firefox  Flash Plugin Screenshot
Firefox Browser is not presintalled with Flash Player.  This was pretty lame.
Firefox Browser is not presintalled with Flash Player. This was pretty lame.
Opera Flash Plugin Screenshot
Opera Browser is not presintalled with Flash Player.  The lamest of all.

Opera Browser is not presintalled with Flash Player. The lamest of all.

So what should you do if you run into this scenario?  Go to Adobe of course and Get the Flash Plugin.

Thanks and as always,

Happy Flashing

Curtis J. Morley

Speaking at Elearning DevCon – Flash + Google Analytics = FLOOGLYTICS

I am excited to say that I will be speaking at the E-Learning DevConE-Learning DevCon is arguably the best Flash E-learning conference around.  This is one of those hidden gems that people talk about long after they are gone.  Some of the most respected E-learning and Interactive Instructional designers will be at this conference. Sign up quickly because it is filling up fast.

Presentation:

FLOOGLYTICS = Flash + Google Analytics

FLOOGLYTICS = Flash + Google Analytics

Flash and Google Analytics = FLOOGLYTICS
Flash has always been considered the ugly step sister in the world of SEO and Analytics. Well now Flash takes “Center Stage”. Using Google Analytics data can be extracted from Flash that could never be pulled from HTML. This session will explore the ins-and-outs of how to setup Google Analytics to work most effectively with your Flash files and how to set up Flash to work most effectively with your Google Analytics account. Go beyond just seeing what users did. See what users meant to do or even wanted to do but didn’t. The most important part of the equation is how to refine this gold that Flash and Google Analytics provide. Walk away from this session armed with the tools you need to implement Flooglytics and make your site effective.

Where:
E-Learning DevConUniversity of Utah, Salt Lake City, Utah

When:
June 17th-19th 3:30 P.M.

So sign up for E-Learning DevCon and I let’s make learning exciting again.

Happy Flashing,

Curtis J. Morley

Presenting at E-Learning DevCon – Cognitive Learning

I am excited to say that I will be speaking at the E-Learning DevConE-Learning DevCon is arguably the best Flash E-learning conference around.  This is one of those hidden gems that people talk about long after they are gone.  Some of the most respected E-learning and Interactive Instructional designers will be at this conference. Sign up quickly because it is filling up fast.

Presentation:

Cognitive Learning


Cognitive Learning Screenshot

Cognitive Learning Screenshot

This lecture will engage you and bring to life aspects of learning that are only now being tapped through technology. This style of learning walks through how technology can take learning from a passive experience to an engaged and cognitive experience. We will look at how the use of video and divergent paths can engage learners like never before. Curtis will show the product that has only been shown at one other conference – the Global Chinese Conference for Computing in Education. Come at let your brain be engaged.

Where:
E-Learning DevConUniversity of Utah, Salt Lake City, Utah

When:
June 17th-19th 3:30 P.M.

So sign up for E-Learning DevCon and I let’s make learning exciting again.

Happy Flashing,

Curtis J. Morley