Archive for the ‘Code’ Category

Flash is Finished (but not how you have been brainwashed to believe)

October 26, 2012
flashIDE

Flash Authoring Tool with Asset Tools and Management

I admire the human instinct to explore – to want to do new things.  So… perhaps it is no wonder that the interactive development world has embraced this challenge of HCJ – HTML, CSS and JavaScript under the popular guise of HTML 5 and proudly open source for all to contribute.   Flash on the other hand has been honed for roughly 15 years into a tool with synergy of parts organized by a hired team of brilliant people with the focused purpose to make an application for building advanced interactivity.

In my mind, Flash is finished – as in COMPLETE.  In recent years, the improvements that the Adobe engineering team were telling us, we could not even really understand.  Concurrency… and other really high level tweaks to make it run as fast as possible has been the focus.   Developer conferences were becoming stale – there was nothing really new and exciting – new ended at getting access to the GPU and mobile devices through AIR.  One final wish for Flash would be to integrate the GPU so we do not have to think about it – like the Starling framework.

So… can we perhaps get it in our head that the lack of excitement for Flash is not because it is dead but because it no longer needs to be changed.  Flash is a mature system.  As such, can we please show it some respect – the whole world seems to want to kill it – is that what you do with adults after they stop growing?

On the HTML side, we are still adding new things.  We got three important tags – canvas, audio and video.  When Flash got bitmap access (canvas) in 2003 – yes, ten years ago, we developers felt the amazing excitement.  It was followed shortly with a dramatic upgrade to ActionScript – moving to AS3 a generation beyond the current JavaScript.  These were exciting changes.  The changes we are excited about on the HTML side are for things that Flash had years and years ago – I can’t even remember Flash without sound and video.

While HTML is still changing, so too is the culture of Web developers.  Hopefully they will advance past the mindset of just presenting information – and this whole adaptive design hoopla – we have been doing adaptive design in Flash forever.  That is what vector is about – that is a main strength of Flash.  Flash has always been able to scale in multiple ways – I have made many projects that implement adaptable design.  Anyway… hopefully developers will look past this to building applications where users can do things and create things.  This does not mean a form.  This often involves several elements that Web developers are still getting used to.

1. Hit Tests
2. Dragging and dropping
3. Resizing and rotating
4. Drawing with shapes and curves

If you ask any Web developer how many times they have done any of these you would probably get that they have dragged and dropped a few times.  I, being an interactive developer, have done all of these things hundreds if not thousands of times.

In Flash, we have been given 67 packages holding 757 classes although we do not use all of them and many just hold constants.  Perhaps we use about 50-100 classes regularly. Our main interactive container class, the Sprite has 68 events available, 53 properties and 39 methods.  You can see them here: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Sprite.html  Some might say that this is bloat.  Well… there have been many things pruned from Flash as well over the years – including the current way that JavaScript handles classes.  Flash is so well organized that any excess does not really get in the way.  You import the classes you need – and it is nice to have what you need.

AS3 Packages, Classes and Sprite Example.

AS3 Packages, Classes and Sprite Example.

I will continue to develop my Web and Mobile apps in Flash.  If I need a Web app for mobile browser then I will use HCJ.  I encourage all former Flash developers to use and recommend the right tool for the job.  I also encourage you to help develop HCJ into a right tool.  But I certainly do not encourage you to say Flash is dead or to recommend to co-workers, clients and upcoming developers not to use Flash.  Because I can guarantee you that in Flash we can build faster and more concisely than HTML 5 developers when it comes to advanced interaction.

Dan.

PS.

View the source of what I needed to do to get dragging to work in HTML.  I looked for almost a day to get a drag and drop script that worked across all platforms.  In the end, I chose an older script and modified it with the help of an expert in HTML 5 to handle mobile.  http://www.danzen.com/realmstar/drag-drop-custom.js – is 789 lines long to drag and drop.  Well… Flash is startDrag() and stopDrag().

