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

iStockphoto Promo Code

View My Portfolio

I used this promo code on iStockphoto today and received $15 off my $75 purchase. So I only paid $60 on iStockphoto for 50 credits. A pretty good deal if you ask me. If you click the link above I will get a small commission thanks.

Here is the code – Promo Code: stocklayouts

Thanks to Elizaibeth for turning me onto the promo code.

 

7 Tips to Get People to Read Your Blog

Everyone wants Google rank their blog high in searches. Another important key is to get people to read your blog repeatedly.  Here are 7 tips to writing effective blogs.

  1. Provide Value
    Don’t write just to write.  Have a purpose and give people what they are looking for.
  2. Be Consistent (Reliable)
    Write regularly. Keep to a schedule so people know when to come back.  Seth Godin is the master at this.  I find that the more I am consistent, the more people read my blog.  If I get to busy and break a schedule then my numbers in Google Analytics drop.  Schedule a time to write your blog every day or week, let your users know about that time, and then consistently post to your blog at that time.
  3. Keep It Short
    Don’t write a diatribe.  In today’s lightning fast world people want a quick peek at something of value.
  4. Answer a Specific Question
    Use Google to find what keywords are most popular.  One very easy way is to just start typing in the Google search box the term you want to focus on.  This field will auto-populate with the most popular terms.  See the screen-shot below.

    Search Engine Optimization Terms

    Search Engine Optimization Terms

  5. Get Creative in Your Titles
    One of the most attention getting headlines I saw recently was from an associate at work who wrote, “My Dog ate my Blog”.  Make it catchy, relate-able, and you can even use things like lists in your title. Something like “7 Tips to Get Humans to Read Your Blog”
  6. Stick To a Theme
    Become the expert in an area and write about that.  Do this for several months before changing topics. You may notice that my blog comes up for the search terms “Flash Errors”, “Flex Errors”, and “ActionScript Errors” as well as Marketing, photography, and technology.
  7. Let People Find Your Blog
    Follow the 7 Tips for Getting Google to Read Your Blog so that people actually can find the great stuff you have to write.

Thanks and Happy Blogging

Curtis J. Morley

Stephen R. Covey iPhone App Special for my Readers.

April 13th only the “Great Work, Great Career” iPhone app is available for the price of $2.99.  It has been selling for $9.99 but to help with the downturn in the economy FranklinCovey is offering the iPhone app for this special price today only.

The app is fantastic and it really should be 5 apps sold seperately.The application helps you find a job if you are looking and helps you keep your job and make a difference at your company if you are employed. Get the FranklinCovey iPhone app.

Here are some screen shots.

Great Work, Great Career Great iPhone App

Great Work, Great Career, Great iPhone App

You can ask Stephen R. Covey or Jennifer Colosimo questions about getting and  keeping a job directly through the app.

The app comes loaded with videos from Stephen R. Covey and Jennifer Colosimo

One of my favorite features of the app is the Strengths finder.  It helps you make a difference for you company by laying out your strengths and helping you tap into them more.

Find out what your true strengths are and how to best use them.

Find out what your true strengths are and how to best use them.

The “Resource Finder” is where you go if need to get a job.

Find the right job for you with the Resource Finder

Find the right job and get the skills you need with the Resource Finder

Once you have a job and know your strengths then use the app to set out to make a difference with your “Contribution Statement”

Don't just work - Contribute!

Don't Just Work - Contribute!

Another awesome part of the app is creating a “Village” where you have instant access using your own contacts to in a way you may never have thought of before.

Who is in Your Village?

Who is in Your Village?

Get the Great Work, Great Career iPhone app today.

