Actionscript 2, Actionscript 2.0, Flash, Flash _, Tutorials, Web developer

Simple Flash Example – Menu with library items and little bit actionscript

I did some simple example for beginners in Flash.
It is an example of a menu, standard looking but interesting. This example involves a little bit of core Actionscript skills, and it’s a more designer concept of programming in Flash.

SWF
FLA

menuItem library symbol contains a menu button
menu library symbol contains menu with menu items and actionscript code

Standard
Actionscript 2, Actionscript 2.0, Flash, Flash _, Tutorials, Web developer

MouseControl class – easy adding of mouse scroll wheel capability to Flash (AS2.0)

UPDATED VERSION CAN BE FOUND HERE :

https://mrsteel.wordpress.com/2008/07/31/mousecontrol-as2-class-update-added-mac-mouse-wheel-and-scrolling-area-support/

MouseControl class
for now just takes care of Mouse scroll wheel capability in Flash
MouseControl is Singleton class which lets you define movieclips and functions that should be invoked if user uses mouse scroll wheel over defined movie clip
it helps very much in situation when you need to define scrolling functionality in different classes of your Flash site or application

  • command addScroll(id, mc, function)
    example:
    MouseControl.getInstance().addScroll(“area1”, area1, Delegate.create(_root, moveFirst));
  • removeScroll(id)
    example:
    MouseControl.getInstance().removeScroll(“area1”);

example SWF : http://hagane.us/as/mousescroll/mousescroll.swf

source ZIP : http://hagane.us/as/mousescroll/MouseScroll.zip

I just also want to suggest that this is not correctly written Singleton class. Singleton classes should throw arror on attemp of basic class creation like:

var mouseControl = new MouseControl() ;

but mine is doing nothing, it is expecting that you use it correctly and that when you want to use class always use internal class instance (basic of Singleton), getting it with standard

var mouseControl = MouseControl.getInstance()

or with commands

MouseControl.getInstance().addScroll(id, mc, func)

avoiding doing proper Singleton is basiclly of AS2 which is not so strong typed language …
In AS3 I recommend you do proper Singleton – nice guide you can find on Grant Skinners blog

Standard
Actionscript 2, Actionscript 2.0, Flash, Flash _, Tutorials, Web developer

Simple accordion example in Flash 8 (Actionscript 2)

I made this really simple example of accordion usage replying to one forum question.
Nothing special to see, but good for beginners just to get simple things going and get more interested in Flash.

Beginners can play arround with symbols star,circle and square and their icons, also you can use few new AS lines to add more childes to accordition. Create new symbols for new childes, give them proper names and don’t forget to put export for AS and export in first frame in properties of movieclip (right click on symbol in library and choose Properties option) … Also don’t forget to use help on any topic in Flash, even if you think you know it good there are lot of usefull information and you can find some methods that are really interesting.

http://www.hagane.us/as/accordion/accordion.swf
http://www.hagane.us/as/accordion/accordion.fla

Standard
Actionscript 2.0, Actionscript 3.0, Applications, Flash, Flex, Web developer

Flash is Bad? – untrue – EffectiveUI’s Anthony Franco shares his exerience

EffectiveUI is company based on providing Flash player based RIA developement. Anthony from EffectiveUI shares his experience with clients and wider about famous “Flash is bad” oppinion, and he does it very good.

Read the article

Also, you can take a look at interesting Podtech interviews with guys from EffectiveUI

Standard
Actionscript 2.0, Actionscript 3.0, Applications, Flash, Flex, Tech, Video, Web developer

Papervision3D presentation video from MAX Japan 2007 [video]

http://papervision3d.blip.tv/

I will just quote:
“Hi All,

For my presentation @ MAX Tokyo (on Papervision3D), I created a showreel of
the work done with Papervision3D. Work demoed is done by the PV3D Team
(including a VERY nice ASCollada demo, the girl), agency work, and you guys,
the community. Check it out, your work might be in there!

http://papervision3d.blip.tv/

With many thanks to our friend Quick & Brite, who kindly lended me one of
their tracks.


