CMX Weekly Newsletter

Check the News!

Control Your Flash Movies Via Javascript

Most Flash developers are familiar with using techniques such as fscommand() to invoke a JavaScript function from a Flash movie. But what about the opposite? How do you communicate with Flash from an HTML page using JavaScript? In this article, you'll learn how to use FlashVars and the LocalConnection class to send messages to a Flash movie embedded in an HTML document. This technique should work on virtually every browser and platform, provided the user hasn't disabled JavaScript.

In his article, CMX Flash expert Paul Newman demonstrates the technique by creating an application that controls Flash video playback with JavaScript. You can view the live demo here.

The article includes the following support files:

  • demo.htm — This HTML document contains a select menu, four HTML buttons, and two Flash movies.
  • flashobject.js — This external JavaScript file, created by Geoff Stearns, embeds Flash movies in HTML documents using XHTML-compliant code.
  • sendToFlash() — This JavaScript function is invoked when the user interacts with HTML controls in demo.htm.
  • main.fla — This is the main Flash movie (main.swf).
  • main.as — The ActionScript source file for main.fla.
  • agent.fla — This "headless SWF" is meant to be hidden from the user, but it also contains a Flash text field for debugging your application.
  • agent.as — The ActionScript source file for agent.fla.

The article only scratches the surface of what's possible using this technique. For instance, you could create a hidden Flash MP3 player controlled by image buttons in an HTML document. With a little effort, you could even add file upload support to Flash via an HTML pop-up window.

This article is available for $10.00 to non-members, but is absolutely free to CMX subscribers. Read more about how to purchase it.

It Pays To Read This Newsletter

Community MX readers can save $50 on the CFUNITED conference June 29th thru July 1st near Washington DC. Over 50 speakers on ColdFusion, Flash and more in seven tracks. Use code R1534 on their signup page to get your discount. This discount is good until June 20th, so sign up soon.

But Does Your Gaming Console Cure Cancer?

Supposedly, if you combine an infinite number of monkeys with an infinite number of typewriters, at some point they would have created the great works of Shakespeare, or something like that. According to the Physics Forums, attempts at testing that theory didn't work out so well. But a similar tactic, called Distributed Computing, links hundreds of thousands of computers together for a common goal. Some examples are Seti@Home and Folding@Home. Up until now, the idea was that all of that combined computing power could help solve complex problems that one computer could not solve alone. Now scientists are thinking that you could link gaming consoles together to perform those same complex computing tasks. Interesting story from Wired.com.

I Wonder If This Will Be Part Of AOL's Next Ad Campaign

According to this story at Yahoo!, Denial of Service attacks are more likely to be generated from AOL user's computers than any other ISP. The computers are used as proxies to launch the attacks, unbeknownst to AOL's subscribers. AOL spokesman Andrew Weinstein said "This survey is a huge victory for our members." Well, at least optimism is still alive and well in the ISP world.

What Else Is There To Say, But "Gee, Have A Nice Day... And Renew My Passport"

Microsoft has joined Yahoo! and Google in complying with China's wishes to censor the internet in their country. Bloggers using MSN's blogging service in China are banned from using words like "democracy" and "human rights" and "freedom." Microsoft's software will prompt anyone blogging any of the banned words to "enter a different word for that item." More on this story appears at ZeeNews.com.

Satisfied Customers Speak Out!

  • "Thanks Adrian.  I requested a tutorial on the accordian and datechooser components in Flash and this is even more than I asked for"

    - Anthony E., CMX Subscriber, commenting on Adrian Senior's article, Discovering CFMX 7: Flash Forms, Part II .


    Whether you're just starting out or need advanced support, Community MX will give you answers and ideas to work through your tough issues. Don't miss out. Learn more about CMX or sign up for a free trial today!

Great Quotes:

"PROGRAM - n. A magic spell cast over a computer allowing it to turn one's input into error messages. v. tr.- To engage in a pastime similar to banging one's head against a wall, but with fewer opportunities for reward." — Unknown

Time To Update Your MS Software Again

Advisories for flaws that exist in Outlook Express, Windows, Internet Explorer and a few other Microsoft products came out this Tuesday. A few of these advisories are tagged as "critical", and you are advised to run Windows Update as soon as possible. This article at Eweek.com goes over each advisory in detail.

Ah, Couch Potato Geek Heaven

Akimbo is a service that streams television shows, movies and music across your broadband connection and onto your television. Their Akimbo box holds up to 200 hours of shows, and in the long run, it's cheaper than subscribing to premium cable channels. Although Akimbo says they're not out to replace cable companies, this is a good alternative for those who don't want one big, expensive cable package. They've lowered the cost of their Akimbo box to $99 and the monthly fee is only $9.99, although premium channels can cost anywhere from 99 cents to $3 or so. We found out about Akimbo though a link at DesignTechnica.com.

