Search:
Type: Posts; User: dawsonk
Search :
Search took 0.09 seconds; generated 13 minute(s) ago.
var myXML:XML;
var stX:Number = stage.stageWidth;
var speedX:int = 2;
var gap:int = 20;
var index:int = 0;
var len:int;
var myLoader:URLLoader = new URLLoader();
myLoader.load(new...
var my_date:Date = new Date();
var currentHour:Number = my_date.getHours() + (my_date.getMinutes() / 60);
trace(currentHour)
For Escape the room tutorial, take a look at
http://www.flashclassroom.com/cms/flashclassroom/index.php?vsite=1&Area=327&SubSectionOf=265
Your code works, so how are you creating your object?
var obj:Object = new Object();
obj.Model = 'SomeModelNumber';
obj.EID = 1234;
obj.ItemID = 5;
obj.Size = null;
obj.iLength = 34;
my_mc is the instance name of the movie clip you want to play
keyListener = new Object();
keyListener.onKeyDown = function() {
if (Key.getCode() == Key.SPACE) {
if...
Maybe this is something you can adapt...
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
public...
stop();
this.onEnterFrame = function() {
var amount= this.getBytesLoaded() / this.getBytesTotal()*100;
_root.preLoader.preLoaderFill._xscale = amount;
...
Can you be more specific about what you are trying to do?
Target.onMouseDown = function() {
Target.onEnterFrame = function() {
Target._rotation++;
upDate();
};
onMouseUp = function () {
...
Timing issue...
Code on clip
var myText:TextField = new TextField();
myText.name = "myText";
addChild(myText);
myText.text = "old text";
dispatchEvent(new Event (Event.INIT));
var spray:Boolean = false;
var count:Boolean = false;
var placement:Boolean = false;
count_mc.addEventListener(MouseEvent.CLICK, doClick, false, 0, true);...
spindle.gotoAndStop(1);
paper1.onPress = moveMe;
paper2.onPress = moveMe;
paper3.onPress = moveMe;
function moveMe() {
if (this.orgX == undefined) {
this.orgX =...
import flash.utils.getDefinitionByName;
var len:uint = 10;
for (var i:uint=1; i<=len; i++) {
var s:String = "s" + i;
var cr:Class = getDefinitionByName(s) as Class;
...
Make a movie clip and place it in the library, with a Linkage name of "Dot".
On the main timeline, in the actions layer, add the following code.
var len = slides_mc.totalFrames;
var offX =...
import fl.transitions.*;
import fl.transitions.easing.*;
import flash.events.Event;
var myTween:Tween = new Tween(PopUp_mc,"y",Strong.easeOut,PopUp_mc.y,300,1,true);
var lastFrame:int = -1;...
spindle.gotoAndStop(1);
paper1.onPress = moveMe;
paper2.onPress = moveMe;
paper3.onPress = moveMe;
function moveMe() {
this.startDrag();
...
_root.spinner.onEnterFrame = function() {
if (running == true) {
this._rotation -= speed;
if (speed <= 10) {
...
var bigstar:thestar;
var midstar:thestar;
var smallstar:thestar;
var stars:Array = [];
var i:int = 25;
while (i-- > 0) {
bigstar=new thestar();
bigstar.width = 18;
...
Using distance instead of hit test...
function doUpDate() {
if (Key.isDown(Key.LEFT)) {
hero._x -= hero.power;
} else if (Key.isDown(Key.RIGHT)) {
...
Maybe this is something you can adapt...
Replaced the graphics with blank images in the fla to make the file smaller, so you will need to re-attach your graphics in the library before you try to run...
Removed all codes from clips, placed code below in first frame main timeline
Removed variable from textfield and gave it an instance name of 'txt'.
Removed 'add bomb' button, added code for...
Maybe you can adapt this...
var num = 0;
var sideNavListener:Object = new Object();
var sideNavLoader:MovieClipLoader = new MovieClipLoader();
sideNavLoader.addListener(sideNavListener);...
When speed exceeds the width of the wall the clip moves outside...
Maybe you can adapt this...
onClipEvent (load) {
power = 1;
yspeed = 0;
xspeed = 0;
...
Maybe you can adapt this...
// bottom layer - 'linesMC', empty movie clip at 0,0
// middle layer - dot movie clips, put instance names in dots array below
// top layer - 'drawMC', empty...
package {
import flash.display.*;
import flash.events.*;
import MMES.Common;
public class Main extends Sprite {
public function Main() {
...
Click Here to Expand Forum to Full Width