Monday, October 31, 2005

Experiment with random output












Source will be available soon, after some cleanup. lol.
Inspired by http://levitated.net/bones/walkingFaces/index.html
[ Download .SWF ]
Playable on Browser, requires Flash Player 7 or newer
[ Download .EXE ]
Playable on any PC, but bigger file size

Sunday, October 30, 2005

Inspirations

I stumbled across Neave's site, the inspiration section, http://www.neave.com/inspiration which in a way he got inspired by the Flickr's services on how you can experiment with different application using flash, such as
http://www.krazydad.com/colrpickr/

It reminds me back of Guess-The-Google by Mr.Robinson. Hail to them.


OpenSource : Magnetic Field V1 (unoptimized)

OpenSource : Magnetic Field V1 (unoptimized)


Author's Note
It's not optimized for this version because it's using the onEnterFrame code which runs all the time even when the user does not do anything, which it will eats up a lot of CPU resources, and in fact, it will also makes your work inefficient for a larger scale basis. V2 coming soon.
Tips : Setting it at a higher FPS will make the thing runs smoother, but with a tradeoff that the script will need to loop more times, if you have more Frames Per Seconds.

30th October 2005
[ Download FLA ]

Friday, October 21, 2005

Easy/Medium : function() in Flash

Author : ManMeng
Difficulty : Easy / Medium
Topic : function() in Flash

It's powerful i mind you, and it's even mightier than Thor or Hercules, well, in my
opinion of course, at least it helped me to get through the website I've completed
recently, and saved my a** on a lot of troubles, (http://www.newmediaaward.com/).
Reading this article, I assume that you would have at least a minor knowledge of what
Flash MX / Flash MX 2004 can do for you, generally.

Introduction
It's so powerful that you can't live without it, and it's so dynamic that you are able to 'call' the function from everywhere within the movie, even if your movieclip are hiding
down deep inside the flash file. And what's even more you can put function inside another
function! And you are not even restricted to do all those super-hyper-special-dynamic-
interaction anymore!

But before i begin anything, i would like to seriously salute, bow and thank to Mr.Chee
Yen from HueVisuaLab that at least enlighten me towards this path to function() in flash.
:D. He's a great mentor to me at least.

The Concept
Okay, you'll even notice that the 'trend' are moving towards from what you hear:
-Script-everything-in-one-frame-flash-file
-ActionScript 2.0
-No-need-write-any-on-release-on-button-anymore
-use-alot-of-movieclip-only

Okay, that must scare you away, well, to be honest, REAL HONEST, it's not that freaking
hard to do it, and you'll be amaze and cry until you dry your tear how easy it is to
master all of those above! I did, and so can you!

The Trick
To show you how it works briefly on this article before i move on to another new post that i'll show how you can utilize this cool function() to create awesome navigation effect without even need you to go through the hassle copy pasting million of times.
So to understand the concept is EXTREMELY IMPORTANT.


First, we only need to have 2 layers for the Flash file (I'll provide the link for download at the end of this lesson). Obviously we'll need one layer that stores the Actionscript & function().
And the layer below is a MovieClip that will act as a button.
You ask why? It's my preference and you'll know why later.



To demonstrate how actually this function() will work, let's start by giving the button a name, i'll name it mc_btn. Then proceed to the actions layer, open up your Actions Panel by pressing on your F9 on your keyboard (PC). We'll use Export Mode if you're in Flash MX (Flash MX2004 by default, we'll have to type the script ourselves,but dont worry, it's not that hard as you think it is!), and it'll be easier for me to demonstrate how this thing work.

The ActionScript
No worries, here's the code you'll need to make it work, if you have trouble understanding it, it's the new Flash Event Model, I'll provide a link for you to read some articles about if you're curious, but even if you have no idea what it is about, you can master it easily, weird eh?
//--------------------------------------------------------------
// the function that you will call when user click on it //
function btnClicked() {
trace("hi")
}
// when user click on this button, instead of writing
// on (press) on a button, you can now do it on the frame
// while still getting the same effect

mc_btn.onPress = function() {
btnClicked()
}
//--------------------------------------------------------------


Save the movie and test it! Note that you can replace the trace("hi") with any other action you want flash to perform, using trace() is just for testing purpose and demonstrate how it works.



[Download FLA]

Have fun!
Salutes,
ManMeng

Friday, October 14, 2005

www.newmediaaward.com

So i've completed the first ever hyper-hardcore-coded interactive Flash website under my hand, but the real pain in my head is, it's ultiamtely CPU intensive that rendered me speechless when it ran on Mac, slow as a rock.

Well, i would still like to share the ups and down throughout the project itself and few discoveries I found and made within the project.

Some basics one, it's best you never user wmode=transparent for good god's sake, you'll end up scratching your head fighting for compability across platform and browser, that is when i realize it is not supported in Mac, and even worse, it increases the lag/cpu hogging. So when i switch back to an opaque background instead for the site, i'm still pondering on how i can stretch the background that is textured to look right on 'designer' point of view instead of splatting a flat colour background on it, it's a real pain, really.

So then i've started to study how it is made posssible that all these interactive sites nowadays, made full use of FSF (Full-Scale-Flash) which stretched the entire flash to 100% width and height, that covers their entire browser and doesnt scale the movie whenever i resize the browser's window instead it only moveis it position and maintain it at center.

That is when something like Stage.align really saved my ass from all the trouble. But as soon i got happy and uploaded the site, i'm bound to another tragedy that the size only loads half on Firefox, i keep on cursing and found out that there's a runaway for it, to add a bit of CSS code on top of your page.
height 100% for your body,html

So that really pissed me off, living thinking when there would be a day that browser war stops. But it's not the end yet, after spending restless month developing the site and figuring out this and that, I've chosed to use only 100% for the width of the class while maintaining the original height of the Flash without stretching it to 100%, because it doesn't fit correctly/entirely inside a 1024x768 screen resolution and would crop my project into half. God.

But alas, it's online and up at http://www.newmediaaward.com. The only pain left to me is to reduce the cpu processing cycles within the site, because even on idle, the movieclip's onClipEvent are everywhere and hogging up all the processing power.

Experiments in FlashMX 2004









Some testing on scrollbar, customly scripted by me. Supporting the mousewheel button, experimental design inspired by guys from http://www.oniondesign.com.tw











Flash Experiment // Magnetic // Runaway













Flash Clock :)