Dear Blog, Today My Stupid Boss Fired Me.

What do people like Peter Whitney, Ellen Simonetti and Mark Jen have in common? They're all bloggers, and they're all featured, along with some other bloggers on a blog about being fired for blogging. Whew. We won't go into specifics on each of these people, but we'll leave you with this cautionary quip from employment lawyer Cliff Palefsky: "I don't think it's a good idea to publicly criticize your employer." Well Cliff, apparently some don't think like you do. By the way, got any job openings?

Those Folks At Apple Are Mum, Coy And Just A Bit Secretive

The recent announcement from Apple that they will be putting Intel chips inside their Macs caused a lot of discussion this past week. This article from EWeek.com helps promote the good side of Apple's move, and is hopeful for their future. Speculation abounds as to whether or not Apple's future workstations will run Windows, but Apple's director of software product marketing, says "Apple doesn't plan to sell or support Windows, but we're not planning anything on the hardware side that would preclude it from running."

Waste Of Time = Windows XP N

Windows XP N is Microsoft's operating system that ships without Windows Media Player. XP N was required by Europe's competition commissioner due to antitrust concerns. The time and money it took to create this alternative version of Windows may have been in vain though, since Dell, Hewlett-Packard, Lenovo and Fujitsu Siemens say they're not going to be installing it on their PCs because the demand for the WMP-less computers doesn't exist. More on this at News.com.

CMX Zip CFC

  • This is a ready-to-use ColdFusion Component you can use to easily create ZIP archives right from within your ColdFusion applications. No outside sofware (such as WinZip) is required and the component only uses Java classes available in any standard ColdFusion MX installation.

    Take a look at this ColdFusion Component by CMX Partner Arman Danesh

Fun and Freebies!

America's Newest Camping Spot: Times Square

For no other reason than "It might be cool", a few college-aged kids decided they'd take some tents and camp out in Times Square. They wanted to see if they could camp out for a whole night without getting kicked out. They made it, and of course posted pictures at Flickr.com to show everyone just how cool it was.

Further Proof That The Workplace Is Becoming Increasingly Odd

Thanks to Fark.com for this link. It seems that Saeed Akbar, a manager at an interpreting and translation company, has what he likes to call a "tough interviewing technique." If tough means getting naked and expecting the horrified applicant to do the same, then Saeed's technique will go down in the Interviewing Hall of Fame as the toughest.

Bad Things

How bad is it when you learn PHP but miss a simple function like stripslashes()? Not that bad apparently. Now, how bad is it when your ISP goes down in the middle of an important download? That's pretty bad. You can find a nice guage of what's good and what's bad at Cockeyed.com's "bad" section.

AJAX.NET (Free)

  • AJAX, it's the hottest thing since sliced bread right now. It stands for Asynchronous Javascript using XMLHttpRequest and the basic premise of it is that you can call serverside code from client side javascript without reloading the page. In essence, this gives almost limitless powers (as far as programming languages go) to the little script that could. The canonical example that started the whole craze was Google Suggest, where search results show up as you type. In this article, I'm going to discuss a novel product (AJAX.NET) which is thankfully free, that takes all the guesswork out of creating AJAX applications. The code is presented in C# and you will not need a compiler to run it.

    This free article by CMX Partner Joel Martinez can be found here.

Weekly Content Listing

fl

Talking to Flash with JavaScript

Paul Newman

At the time of this writing — Flash Player 7 — there is no consistently reliable method for talking to Flash with JavaScript. But there is a workaround. In this article, you'll learn how to use FlashVars and the LocalConnection class to send messages to a Flash movie embedded in an HTML document. This technique should work in virtually every browser and platform, provided the user hasn't disabled JavaScript.

cf

Using DTS Packages with ColdFusion: Part 2

Tom Muck

Many people use SQL Server to store their data, however SQL Server is much more involved than simply a server that allows storage for data. Data Transformation Services (DTS) is part of SQL Server and allows you to import and export data, manipulate files on the system, use FTP, among other things. Using some of SQL Server's built-in DTS functionality along with ColdFusion gives your web application access to some of this functionality.

Part 1 of this series showed how to export data from SQL Server to a CSV file triggered by a ColdFusion page. This part will show how to upload a CSV file to the server and import it into a new table. It will show how to pass information (a filename) to a DTS package from a ColdFusion page and use it in the package.

css

List Display Problems In Explorer For Windows - Part Two

John Gallant, Holly Bergevin

The major cause of list problems in Internet Explorer involves whether a list or its children are granted the mysterious Microsoft property called 'layout'. In this tutorial we will demonstrate what happens in three versions of the Internet Explorer browser when 'layout' is applied to various elements in a typical vertical navigation list. We will also make recommendations on what to do to create a workable, cross-browser display of the list that solves the IE display problems. You know you want to follow along!