7 Tips to Get Google To Read Your Blog

  1. Determine Beforehand the 1-3 Keywords You Want Google to Find.
    Before you type a single line, determine which keywords you will target with your post.  In other words, what do you want people to type into Google to find your blog post.  Once you have these keywords put them all over in your post in different variations.  You will notice that throughout this post I will include the terms; “Google Food”, “Search Engine Indexing”, “Google to Index your Site”, “High Rankings in Google”, “SEO and Google Ranking”, etc… (Oh look I just added them again)

  2. Put at Least One of the Three Keywords in the Title.
    If you want Google to list you with a high search ranking for the word “Leadership”, an appropriate title would be, “Leadership for the Next Century.“ For Google to index your site, the way you want it indexed, you must have a title that contains at least one of these keywords. Because of the font size of the Header it will increase in importance according to Google’s algorithm.

  3. Make Sure that WordPress (or whichever blogging software you use) is Setup to Create Each New Page URL the Same as the Title.
    In WordPress (the most common blogging tool which this site is based off of) Go to Settings >> Permalinks >> Select  >> and choose either “Day and Name” or “Month and Name”. The URL is critical to search engine indexing.  If the link says www.myblog.com/leadership vs. www.myblog.com/?p=123  it will be Google Food.

    One way to get Google to Read Your Blog

    One way to get Google to Read Your Blog

  4. Caption all Images with the Keywords Chosen.
    If your term is “Leadership” then insert an image that portrays leadership and then give it a title and caption that has the word leadership in it. Notice the caption of the image above.  The caption and title of this post reads nearly identical.

  5. Match Your Categories, Tags, Excerpt and Metadata to Your Keywords.
    Include several variations of the keyword terms in the tags, categories, and excerpts.  For example – Leadership in Action, Corporate Leadership, Leadership Consulting, Leadership Solutions, Organizational Leadership, etc…  This is an easy way to get high rankings in Google.

  6. Keep to a Theme
    Give your blog a theme and keep things organized within that theme.  Don’t write about your dog one day and U.N. Diplomacy another day.  Make sure that you are consistent in what you post. Google loves reading blogs that not only have appropriate keyword density on a page but keyword density across your whole site.

  7. Link to and From at Least Three Other Sites
    Do a Google search on the keyword that you are trying to target and start clicking on the most popular.  Find a way to comment on each of the top sites and make sure to include a link back to your blog.  Also, throw an update (with link) on Twitter.  Within your blog link over to other sites (including within your own site and other domains you own or use)  that will most likely link back to you.  The more links you can get the higher your “popularity” and Google is like a teenager the way it cares about popularity.  Another great site that has a lot of great info on SEO and Google ranking is my friend’s site called Nick’s Traffic Tricks

Thanks and Happy blogging.

Curtis J. Morley

RSS Feed Filter Tools

Do you need a lot of info fast?  Do you need to be a maven in your industry?  Do you want every piece of info that your favorite newspaper or blog has – BUT you don’t want irrelevant information that just gets in the way?  Here is your solution.  An RSS Filter tool.  Everyone loves a good RSS feed but nobody wants the information overload that goes with it.  Here are some of the tools that I suggest to get RSS feeds filtered just the way you like it.

Yahoo Pipes

Yahoo’s tool for creating RSS feeds that fit your style.  Everything from E-bay to business tools.

Yahoo Pipes RSS Feed Filter Tool

Yahoo Pipes RSS Feed Filter Tool

Feed Sifter

A nice tool that filters individual feeds.  It is an inclusive RSS filter rather than an exclusive RSS filter.

Feedsifter RSS Filter Tool

Feedsifter RSS Filter Tool

Feed Rinse

FeedRinse RSS Filter Tool

FeedRinse RSS Filter Tool

Syndic8.com

Not a pretty site but it works well for RSS aggregation

Syndic8 RSS Filter Tool

Syndic8 RSS Filter Tool

Newsisfree

This company has been around a while and has a suite of tools for RSS feeds and filtering

NewsIsFree RSS Filter Tool

NewsIsFree RSS Filter Tool

Moreover

An RSS company that has created fantastic business-oriented channels and tools.

MoreOver RSS Filter Tool

MoreOver RSS Filter Tool

xFruits
The perfect way to slice and dice all of your RSS.
xFruits RSS tools

