video.Maru
by polyGeek polyGeek logo



 

Placing controls on top of the videoWindow

November 27th, 2007 . by polyGeek

This is easily the question I get asked the most about video.Maru: how can I put controls on top of the videoWindow?

It’s very easy to do:

  • select the videoWindow MovieClip
  • Hit the F8 key to convert that to a MovieClip - essentially embedding the videoWindow within another MovieClip
  • Give it any symbol and instance name you want
  • Make sure that your controls are on a layer above the layer which holds the videoWindow holder - you probably already did this

video.Maru uses recursion to find all the controls so you could nest the videoWindow, or any other control, inside as many MovieClips as you wish and it will still work - provided the control is defined on frame one of the timeline.
The reason that the videoWindow ends up on top of other controls is that the videoWindow gets replaced at runtime with a MovieClip that is embedded in the Library.

MovieClips created at runtime automatically get placed on top of any MovieClips that are on the stage at authoring time. That’s because authoring time MovieClips get a depth starting at -16383. Creating MovieClips at runtime defaults to starting at a depth of 0, above anything on the Stage at authoring time.


256 Levels of recursion

November 27th, 2007 . by polyGeek

If you didn’t know, the magic ingredient to video.Maru is recursion. And recursion can be a dangerous thing when it isn’t controlled because it leads to infinite loops. But even if it is controlled the Flash player halts after 256 recursive calls because it thinks it has reached an infinite loop.

I wish they would up the number of recursive calls to something around 1024 loops but that’s another story.

Here is the error message you would see if you go over 256 recursions:

256 levels of recursion were exceeded in one action list.
This is probably an infinite loop.
Further execution of actions has been disabled in this movie.

Here’s the simple solution to fixing this if this happens to you while using video.Maru. Simply select everything that is a part of your video player - including the video.Maru SWC - and hit F8 to convert it to a MovieClip. It doesn’t matter what you name the MovieClip and it doesn’t need an instance name.

That should fix everything for you.

The reason for this is that the video.Maru SWC is on the same level with lots of other MovieClips and buttons on your stage. So when video.Maru runs it recursively runs through everything from the level it is on to see if it is a part of the video interface. By placing only the video interface elements into a MovieClip it isolates the rest of your FLA from video.Maru.

An analogy of what’s happening

If you have a site built in Flash you could think of your FLA as a forest. The Stage is like the forest floor and the trees are your MovieClips. And each tree has branches and leaves just like MovieClips have other MovieClips nested inside.

So if you put video.Maru on the forest floor - the Stage - it would recursively try and crawl through every tree in the forest. But your video interface is usually just one specific tree in the forest. So you need to put video.Maru on just that tree. It will now recursively crawl through just that tree but won’t climb down and attempt to crawl through other trees.


Factory Floor

October 30th, 2007 . by polyGeek

Many words have been used to describe video.Maru for it’s stunning simplicity and yet powerful features - Kohinoor being my favorite.

And many talented designers have used video.Maru to create some great designs.

But just as no one buys a Ferrari Fiorano expecting that the factory floor from which it was produced is as sexy as the car itself. Neither does anyone use video.Maru for it’s well organized building and testing environment. In fact, very few have ever seen the source from which video.Maru is created.

Until now.

Here you are: the video.Maru factory floor.

video.Maru factory floor

If you can stomach that then go ahead and download the source FLA, minus any video content.

I do feel that I should mention that this is really only one third of the visual environment which I get to enjoy working in. Don’t tell my wife, but next year I hope to upgrade to triple 30s. :-)