Ralph Hauwert”

Standard
Actionscript 2.0, Actionscript 3.0, Flash, Flex, JavaScript, Web developer

SWFObject 2.0 beta5 – SWFFix with old/new name

SWFFix was the planned name for new gen of Flash embedding suite, but cause nothing is wrong and needs to be fixed, united authors decided to go with old/new and already famous name, SWFObject. So beta5 release of SWFObject 2.0 is ready to download at Google Code.

In SWFFix page interesting discussion about Flash accessibility is opened, and interesting link popped out http://niquimerret.com/, good collection of discussions and links on wide accessibility questions.

Standard
Actionscript 2.0, Actionscript 3.0, Flash, Flex, Web developer

Deneb Meketa about Flash Security you should know

It seems to me that Deneb Meketa – Flash Player Security Engineer had very nice session at Adobe MAX about Flash security. PDF file covering topics of that session is very usefull for expanding knowledge. Flash security is sensitive question as it is with all web stuff so words coming from Deneb is very precious, although many thing should be known already. Thanks!
Take a look at the PDF file: Flash Security : Why and How by Deneb Meketa

more about security is coming from Raghu post 

especially interesting is Adobe guide

Standard
Actionscript 2, Actionscript 2.0, Flash, Flash _, Web developer

FLV Flash Video Player Tutorial Update – now with Sound Volume Control and Play Again button

After I’ve made simple tutorial that covers FLV Flash Video Player, determining duration of FLV through PHP and MetaData and also using a first frame as a video thumb in this New Years post
https://mrsteel.wordpress.com/2006/12/31/flv-video-playback-with-duration-time/

time has come to improve a player a bit, based on user wishes
I’ve added sound volume control and play again button
basiclly it was simple thing to do using the previous code, but for beginners it’s hard to manage things like this

for sound volume control standard Sound class is used like for every sound in Flash
about the Play Again button it’s just seek function for video and giving it 0 value as parameter

here is the demo SWF : http://hagane.us/as/flvplayer/
and zip source : http://hagane.us/as/flvplayer/flv.zip

just when you trying it out remember to put any FLV file named video.flv in the same folder

all the best
Alex

Standard
Actionscript 2, Actionscript 2.0, Flash, Flash _, Web developer

Custom setInterval replacement class – Timer from Misuta Hagane Util package

need for replacemenr of setInterval in AS2.0 is obvious, it happened to me and to other people many times that clearInterval just won’t work… it’s basiclly in only 1% of cases but it’s enough

so to help me and my friends I’ve created Timer class which fits into Misuta Hagane Utils package, which will soon get extension with some other interesting things (Misuta Hagane is my alias in Japanese language // my new homepage http://hagane.us)

MHU Package / Timer Class

initializing the class

– place com.hagane.MHU folder in root of your project
– import in flash project via AS

import com.hagane.MHU.Timer;

– create instance of the class

var timeKeeper : Timer = new Timer();

being that my class creates movieclip for enterframe events, by default it’s 32760 and it’s created in root and named timer, I made it possible that you tell in constructor what mc to use for timer
In that case you create instance like this

var mc:MovieClip = _root.createEmptyMovieClip(“mc”, 50);
var timeKeeper : Timer = new Timer(mc);

add interval function call

var intervalID_mc : Number = timeKeeper.intervalCall(time:Number, repeat:Number, func:Function, param: Parameters…);

time:Number – time in ms
repeat : Number – number of repeating, 0 and 1 for once, -1 for infinite
func : Function – function to call
param : Parameters – can be anything that fits into parameters of func – function you decided to call

function returns ID of your interval, which you will later use to clear interval

for example

var intervalID_num : Number = timeKeeper.intervalCall(999, 5, traceABC, 3, 5, 6, “myInterval”);

clearing interval

timeKeeper.clearIntervalCall(intervalID:Number);

In archive file you have everything set up for testing.
You will see main action is taking place in main.as which is included in first frame of FLA file.
MHU Package / Timer Class

if you have any question SHOOT!

Standard