xFruits RSS tools

I hope this helps you get a tremendous amount of info while simplifying your life.
Happy Filtering
Curtis J. Morley

AS3 hotkeys reference

Are you looking to speed up your coding in AS3 when you are working in Flash environment?  Here is a list of hotkeys that you can use in your actions Panel or with external .as files.  Just hit the [Esc] key and then individually hit the two keys listed after and Flash will spit out a snippet of code for you.

If you want to add your own Flash Quickeys go into the ActionsPanel.xml file and add a quickey.  For example if I wanted to create a pacakage that contained a class and a constructor then I could create my own quickey to do all of that. or if I just wanted to create a package then I would add id =”package” quickey=”pk” to the line that starts <string name=”package” in a similar fashion as the rest of the line with quickeys.

Flash ActionScript3 HotKeys

AS3 output Quickey
   
trace ( ); [Esc – tr]
break( ); [Esc – br]
case condition : [Esc – ce]
continue; [Esc -co]
default : [Esc -dt]
do { } while ( ); [Esc-do]
} else { [Esc -el]
for ( ) { } [Esc -fr]
for ( ) { } [Esc -fi]
if ( ) { } [Esc -if]
return ( ); [Esc -rt]
switch ( ) { } [Esc -sw]
throw ; [Esc -th]
try { } [Esc – ty]
catch ( ) [Esc -ch]
finally { } [Esc -fy]
” “ [Esc -ev]
while ( ) { } [Esc -wh]
with ( ) { } [Esc -wt]
class { } [Esc -cl]
function ( ) { } [Esc -fn]
var ; [Esc -vr]
// [Esc -//]

As always happy Flashing

Curtis J. Morley

P.S.  Here is the code I used to grab all of the quickeys from the ActionsPanel.xml file.  I love E4X.

var quickeyXML:XML = {I pasted the XML from ActionsPanel.xml here}

for each (var element:XML in quickeyXML..@quickey)

{

trace(“[Esc – “+element+”]”);

}

CS4 Beta’s are out.

Adobe Releases CS4 Beta Products

Well we knew it wouldn’t be long after the public release of Flash Player 10 that CS4 Betas would be released.  Currently you can download the beta of Dreamweaver CS4 and beta of Fireworks CS4.  There currently is no Flash Beta but of course you can author for Flash 10 with Flex 3 and SDK 3.0.

Dreamweaver and Fireworks are excellent tools that if you don’t have you should get soon.  Especially with the new enhancements.  Here is a summary from the Adobe Labs website.

DreamWeaver CS4:

  • Live View
  • Related Files
  • Code Navigator
  • CSS best practices
  • Code hinting for Ajax and JavaScript frameworks
  • HTML data sets
  • Photoshop Smart Objects
  • Subversion integration
  • Adobe® AIR™ authoring support
  • New user interface

Fireworks CS4:

  • New user interface
  • CSS-based layouts
  • PDF export
  • Live Style improvements
  • Adobe type engine
  • AIR authoring

Thanks,

Curtis J. Morley

P.S.  I realize that the date on this post is before the actual date on Adobe Labs, but they always post the night before.  It may have something to do with global time.

ActionScript Warning #1100

Warning: 1100: Assignment within conditional.  Did you mean == instead of =?

Description:
AS3 warning 1100 is Adobe watching out for you and helping you out.  Flash/Flex let’s you know that you are assigning a variable while at the same time evaluating to see if it is true.  This AS3 warning is quite easy to understand and well written.

Fix:
To solve Flex/Flash Warning 1100 all you need to do is add another ” = ” sign inside your conditional making 2 == rather than just one.

Bad Code 1:

if (topFive[i]=“one”) {

Good Code 1:

if (topFive[i]==”one”) {

Note: This is not ActionScript Error #1100.  Click this link to find AS3 Error #1100.
This should help you resolve Flash / Flex Warning #1100

Thanks and as always Happy Flashing

Curtis J. Morley