This brings us to the topic of Libraries and Frameworks. JQuery and JQuery Mobile have have drag and drop solutions – I could not get them to work but I don’t currently do jQuery so that could be why.  CreateJS has a solution and I have since gotten it to work.  SentiaTouch probably does as well, etc.  All these different frameworks provide their solution with their syntax.  HTML is trying to implement drag and drop if they have not already – I think I read something about it.  Well… I tell you, it is time consuming to keep up with all this stuff and be swapping frameworks every month.  Perhaps it will settle but how will this look?  Do Web developers want all the solutions to go into HCJ?  Are the framework developers going to be happy with this as they see their framework implemented “natively” and become poly-fill for old browsers – hopefully.  And will this end version – converging to perfection be called bloated.  Will it take the same resources Flash?  Most likely – that is if it ever gets there.

In my mind, we need both open source and closed source.  You cannot design by committee – it gives you grey – committees and open source are similar.  Agile groups or even individuals are where ideas and advancement come from.  It helps for there to be a reward – such as money to spur such innovation.  Of course many innovators will donate their work to open source, it is just that for the most part, I see innovation coming from closed source – so do not try and kill it by smearing it and making it taboo – or, for instance, taking away browser plug ins.  It is most ridiculous for an open source community to say the only scripting in Web browsers will be JavaScript.  Can you hear yourselves?

Advertisements

Gogo! Animate YouTube Videos in your Ad Spots

April 16, 2012

Gogo - YouTube Video Ad by Ad Inventor

See the ads in action!

Read more at http://adInventor.com.  Ad Inventor has been around for a while with dozens of different types of ads made – see http://danzen.com/hypno for a rather dated history.  Please remember that when hypno was made, it was full screen size!

Note… gogo will show a static ad (of your choosing) for browsers that do not support Flash.

-12-

Processing is Dead! All Hail JavaScript!

January 21, 2012

hail2

Processing is Dead!  All Hail JavaScript and HTML5!

ActionScript is Dead!  All Hail JavaScript and HTML5!

Java is Dead!  All Hail JavaScript and HTML5!

Objective C is Dead! All Hail JavaScript and HTML5!

C++ is Dead! All Hail JavaScript and HTML5!

C# is Dead! All Hail JavaScript and HTML5!

Ruby is Dead! All Hail JavaScript and HTML5!

Python is Dead! All Hail JavaScript and HTML5!

PHP is Dead! All Hail JavaScript and HTML5!

Hopefully you detect my bitterness and disappointment with the open source world, the tech media and the marketing industry in their frenzy to adopt HTML5 as supreme leader and shun perfectly good programming environments.

My experience is with ActionScript and Flash – a mature authoring environment which allows developers to make once and publish anywhere.  Anywhere that is until Apple came along an banned it from the mobile Web with lame self-serving excuses.  What followed was nothing short of persecution.  https://danzen.wordpress.com/2013/02/22/apple-should-be-punished-for-attempting-to-kill-browser-plugins/

Processing is a spin-off of Java with a wonderful artist following to make cool things.  Well… watch out… once people realize that you can do this in JavaScript and HTML5 – maybe you will have the horde against you too.

Most of these languages are server side languages and back-end coders may think they are safe because JavaScript is a front end programming language… but there is server-side JavaScript too.

My point is – there does not have to be nor should there be one programming language or development stack.  Why we are letting the Web be controlled by one system is beyond me.  Countless Marketing folks, Developers and Designers I have talked to in the field are saying Flash is dead – Plugins are dead.  Stop trying to kill Flash with your words and start trying to support it.

My apologies for the harsh metaphor (not as harsh now that I have taken out the swastika from the picture).  Of course, nothing is worse than human persecution.  But what some of you with power of influence are doing when declaring Flash dead or accepting the demise of the Plugin is unjust and truly not good for our culture.  Please read https://danzen.wordpress.com/2013/02/22/apple-should-be-punished-for-attempting-to-kill-browser-plugins/.

Adobe Flash Games and Apps on Apple iPhone

October 5, 2009
Penguin for Flash on the iPhone

Penguin for Flash on the iPhone

Yay!  Adobe has announced that Flash Games and Applications will run on the Apple iPhone as of the upcoming Flash CS5.

Flash on iPhone

This is great news for a number of Dan Zen features and tools such as the advanced interface tools called Flash Feathers at http://flashfeathers.wordpress.com.  Where open source Flash classes are provided to handle multitouch and tilt technologies:

small_05

Tilt Technologies in Flash using Penguin

small_04

Multitouch in Flash using Goose

A fantastic day for all – long awaited!

