Flash Helps: Search an Array in AS3 (actionscript 3)

Searching an Array was never easier than in Flash CS3 using AS3 (actionScript 3 )

Here is a sample:

//this is our array
var myArray = new Array(“bob”, “jimmy”, “sue”);
var searchForJimmy = function (searchValue) {
trace(“searching for: “+searchValue+” array length: “+myArray.length);
for (var i=0; i<myArray.length;i++)
{
if (searchValue == myArray[i]) {
trace(“found “+searchValue+” at array # “+i);
}
}
};
//call our function and define what we are searching for
searchForJimmy(“jimmy”);

Flash Helps: ColorTransform Change the Color of a Symbol in AS3

Need to change the color of a symbol using AS3 (actionscript 3)?

Here’s a simple little script:

//the instance name of the clip I am coloring is colorbg
var colorTransform:ColorTransform = colorbg.transform.colorTransform;
colorTransform.color = 0×006699;
colorbg.transform.colorTransform = colorTransform;

Adobe AIR for Linux

Adobe just released the public beta for Adobe AIR on Linux.

With Adobe bringing the AIR to Linux it just fattens the potential benefits for the open-source community. Just think of the potential AIR could bring making something like Photoshop or Illustrator fully cross-platform. This sort of cross-platform runtimes (like AIR on Linux) are increasing in popularity, apps that are more standards based…a one install fits all if you will…not platform specific technologies rather than platform-specific proprietary technologies. Who knows, as these one-install-fits-all become more popular…perhaps I’ll drop this PC for a Linux!

AIR on Linux Adobe

More Info: AIR for Linux Release Notes

Flash Helps: XML and AS3 (actionsript 3) Flash

XML AS3 (actionscript 3) Flash sample? So I was all ready to write up a great AS3 XML sample using the new E4X and Flash CS3 and I see that Jesse Harding beat me to it.

With the release of Flash Player 9 a few years ago, a new virtual machine called ActionScript Virtual Machine 2 (AVM2), which increases player performance. Improvements to the ActionScript language in ActionScript 3.0 offer Flash geeks new functionality when creating Flash applications.
As Jesse discovered…with AS3 (and AVM2) there are a lot more XML ways to retrieve data. E4X provides faster and more ideal access to XML data. Use it at runtime to pull data directly from an XML object, which means you don’t need to write a specialized parser. In AS2 the XML data had to be changed from an XML packet into structured data, like arrays, in order for Flash ActionScript to use the data. Now this process is way more intuitive and logical making XML data easier to utilize using ActionScript 3.0.

Check out Jesse’s sample.

Woodside Newspaper Ad

Ad: Oquirrh Highlands Ad
The Jest: Full Page Newspaper Ad

Print Ad

Flash Helps: Preloader in ActionScript 3 (AS3)

Here’s a simple little ActionScript 3 Preloader that shows the percentage loaded. I shared a circle preloader here using As2.

Create two keyframes and on the first frame put the following AS3 preloader ActionScript:

stop();
addEventListener(Event.ENTER_FRAME, myloading);
function myloading(event:Event) {
var bytestotal = stage.loaderInfo.bytesTotal;
var bytesloaded = stage.loaderInfo.bytesLoaded;
var sclbar = Math.round(bytesloaded*100/bytestotal);
myText.text = “”+Math.round(bytesloaded*100/bytestotal)+”%”;
myLoader.gotoAndPlay(sclbar);
if (bytesloaded >= bytestotal) {
gotoAndStop(2);
removeEventListener(Event.ENTER_FRAME, myloading);
removeChild(myLoader);
}
}

On the 2nd keyframe is where your content goes.

Sample Files:
preloader AS3.fla
preloader AS3.swf

Adobe Launches Photoshop Express Public Beta

http://www.photoshop.com/express


Photo Shop

Today announced Adobe Photoshop Express public beta, a free Rich Internet Application (RIA) available to anyone who wants to store, sort and show off digital photos with eye-catching effects. During the public beta period, Adobe will solicit Photoshop Express user feedback on product features and functionality, which will continue to evolve over time. As the newest addition to the Photoshop family line, Photoshop Express has taken much of Adobe’s best image editing technology and made it simple and accessible to a new online audience. Photoshop Express allows users to store up to 2 gigabytes of images online for free, make edits to their photos, and share them online in creative ways, including downloading and uploading photos from popular social networking sites like Facebook.

Doritos Nacho Cheese

Currently eat: Doritos Nacho Cheese

Doritos Nacho Cheese

Book You Need: Flex 3 Cookbook: Code-Recipes, Tips and Tricks for RIA Developers (Cookbook) (Paperback)by Joshua Noble (Author), Todd Anderson (Author)

Flex 3 dude? You’ll need this book:

Flex 3 Cookbook: Code-Recipes, Tips and Tricks for RIA Developers (Cookbook) (Paperback)
by Joshua Noble (Author), Todd Anderson (Author)

Flex 3 Cookbook

 Amazon Says:

Book Description
The best way to show off a powerful new technology is to demonstrate real-world results with it, and that’s exactly what Adobe and O’Reilly have done with Flex 3.

Through it’s Flex Cookbook website, Adobe invited users of the Flex 3 beta to post their own solutions for working with this technology, using O’Reilly’s popular problem-solution-discussion format. Website monitors (and authors) Joshua Noble and Todd Anderson chose the most useful solutions for Flex 3 Cookbook.

This highly practical book contains more than 200 proven recipes for developing interactive Rich Internet Applications and Web 2.0 sites, including several contributed by Noble, Anderson, and other Flex experts. You’ll find everything from Flex basics and working with menus and controls, to methods for compiling, deploying, and configuring Flex applications.

Each recipe features a discussion of how and why it works, and many of them offer sample code that you can put to use immediately. Topics include:

  • Menus and controls
  • Containers and dialogues
  • Working with Text
  • List, tiles, trees, and repeaters
  • DataGrid and Advanced DataGrid
  • Renderers
  • Images, videos, and sounds
  • CSS and skinning
  • Building components
  • States and effects
  • Collections, arrays, and DataProviders
  • DataBinding
  • Validation/formatters
  • Charting and data visualization
  • State management, SharedObjects and LocalConnection
  • Working with services and ServerSide communication
  • Working with XML
  • Communicating with the browser
  • Application development strategies
  • Runtime and dynamic shared libraries and modules
  • Working with Adobe AIR

Whether you’re a committed Flex developer, or still evaluating the technology, you’ll discover how to get quick results with Flex 3 using these these recipes. Now that Flex is an open source framework, the user community will continue to supply solutions to extend and improve the technology. This Cookbook offers you the cream of the crop.

About the Author
Joshua Noble is a development consultant with three years of experience in building enterprise level applications using Flex integrated with Java, Ruby, ColdFusion, and Microsoft .NET. Todd Anderson is a Senior Software Developer in the Multimedia Platforms Group at Schematic Boston, and is co-author of *Adobe AIR Instant Results: Create – Modify – Reuse*, a Wrox/Wiley title scheduled for release in spring of 2008.

SOTW: Roses by Bel Auburn

This week’s SOTW (song of the week) is Roses by Bel Auburn.

I’ve been listening to these guys for over a year now and i can’t get enough. Their really solid. Great melodies and solid lyrics. Check out Roses by clicking the play button below.


Here is the song of the week for this week.

You need Flash to listen to this

Artist: Bel Auburn
Song: Roses
Label: indie
Genre: Pop, Rock

Massive Migraine

I had a massive migraine last night.  Due to this event, as a result of happenstance, I’m all ibuprofened-up.  Hence, a little light mindedness ensues.

Yestereve, I was thus sitting here all-a-gaze, as normal, looking at my dual monitors, and suddenly, all at once, sooner rather than later, as the day was near to be as the next, I was seeing in cross-eyed envisionment. I knew that the ails of migraine were near-to-be upon the said Smith.

I rushed out the door as fast as I might have hoped to of rushed. I made it home with nearly no help from my right eye…as it was of no use…it had gone all a-blur. I crashed on the family-room couch and covered my head with a multi-pillow dome.  I was safe…at least until my 6 year old son began whistling his rendition of “Victory at Sea”.

Book You Need: Mastering CSS with Dreamweaver CS3 by Stephanie Sullivan and Greg Rewis

Here’s a book you need to get if you are serious about learning mastering CSS: Mastering CSS with Dreamweaver CS3 by Stephanie Sullivan and Greg Rewis.

Mastering CSS with Dreamweaver CS3

Co-author Greg Rewis, blogs about the book here.

Amazon says:

Book Description
In Mastering CSS with Dreamweaver CS3, authors Stephanie Sullivan and Greg Rewis demonstrate how to use Dreamweaver CS3 and CSS together to create highly individualized, standards-based layouts. Through hands-on projects with visuals, the book gives readers an in-depth understanding of Dreamweaver’s 32 CSS-based layouts (new in Dreamweaver CS3) and their application, enabling every user of Dreamweaver to learn CSS effectively and easily.

About the Author
Recognized as a Dreamweaver, accessibility, CSS and XHTML expert by the worldwide Web community, Stephanie Sullivan frequently presents at conferences, where her insightful, down-to-earth, and entertaining sessions garner top ratings. Stephanie’s tutorials and educational articles appear regularly on sites such as Adobe’s Developer Center. Greg Rewis is the Worldwide Senior Evangelist for Web Tools for Adobe and spends over 200 days a year on the road, talking with customers, giving product demonstrations at trade shows and seminars, speaking at industry conferences, and leading specialized advanced training sessions featuring Adobe’s Web Tools product line.

Flash Helps: Changing the frame rate In Flash CS3 using AS3 (actionScript 3)

Using ActionsScript 3.0 in Flash you can dynamically change the frame rate of your swf by using the Stage class.

The Stage class represents the main drawing area. The Stage represents the entire area where Flash® content is shown.

The frame rate is frames per second. By default the rate is set to the frame rate of the first SWF file loaded. Valid range for the frame rate is from 0.01 to 1000 frames per second.

To change the frame rate at runt time using AS3 use:

stage.frameRate = 18;

That’s it! Hooray!

What is the Deal with People Talking on the Phone?

So, yeah…what is the deal with people talking on the phone?  I see people talking on the phone everywhere: in the car, in bathroom, in the office, at home, in the swimming pool, at the gym, on the treadmill, riding a horse, in the hallway.

C’mon people, I swear the only reason you are talking on the phone is to annoy other people that are not talking on the phone.  Well guess what, you are annoying me.  Stop talking on the phone so much and start teaching your children how to read for a change.

Song of the Week: Capstan by Nineteenseventyeight


Here is the song of the week for this week.

You need Flash to listen to this

Artist: Nineteenseventyeight (now called South of ’78)
Song: Capstan
Label: Kelp
Genre: Pop, Rock

« Previous Entries