Archive for the 'Flash and actionscript' Category Page 5 of 6



ActionScript. Constructor parameters when extending MovieClip class, Flash AS2 vs. AS3


Constructor is a method which is called when an object of a class is instanced.

Like in any programming language, in actionscript constructor must have the same name the class has.

Constructor, as a function, may take any number of parameters.

Which is very handy to pass to initialize the objects.

I would recommend using constructor parameters over calling any additional initializing methods.

Here is a good example of using constructors in ActionScript:

var myPoint:Point = new Point(0,0);

And I can give you a lot of such examples.

However, this article is about a particular case, passing parameters to a constructor of your class, which is inherited from (extends) MovieClip.

Continue reading ‘ActionScript. Constructor parameters when extending MovieClip class, Flash AS2 vs. AS3′

Tutorial, ActionScript 3, Using Shared Objects to show the time of page browsing.

Here is my first tutorial at FlashDaWeb.
I will show how SharedObject might be used.

For illustration, I came up with an idea to show users the time they spend browsing a particular page.

Here is an example.

Open this demo page and see the timer, then close it and open again anytime you want. Notice, time will not start again from 0:0, it will continue counting from the very values you previously closed it. Quite nice, isn’t it? :)

This movie requires Flash Player 8

In your hands.

The above functionality was implemented with Adobe Flash CS3, ActionScript 3 and SharedObject.

You may download the sources .fla and .as files

Download: tutorial sharedobject sample  tutorial sharedobject sample (11.2 KiB, 3,300 Downloads)

Continue reading ‘Tutorial, ActionScript 3, Using Shared Objects to show the time of page browsing.’

Becoming a flash developer, actionscript coder, flex engeneer… What’s your way?

Just want to share and wonder to hear the way you have become a Flash Developer.

Myself, I was studding and developing system things using Visual C++ and C#. However, some day I was asked if actionscript was what I could do. I puzzled. I saw flash banners everywhere in the web, and it was quite interesting for me to enter the world of Macromedia Flash. Yeah, my first Flash experience was with Macromedia Flash MX 2004, I believe Adobe was just thinking about Macromedia acquisition then. As usual it’s really a shame for me now, when I’m looking at the code I wrote that time :) That’s when I wrote Tips for beginner actionscript developer

So here is my path:

VC++ -> C# -> Flash MX and AS -> Flash 8 and AS2 - Flex and AS3

What’s yours?

ActionScript 3, SharedObject crashing Flash CS IDE

Recently I met a problem when using SharedObjects caused Flash CS IDE simply to crash with an error.

I looked through the web and found not that much about the problem, however it still continued to cease working.

I my code I was creating several different SharedObjects, and connected them to different local data.

You see, here is the sample actionscript code from Flash Help Content: Continue reading ‘ActionScript 3, SharedObject crashing Flash CS IDE’

Tips For Beginner Flash/Actionscript Developer

Are you leaning to ActionScript programming?

Do you need to write a bit more than just gotoAndPlay() and gotoAndStop()?
Or finally would like to try to make some animations via ActionScript and not in timeline?

Then please consider the following advices!

There are tips for ActionScript, though they should be interesting to AS2 and AS3 guys too.

1. Separate your code.

2. Order your objects in the library.

3. Have a naming standard.

4. Do reference the objects appropriately.

5. Always have the only one mainframe.

Continue reading ‘Tips For Beginner Flash/Actionscript Developer’





Page 5 of 6« First...«23456»