Tilt a chat a blob dodo, Parallax a Penguin, Multi multi user touch, Spectral Flash with Dan Zen

July 7, 2009

blogcollage_smallbright

Dan Zen comes out of hypernation with a collection of advanced interface Birds – Birds? – for Flash.

FLASH FEATHERS

ROBIN – multiuser chats and realtime games with Flash and PHP
FALCON – easy data transfer between Flash and server scripts
HUMMINGBIRD – parallax effect with mouse for 3D menus
GOOSE – multitouch emulator with just Flash and Browsers
PENGUIN – tilt emulator and processor for tilt and translation apps
WOODPECKER – sound frequency and wave animation for MP3
OSTRICH – motion capture cursor follows your Web cam motion
DODO – blob detection of motion in a Web cam

flashfeatherslogos

Thousands of lines of code has gone into the Flash Feathers series so that designers and developers can create the functionality of each in a half dozen lines of code.  So… let anyone you know who works in Adobe Flash about the Flash Feathers site at:

http://flashfeathers.wordpress.com

If you are interested in advanced interfaces but do not code then you may still want to watch the video section of each bird site as we go through the examples.  All the working examples are in the zips.

Dan Zen will be performing Hula songs in Hawaii for the next while and may have some time for a feature later in the summer.

Mixing Interactive Works

March 13, 2008

Much like we have a DJ for audio and a VJ for video, we will have an IJ for mixing interactive works. These interactive mixes will be on our walls within ten years with OLED technology. OLED Walls.

Meta stories and games will be played out through the mixes. Games of follow the leader, quests, mazes, hunts, rallies, chases, tag.

