Actionscript 3.0 Video Tutorial #10: Interaction between AS3 and JS

Interaction JS - AS3
A new ActionScript 3.0 tutorial is just out, thanks to the awful weather we got here in Geneva…
This tutorial is about interaction between ActionScript and JavaScript. Calling functions from both languages is really easy since Flash8 and it did not change with Flash CS3. In this tutorial we call function from AS to JS and from JS to AS also passing some values from both languages. Also the JS work with Firefox (and other related browser) and Internet Explorer (it has been the harder part ;) ). If you find a browser where this method does not work, please tell me.

Controlling ActionScript 3.0 via JavaScript and JavaScript via ActionScript 3.0.
Easier than expected!

This is an absolute must-know if you want to build Rich Internet Application IMHO.

You can find the video and the source directly on my dedicated AS3 page.
Ahmet

Actionscript 3.0 Video Tutorial #9: Connecting with a Database

Connecting with a Database
Finally, I found the time to make a new video tutorial about AS3:

How to send and receive values to/from a database with Flash CS3 and ActionScript 3.0. Using a server sided script (in this example php).

Basically it will do simply what you could do so hardly with AJAX: asynchronous request.
I used Captivate this time and I hope it will be more easy to understand and to learn at your own pace. You can see the new video tutorials on my AS3 page.
As usual you can also found the source (php, fla, as).

By the way I want to thanks all of you who send me email about those video tutorials, I always appreciate it :)

Ahmet

Is Div replacement considered by Google as cloaking?

hidding your content from Google
I was reading the post from Google Webmaster Central (link via FlashEnabled), about the best uses of Flash.
Someone (Jason) commented that the was to use JavaScript (SWFObject) to make the Div replacement, another one warned him about the danger as being considered as cloaking by the Google Bot.

Personally I used this technique in most of my web projects were I had to handle Flash. By now I never saw one of my website being consider as doing cloaking, I can’t imagine a bot reading JavaScript files (as all my JavaScript are loaded by another a JavaScript function), and I really don’t think that Google would humanly verify that the content of a Div differ from the Flash…

Use of Javascript is an entirely legitimate web practice. However, use of Javascript with the intent to deceive search engines is not. For instance, placing different text in Javascript than in a noscript tag violates our webmaster guidelines because it displays different content for users (who see the Javascript-based text) than for search engines (which see the noscript-based text). Along those lines, it violates the webmaster guidelines to embed a link in Javascript that redirects the user to a different page with the intent to show the user a different page than the search engine sees. When a redirect link is embedded in Javascript, the search engine indexes the original page rather than following the link, whereas users are taken to the redirect target. Like cloaking, this practice is deceptive because it displays different content to users and to Googlebot, and can take a visitor somewhere other than where they intended to go.
Google Help:Cloaking, sneaky Javascript redirects, and doorway pages

So I guess until Google can understand Flash we mustn’t ask ourselves too much useless questions, simply use the best method: JS!
Anyway, even Google use Flash and AJAX, have anyone tried to use Google Analytics without JS enabled: it’s simply not working (and there is not even a noscript tag …), which simply bring us to this simple conclusion, not all your Flash content need to be understood by Google.

Had anyone been out of Google by using the Div replacement?

Ahmet

Papervision3D Public Beta

Since the first time I’ve heard about Papervision I’ve always been stunned by the demo provided.
Today is a great day as they are going live for their Public Beta.

papervision3d public beta

Papervision3D moves from private testing to a full public beta.
Everybody is welcome to download and start playing with it. We believe you will find it very easy to use and to integrate into your Flash 8, Flash CS3 and Flex projects.
It is released under the MIT Open Source license, which means it is absolutely free for any commercial use.

So now I’m sure I’ll be even more amazed by all the demos that are going to spread on the Flashosphere.

Getting started and all information from the Papervision blog

Ahmet

Markup Validation Service Beta 0.8.0

W3C
The W3C offer to test the new beta of the W3C html/Xhtml validator services (checks the markup validity of Web documents in HTML, XHTML, etc.)

There are a number of
cosmetic and UI changes, but the biggest difference is under the
hood: the new validator is using a new library as a wrapper around
its main parser, resulting in drastic speed improvements, and a lot
of interesting new possibilities.

Users of the validator are probably familiar with the note stating
“The Validator XML support has some limitations”. Be prepared to say
good bye to such a familiar sight: while the 0.8.0 validator is still
using the same base parser for validation (the excellent and
venerable opensp), it now has an XML sidekick making sure XML-ill-
formedness won’t go unnoticed.

W3C validator beta 0.8.0
List of changes

Ahmet

3D Pathfinding in AS3

3D pathfinding AS3 [via: Beedigital, draw.logic]
Source code to download of pathfinding with AS3 in 3D!

The actionscript architect Paul Spitzer has posted two killer demos of pathfinding using A* in AS3/Flash 9 using the Away3D engine (derivative of Papervision3D that is taking off) and you can download the source for both. These demos not only highlight the pathfinding but also provide editing of the graph to be traversed which could easily be made into a game world editor.

I’m looking forward to have some times to look at the source, btw I’m wondering if it is the shortest path taken or not? Also why doesn’t it follow exactly the cube structure, the path seems to take “air” sometimes.
Anyway this is a great job.

Ahmet

EBook: Adobe AIR for JavaScript Developers

AIR for Javascript Developers After offering the Ebook “AIR for Flex Developers“,
Danny Dura, Kevin Hoyt and Mike Chambers has release a new book: AIR for JavaScript Developers.
The free Ebook is available on Ajaxian.

The pocket guide covers:

  • Introduction to AIR
  • Getting Started with AIR development
  • Working with JavaScript and HTML within AIR
  • AIR Mini Cookbook
  • Command line tools
  • Aliases
  • One more great marketing idea, and a very useful book to have.

    [via Anand Vardhan]

    Ahmet