Posts RSS Comments RSS 75 Posts and 125 Comments till now

Archive for the 'actionscript 3' Category

HTML and CSS in Flash

The slides for my talk on HTML and CSS in Flash have now been uploaded to my website http://nichmekof.com/a-sfug/cssinflash/

I updated the slides slightly because I missed out talking about the ability to use CSS classes.

I have also done up an example file which you can download on how to use html and css in flash

Ed

Loading in AS3

Hello all,

I have uploaded the sample files I have shown in the 3rd A-SFUG meeting. I hope you people find it useful and enjoy the session!

asfug-as3loading

Cheerio!

Dan Murong

Make a button from a MovieClip - Tips & Tricks

Movie Clip ButtonIn our first User Group meeting I showed a tip about creating the up, over and down states of a button using a movie clip. I thought that it was time that I should put it up here as a reference for everyone.

An easy way of creating a button from a MovieClip is to give the names of the frames with the different states of the button “_up“, “_over” and “_down“.

Add a stop(); frame on frame 1 of the movie clip. Then out on the main timeline, open the actions panel and write: myButton_btn.buttonMode = true;

Just change myButton_btn to the instance name of your movieclip.

Now test the movie and roll over the button and It will now go to the over state. Press down on it and it will go to the down state.

So you do not need to write the code for on roll over, on mouse down and on roll out. Flash will automatically detect what you are wanting to do and do it for you.

Now you may be asking “Why should I do it this way? Why can’t I just make it as a regular button?” Well you can still do it that way if you like, however the benefit of doing it this way is that a movie clip is more light weight then a button. This means that flash can run a bit faster.

Update: Here are the files for this example buttonmovieclip.zip

Cheers,
Ed

An Eye Trick For Low Resolution Videos

Drawing some lines on top of a video makes it not so pixelated even if it is scaled up quite a lot. The technique was first seen on group94’s website.

video effects

Here’s some experiments with it. It’s not exactly the same as group94’s method but it still looks quite interesting. Download and read the comments in the source file to find out more.

Source
Demo

Go NOOP with ActionScript 3!

Finding classes and inheritances too geeky or scary? Go none object-oriented programming (NOOP) with AS3! There’s nothing wrong writing ActionScript 3 without any Object-oriented Programming (OOP) practice. What worked last time, timeline based coding with gotoAndPlay, gotoAndStop and tweened animations, still works with Flash CS3 in AS3 and it will work with Flash CS4 in the future.

There’s a vibe that ActionScript 3 is not for designers or non-serious Flashers. The hype is brought up by the improvement of AS3 compared to AS2. Programmers are very happy with AS3 because they can finally do some serious OOP and practices Design Patterns methodologies. Therefore, classes and packages appear much more frequent in tutorials and examples.

For designers, what excites them is visuals, not ease of maintenance or re-usability, which is the whole point of OOP. It’s hard to sell the idea how wonderful AS3 is with lines and lines of OOP codes which doesn’t really move anything around. OOP is great but not attractive to beginners.

This new category “NOOP” focuses on writing ActionScript 3 examples without any classes or OOP and it tries to bring back the painful but sweet programming experiences to designers.

All about preloader Part IV - Preloader in AS3

Based on Part III’s codes, converting AS2 preloaders into AS3 is pretty simple.

Continue Reading »

Introducing PureMVC

pure mvcFor many Flash Developers out there, you have probably heard about Design Patterns, one of which would definitely be the popular Model View Controller [MVC] architectural pattern.

For those that are not familiar with the pattern, suffice to say that this pattern, prescribes a way to separate, the data, business logic, and presentation layer, of an application/microsite in an organized manner.
Continue Reading »

AS3 Migration

For those of you who don’t know this yet, if you’re migrating from AS2.0 to AS3.0 or if you’re constantly using AS3.0 to develop your projects, this is a very handy ActionScript 3.0 Migration PDF reference. It clearly shows the difference between AS2.0 and AS3.0 and tells you what to import when using certain objects, it also tells you what objects has been removed in AS3.0. Certainly good to have it with you when developing AS3.0 projects or if you’re starting to learn AS3.0. There are also other cheatsheets for other platforms like AIR and Papervision which can be found here.

Link: ActionScript Physics Engines List

minidxer kindly collected all physics engines available.

Fullscreen Flash is so COOL! BUT…

There are some security restrictions. The full article can be found in Adobe’s website. Two restrictions are very important:

  1. “Users cannot enter text in text input fields while in full-screen mode. All keyboard input and key-related ActionScript is disabled while in full-screen mode, with the exception of the keyboard shortcuts that take the viewer out of full-screen mode. ”

    This restriction keeps most website/application away from fullscreen mode. Almost all websites and applications need keyboard interaction. Bringing the user out of fullscreen mode to fill up a form is not user-friendly.

    It was stated in Square Factor’s blog that the reason for disabling input is to avoid phishing activities. “…attacker could mimic the look of the operating system / browser to force user to enter sensitive data, such as passwords or serial numbers.”

  2. “The ActionScript that initiates full-screen mode can be called only in response to a mouse click or keypress. If it is called in other situations, it will be ignored (in ActionScript 2.0) or throw an exception (in ActionScript 3.0).”

Next »