sql

Understanding SQL - Part 4: The Select Statement - Evaluation Ordering

Adrian Senior

In this tutorial we will see how accepting the default evaluation of SQL operators can lead to unexpected results being returned to the client. We will see how the default evaluation order of logical operators can be overriden using parentheses and nested parentheses.

The Understanding SQL Series
Understanding SQL - Part 1: The SELECT Statement
Understanding SQL - Part 2: The SELECT Statement - Comparison Operators
Understanding SQL - Part 3: The SELECT Statement - Logical Operators & Clauses
Understanding SQL - Part 4: The SELECT Statement - Evaluation Ordering
Understanding SQL - Part 5: The SELECT Statement - Utilizing the IN & BETWEEN Operators Coming Soon

fl

Using Collections and Iterators in ActionScript

Danny Patterson

The idea of collections and iterators is borrowed from Java. In Java there are two interfaces, Collection and Iterator, that describe this functionality. Implementations of the Collection interface in Java would be classes like ArrayList. In this article, you will learn how to use a generic Collection and Iterator class and what the advantages are. Our implementation won't follow the Java collection framework exactly, but it borrows many of the same concepts.

fh

Love is in the Air - Do-It-Yourself Wedding Invitations Using FreeHand

Kim Dudley

One of the hottest new trends for weddings and special events are hand-made invitations. There are hundreds of web sites that offer hand-made invitations or DIY invitation supplies. In this tutorial I've gone one step further and supplied you with Freehand templates and all the information you need to create your own, personalized invitations. Hand-made invitations are an extra touch that will let the guests know this event will be extra special.

This tutorial has everything you need to create your own wedding invitations or you can customize them for any other special event. These wedding invitations are an elegant, classic style but depending on the paper, fonts and embellishments they could be used for any celebration.

fw

Locking and Changing Colors in the GIF Color Table

Jim Babbage

Slicing your designs in Fireworks can really help with the weight of your page and with getting the best format/compression for a particular area of a design. However, slicing can sometimes produce unexpected color shifts when you export GIF slices. This is due to the fact that each slice has it's very own color palette, and — especially when you are using the Web Adaptive or Adaptive palettes — colors may shift based on the color range in the slice. While not always visually noticeable in Fireworks the resulting problem can be seen quite well when two sliced graphics with the "same" background color are next to each other on a web page.

This tutorial looks at ways deal with color export/color matching issues, both from the Dreamweaver perspective and the Fireworks perspective. The video tutorial shows in detail how to change and lock colors in the Optimize Panel's GIF color table

dw

Logging Page Execution Time in ASP: Part 2

Danilo Celic

While using a flat file for logging page execution times can be useful, it's a little harder to readily get the results out of it. That's why some folks prefer to store the results into a database so that they can use the aggregating abilities that is built into SQL. This part of the article will cover inserting the data into a database and creating a reporting page that will show which page(s) are running long. If you haven't already, make sure to read the first part of this article: Logging Page Execution Time in ASP: Part 1.

dotnet

Custom Objects with AJAX.NET

Joel Martinez

Watching the development of the AJAX.NET wrapper over the last few weeks has been a real treat. Many many new features and enhancements have been added since the last time I wrote about it. In this Tutorial, I'll show you how to pass custom business objects to and fro from server to client. By being able to move business objects back and forth from the server, AJAX.NET allows you to design your application using object oriented techniques. If done right, it could lead to tremendous productivity gains.

Code is presented in C# and no compiler is needed to use the techniques described within.

dotnet

Using the ASP.NET Insert Record Server Behavior - Part 2

Heidi Bautista

This article picks up where Part 1 left off. You'll get a better understanding of how to use the Insert Record server behavior with datatypes other than just strings and you'll learn how to add the necessary modifications to the MM:Insert tag so that it handles the ASP.NET validators that have been added to the form. The sample pages are provided in C# and VB.NET.

Dynamic CSS: Real-time Rule Changes

  • The ability to give users the power to manipulate and control the styling of your site in real-time can change the way users experience and use your site forever. In this article we'll take a look at how to work with and change style sheet rules in real-time.

    Check out the Article by CMX Partner Rob Williams

Tips, Tricks and Dirty Cheats!

This week's Tip, Trick or Dirty Cheat is courtesy of Tom Green, CMX Partner.

Shortcut For Increasing the Canvas Size in Fireworks

Want to increase the canvas size without using the keyboard. Select the crop tool and drag out a crop area that is larger than the canvas. When you press the Enter (PeeCee) or Return (One true computer) key, the Canvas expands to the dimensions of the crop.

Would you like your tip published? Submit it to tips@communitymx.com.

That's it for this week. Stay tuned for the next CMX newsletter!