ZEN MIX
Zen Mix (http://www.zenmix.com) is a tool that was specifically built to mix interactive works. In the original Zen Mix it is not so apparent because people are seeing the outcome of creations. But in the tool, the elements of the creation are interactive. So when I am in the Zen Mix tool I put Opartica (the Op Art tool) on top of Zen Picture (sliding picture viewer) then I can operate both of them and even have a video blended with the results. This is the place to be. Not just watching, but doing, exploring and creating.

SCENARIO
The IJ would be responsible for starting people off. Scenario: here’s an oldie from 2001, Opartica, mixed overtop of the latest branching music video from Vincent Morisset. Each branch of the video brings in associated Zen Pan of overlayed backgrounds. Zen Pan pans across pictures and other interactive works such as Zen Picture Zoom.

In the above scenario, people can watch it all happen or they can use Opartica to change the patterns over the video. When their mouse causes the video to branch, Zen Pan comes in which could be operable through transparent parts of Opartica or perhaps Opartica is faded out (prompted by a shared event). When Zen Pan shows Zen Picture, they can zoom in and out on pictures and wave their mouse to go to other pictures. One of the pictures might be a Zen Deck filled with further interactive works. Clicking on one of these might fade out or ZoomExit the prior interactive works and start you in a fresh set of environments. Personal meta navigation will be available to go back.

ZEN MIX 2
The new Zen Mix (Zen Mix 2) will be like a browser with multiple pages stacked. You can go into the pages through transparent areas or areas in applications that open up to more layers of environments. If all goes well, it will be fullscreen (adjustable), optionally available on your desktop so you can incorporate local and remote media, and will publish an FLV for distribution. It will also let you read in YouTube videos which was a limitation of a previous version of Flash.

SHARED COMMON EVENTS
For this to happen, there are some technical issues. Zen Mix and interactive mixers are possible because of Flash and its ability to load in other flash files. There are cross domain issues on occasion and a standard or a policy of how these will be handled will help people mix interactive works. Also, some legacy code while working independently will not work within other files due primarily to using a root reference. This can be fixed quite easily by locking the root in older code but requires editing.

More importantly, there are issues of transparency and event handling. When a user clicks or rolls over an area does the application on top pass the click or roll event through to the next layer. Flash can have transparent areas that will let the click pass through. But there are more than mouse events. Imagine that an animation is finished playing – that is an event. Or the user is increasing the volume of a sound. If your application broadcasts this event then the other interactive applications could subscribe to the event and do something like zoom in on a picture as the sound is increased. Reaching the end of an animation might change a blend mode or launch another application, etc.

So we need a set of guidelines for interactive works so that people can more easily work in layers of different interactive features. This could take on the form of an interface or an API. But rather than concentrating on a data and method API this should be an event API and perhaps more importantly a common event API to handle:

  • Click
  • DoubleClick
  • Timer
  • MouseMove
  • Press
  • Release
  • KeyPress
  • KeyRelease
  • Load
  • Unload
  • Focus
  • Blur
  • Start
    • animation
    • video
    • sound
  • Complete
    • animation
    • video
    • sound
  • Change
    • volume
    • frame
    • motionX
    • motionY
    • motionZ
    • width
    • height
    • depth
    • transparency
    • blend
    • selection

A variety of common states might be good too to handle modal issues, etc.

Then when these interactive works get put into Zen Mix or an interactive mixer, various properties and connections can be set so that triggered events from one application calls a method or sets a property in another application. This could be a one off thing like a load event. Or it could be an event that calls over an interval – like a mouse move or a change event.

THE PAST
Zen Picture (2004) was probably the first application in which I brought in a second interactive tool (Opartica 2001) and realized that mixing these was interesting. I ran into problems as the panning event of Zen Picture and the subsequent zooming within Zen Picture prevented interaction with the inner tool. Since then, I have used Opartica, Zen Picture and Zen Pan (2005) within Zen Mix for various psychedelic dancing as exercise episodes.

THE FUTURE
The designer of an interactive mix might be a story teller, artist or programmer for a story teller or artist (or one in the same person) would then set up stories or modules for stories. These could be like rooms, chapters, tools, tasks, puzzles, games, mazes, presentations, worlds, realities – cyberspace. Of course a prime element of a mix is another mix.

Aspects of Meta can readily be explored leading to more interest in the topics of the philosophy of Nodism. Nodism takes our understanding of XML (the current way to share organized data) and Object Oriented Programming (how we model life in games an simulations) and proposes a single hierarchy that nests us all.

Falcon – Adobe Flash 9 AS3 Data Class

February 23, 2008

Falcon - Adobe Flash 9 AS3 Data Class Replaces URLVariables, URLRequest, URLRequestMethod, URLLoader and URLLoaderDataFormat

Have you ever wondered how social network sites are built like facebook, YouTube, flickr, MySpace, etc. and sites like Ebay, Amazon, any forums, wikis, blogs, etc.? There is a front end that you see and a back end that sits on a server. To be able to share data and make elegant use of the Internet as a medium, we have to be able to pass data (in variable or XML or JSON, etc. format) from the front end to the back end and back again.

Falcon is an Adobe Flash custom class that lets you send and receive variables, text, XML or binary data. You can load XML or text from a file or send and receive variables or XML to and from a server script like PHP and then on to a database like MySQL. Falcon automatically makes a DataProvider if your variables are sequential so that it is easy to make a DataGrid (table in Flash).

The Flash scripting language, ActionScript 3.0 is now a complete Object Oriented Programming language that follows the ECMAScript standard as does JavaScript. In doing so, the language has become very internally consistent. For this consistency to work, the former classes (properties and functions) have been broken down into smaller or more precise classes. This means that to handle data, ActionScript 3 now has five classes that are used to load even just one variable! These are URLVariables, URLRequest, URLRequestMethod, URLLoader and URLLoaderDataFormat. This results in fifteen lines of code.

Falcon wraps or combines these native AS3 classes into one class. The class uses three active lines of code. This simplification makes it easier for designers and developers to provide important functionality of sharing information.

As an inventor of social games, tools and environments, I realize the importance of passing data to the server so that it can be shared. This technique is used in the following Darth Detector, Changing Mail, Chatnap, Baron Digbody’s Castle, Lady With Brooch, Danisms, Dens, Dan Zen Garden, Gorgolon, Grim Reaper’s Age Guesser, Gycopo, Hip Cats, Kula Pu Idol, Moustache Mysteries, Opartica, Pagoda Of Games, Password Paradox, Tapoll, Prediction Train, Rich Deck, Salamander, Save Earth, Spirogram, Spy-mail, Telepathy, Teleporters, Tilator, Tower Of Babel, Web Ouija, Utopia, Wannaget, Word Warp, Yesumno, Zen Deck, Zen Dots, Zen Mix, Zen Motto, Zen Pass, and Zen Picture Pan Zoom.

-08-


%d bloggers like this: