Ever wonder how to make a quick glass button using Illustrator? Click on my button below to go to Bittbox to learn how. It’s helpful and easy.
Popularity: 7% [?]
myContainer.loadMovie("myExternalMovie.swf");
or
this._parent.loadMovie("home.swf")
}
//load into a container and resize the file.
//it doesn't work with levels.
stop();
// ActionScript 2.0
var mcl:MovieClipLoader = new MovieClipLoader();
// you first create a MovieClipLoader object
var picListener:Object = new Object();
// and a listener to control the loading...
mcl.addListener(picListener);
// connect the listener to the mcl...
mcl.loadClip("cwid.swf", empty_mc);
// parameter 1: file to be loaded
// parameter 2: the mc
picListener.onLoadInit = function(mc:MovieClip) {
/* mc here represents the movie clip in which we're
loading the content, and onLoadInit event handler
executes as soon as the file is loaded.
the important thing in here is that you need the
data be loaded totally before processing the mc.
*/
mc._width = 500;
mc._height = 355;
};
Popularity: 39% [?]
Make anything a button in as3, just give it an instance name.
//AS3 button code
//btWhatever is the instance name of the the images that I want to make a button
btWhatever.addEventListener(MouseEvent.CLICK,onMouseClick);
// if you want a hand cursor
btWhatever.buttonMode = true;
btWhatever.useHandCursor = true;
function onMouseClick(e:MouseEvent):void
{
var request:URLRequest = new URLRequest(“Graphicmuse.com”);
navigateToURL(request, “_blank”);
}
Popularity: 36% [?]
This is one of my favorite pieces of code, and it get used often.
Frame one of your movie
stop();
var millis:Number=3000;
var Tim:Timer = new Timer(millis, 1);
Tim.addEventListener(TimerEvent.TIMER, playit);
function playit(e:TimerEvent):void {
play();
}
Tim.start();
Whenever you need to pause you movie add the following code to your actions layer at the exact frame where you want your movie to pause.
stop();
millis=3000;
Tim.start();
And if that wasn’t easy enough, I provided a working fla. Have fun.
Popularity: 28% [?]
Add a keyframe to the position in your movie where you’d like the timeline to pause. Any layer will do, but if you like to be organized, create a dedicated scripts layer. Click into this keyframe and paste the following ActionScript.
stop();
var interval:Number = setInterval(
function():Void {
play();
clearInterval(interval);
},
2000
);
Popularity: 100% [?]
I use this code over and over, and always have to look for it to make sure I am entering it correctly.
import mx.transitions.Tween;
import mx.transitions.easing.*;
new Tween(mc_name, "_alpha", Strong.easeIn, 100, 0, 3, true);
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
var myTweenName:Tween = new Tween(mc_name, "alpha", Strong.easeOut, 0, 100, 5, true);
Remember to change myTweenName if you use this more than once in your movie.
the only thing you need to remember to do is name your movie clip and then change it in the mc_name. Make sure they match.
Popularity: 32% [?]