Archive for category ACTIONSCRIPT 2.0

Full Browser Flash Website

I was looking through my Flash files the other day and found this. It is a full page flash website, meaning that the flash fills the entire page regardless of the size of the user’s browser. It is written in AS2 and isnt coded the best as I wrote it awhile ago but is a great introduction to using tween classes. (This one uses MC Tween).

Demo

  Full browser flash website in as2 (5.5 MiB, 196 hits)

2 Comments

MovieClipLoaderClass – AS2

I have been reading a lot of questions about how to properly load movies in projects using actionscript2. This is how I do it:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
    var my_mcl:MovieClipLoader = new MovieClipLoader(); //Used to load the image
 
    button1_mc.onPress = function() {
    my_mcl.loadClip(movie1.swf, container_mc); //loading a movie into a container movie clip (just an empty mc on the stage)
    };
 
    button2_mc.onPress = function() {
    my_mcl.loadClip(movie2.swf, container_mc); //loading a movie into a container movie clip (just an empty mc on the stage)
    };
 
    var mclListener:Object = new Object();
    my_mcl.addListener(mclListener);
 
    //the three listeners below are optional
    mclListener.onLoadStart = function(container_mc:MovieClip) {
    //The listener tells this function that downloading the image has begun and to perform whatever code you put here
    };
    mclListener.onLoadError = function(container_mc:MovieClip, errorCode:String, httpStatus:Number) {
    // this function fires if there is an error in loading the movie
    trace(”loadListener.onLoadError());
    trace(”==========================”);
    trace(”errorCode: ” + errorCode);
    trace(”httpStatus: ” + httpStatus);
    }
    mclListener.onLoadComplete = function(container_mc:MovieClip) {
    //The listener tells this function that downloading the image has completed and to play whatever code is here
    }

No Comments