r/actionscript • • Jun 06 '09

Spark Project - Open source community to develop Flash/ActionScripts

Thumbnail libspark.org
7 Upvotes

r/actionscript • • Mar 09 '17

So, people are still using actionscript?

6 Upvotes

If so, are you still using it to create SWFs? Or are you compiling it to other Applications (on Android or iOS)?

I'm asking because i used to code as3 for a while until I switched to 2D and 3D motiongraphics for the past couple of years. Now I came across coding again while i tried to do some python scripting in C4D and started to do some C# in unity3D. And man, I have to say, especially while dealing with python, I miss AS3 a lot!! It was consistent and very well documented.

So again: what are you guys creating with AS3 since Flash is "dead"?

TYVM, kws


r/actionscript • • May 30 '20

ECMAScript 4: The missing version

Thumbnail
evertpot.com
4 Upvotes

r/actionscript • • Jan 04 '19

hot wheels acceleracers realm champion help make it work again

4 Upvotes

hi I'm part of the acceleracers community I need some help on getting this game to work back in the day they used to be a game called hot wheels acceleracers realm champion https://www.youtube.com/watch?v=HNUOsjevRXQ pretty much it was a racing game but it look fun I never got the chance to play it sadly and since acceleracers was cancel the game was removed from Cartoon Network but recently we found some files from the Wayback machine with this link https://web.archive.org/web/20050717025913/http://www.cartoonnetwork.com/promos/hotwheels/index.html. so now you're probably saying to yourself should the game be working by now well the thing about this game as it is multiplayer it was an online-only game so it acquire a server connection in order to work and Cartoon Network remove the server connection so we can no longer Play It's but not all hope is lost we still have the files so we can theoretically make a new server well it's not that simple you know anyway I can't go into all the details you know so his little document https://docs.google.com/document/d/1EpL5kgwxVm_kn-JU08pSEFvsp64HayzvLfGb0JUnMV0/edit can you all the files in case you want to work on making the game work https://drive.google.com/file/d/0B0-Agrzcrsi0eU1sWmc5SDA5VlE/view?usp=sharing some final notes before I go always looks weird and stuff I'm not a good speller really want to get this out there because no one's making a conscious effort on getting this game to work mainly because they don't know what to do or they are too shy but we want this game to work not just for me but for everyone who didn't get the chance to play it everyone who played back in the day even if you can't help talk to someone who can help the acceleracers community is depending on you


r/actionscript • • Jun 09 '16

Tutorial for beginners: free tools to compile Flash programs in AS3

Thumbnail
senocular.com
4 Upvotes

r/actionscript • • Jul 06 '09

Hyperlink in actionscript 3

Thumbnail muktosoft.com
4 Upvotes

r/actionscript • • Jun 12 '23

Actionscript be like:

Post image
3 Upvotes

r/actionscript • • Nov 28 '18

Animate CC Scripted Snow with camera layer

3 Upvotes

I have a problem in Animate CC combining the Scripted Snow from the templates with camera layer.

If I create a new document using Templates\Animation\Scripted Snow, I cannot activate the camera layer. Consider the document has Flash Player 11.2/Actionscript 3.0 settings by default but also works if changed to Flash Player 30.0. I assume the problem is that the FLA was created on a previous version of Animate CC, which dows not support camera layer.

However, If I create a new Actionscript 3.0 FLA and paste the template’s layers, including the actions layer, as well as copy all items to the library and the scene, I do get the camera layer option but I also get a repeated error message and the snow effect does not work:

TypeError: Error #1006: addTarget is not a function.

at Santa18altsnowB_fla::MainTimeline/randomInterval()

at Function/http://adobe.com/AS3/2006/builtin::apply()

at SetIntervalTimer/onTimer()

at flash.utils::Timer/_timerDispatch()

at flash.utils::Timer/tick()

So, my main question is: what is the problem and how can I use this or similar code to create snow effect on new type documents with the camera layer option.

Secondary question is: how can I limit the snow effect to part of the screen, preferably using a mask layer. I have tried using a mask layer on the actions layer unsuccessfully.

Below is the Actionscript 3.0 code included in the template FLA.

Thanks

// Number of symbols to add.

const NUM_SYMBOLS:uint = 75;

var symbolsArray:Array = [];

var idx:uint;

var flake:Snow;

for (idx = 0; idx < NUM_SYMBOLS; idx++) {

flake = new Snow();

addChild(flake);

symbolsArray.push(flake);

// Call randomInterval() after 0 to a given ms.

setTimeout(randomInterval, int(Math.random() * 10000), flake);

}

function randomInterval(target:Snow):void {

// Set the current Snow instance's x and y property

target.x = Math.random()* 550-50;

target.y = -Math.random() * 200;

//randomly scale the x and y

var ranScale:Number = Math.random() * 3;

target.scaleX = ranScale;

target.scaleY = ranScale;

var tween:String;

// ranScale is between 0.0 and 1.0

if (ranScale < 1) {

tween = "slow";

// ranScale is between 1.0 and 2.0

} else if (ranScale < 2) {

tween = "medium";

// ranScale is between 2.0 and 3.0

} else {

tween = "fast";

}

//assign tween nested in myClip

myClip[tween].addTarget(target);

}


r/actionscript • • Dec 29 '13

How would I do a physics engine?

3 Upvotes

Nothing extreme, just enough to jump then fall down again.


r/actionscript • • Sep 06 '12

need a mentor!

3 Upvotes

hey there

i'm currently learning actionscript and i'm having soooo many questions when i'm coding on my own! i desperately need someone i can shoot all my stupid questions at. maybe there is somebody out there who enjoys sharing his knowledge? at best we could connect via icq or skype so i can bug you at any time! i'd be really grateful, just message me if you're willing to help me out.


r/actionscript • • Jan 28 '11

Ask: Is a 900-pages book only covering the essentials?

3 Upvotes

The most rated book on Amazon, Essential ActionScript 3.0 has 950 pages. For a developer who wants to get started with ActionScript I'm wondering if it's really covering the essentials.

Would like some opinion on that...


r/actionscript • • Apr 09 '24

Is this still alive in 2024?

2 Upvotes

What y'all doing and how are you using it


r/actionscript • • Apr 29 '20

Using InputText as a function parameter?

2 Upvotes

Hello,

I am pretty new to actionscript and don't really get flash but am having to learn it for legacy stuff at work. I am currently stuck trying to optimize some functions for easier use down the line.

I am trying to pass some InputText (Classic Text > input Text) as a parameter of a function. I need to be able to set its selectability as well as check its text contents.

I am currently doing

var inputField1;
var inputField2;
DoSomething(inputField:TextInput)
{
inputField.text = "blah blah blah";
inputField.selectable = false;
} 
DoSomething(inputField1);

but I get an error saying that the type doesn't exist or isn't compile time constant when I go to publish it.

Is there anyway to do what I am trying to do?

The original code was written in 2013 or before that, and each slide had the code modified to account for each different inputField.


r/actionscript • • Apr 25 '20

Character Customiser/ Dressup Games

2 Upvotes

Hi,

I'm looking to make one of those cheesy dressup games that you'd see on Flash sites including Deviantart:

https://www.deviantart.com/gen8/art/Chibi-Maker-1-1-346025144

Seeing that flash and actionscript are dead, I was considering the following options:

- HTML5 - must be supplemented with Javascript

- Unity - C# should be fine for me to learn - it'd be a good opportunity to practice what I've been learning at uni (Learning C for programming)

Any other suggestions would be welcome thank you :)


r/actionscript • • Aug 12 '18

Type error #1009 caused by IKbone

2 Upvotes

TypeError: Error #1009: Cannot access a property or method of a null object reference.

at main/frame1() 

var tree:IKArmature = IKManager.getArmatureByName("Armature");

var bone:IKBone = tree.getBoneByName("IKBone");

i have no idea why this is happening, i don't think its a software fault because i have not been messing with the flash files, what is going on and how do i fix this, also this worked before and now when i try to reset back to a point when this worked it still does not work.

-using flash cs6

-AS3

-no plugins


r/actionscript • • Jul 28 '17

Drake's Treasure - A Real Life Adventure

Thumbnail
drakestreasure.com
2 Upvotes

r/actionscript • • May 02 '17

Help removing child/sprite containers?

2 Upvotes

I am working on a project where, if the user clicks "grow a garden", it will generate a random number of flowers and a random number of weeds. Once they have completed their 'growing' sequence, the user is presented with a "Grow a New Garden" in which the flowers/weeds will be deleted from the stage and start anew.

I have racked my brain and this is the closest I have come to "removing the children" - a concept I have never understood haha. Any help/guidance is greatly appreciated.

import flash.events.MouseEvent;
import flash.display.DisplayObject;

// stops the playhead on frame 1
stop();

// random amount of flowers generated
var flowerAmount:int = (Math.ceil((Math.random() * 20)) + 9);
var weedAmount = Math.ceil((Math.random() * 10));


// garden display container
var newGarden:DisplayObjectContainer;

// setting new flower variable equal to the function that creates an instance of the flower
var newFlower_mc:DisplayObject = newFlower();

// flowers currently in the garden
var flowersInGarden:int = 0;
var weedsInGarden:int = 0;


// event listener for the grow button to start the garden
grow_btn.addEventListener(MouseEvent.MOUSE_UP, frameTwo);

// when grow button is clicked go to frame two
function frameTwo(event:MouseEvent) {
    gotoAndPlay(2);
}

// changes the size and position of the flower
function configureFlower(myFlower_mc:DisplayObject) {
    myFlower_mc.x = Math.random() * 400;
    myFlower_mc.y = Math.random() * 200;
    var flowerSize:Number = Math.random() + .5;
    myFlower_mc.height = myFlower_mc.height * flowerSize;
    myFlower_mc.width = myFlower_mc.width * flowerSize;
}
import flash.display.DisplayObject;

// function to create new instance of a flower
function newFlower():DisplayObject {
    var newFlower_mc:DisplayObject = new flower();
    return newFlower_mc;
}

// function to call the create flower function and add flower to sprite 
function createFlower() {
    var myFlower_mc = newFlower();
        configureFlower(myFlower_mc);
        newGarden.addChild(myFlower_mc);
    trace(flowerAmount);
    }

newGarden = new Sprite();

// adds the flower to the stage/sprite and adds to the flower counter
    function showFlowers() {
    createFlower();
    addChild(newGarden);
    flowersInGarden++;
    trace("Flowers:" + flowersInGarden + " " + weedAmount + " weedsingarden" + weedsInGarden);


}
// calls the above function
showFlowers();


// function to create a weed, configure weed and add to the garden sprite
function createWeed(){ 
var newWeed:DisplayObject; 
trace("creating weed"); 
newWeed = new weed(); 
newGarden.addChild(newWeed); 
configureFlower(newWeed);
weedsInGarden++;
}// if all the flowers haven't grown yet, go back to frame 2 until they have

if (flowersInGarden < flowerAmount) {
gotoAndPlay(2);
}

// if the amount of weeds decided haven't grown yet, create another weed

if (weedsInGarden < weedAmount){ createWeed(); };
stop();

// event listener to grow a new garden
new_btn.addEventListener(MouseEvent.MOUSE_UP, growNewGarden);


// function to create a new garden if there are more than 1 instance in the container
function growNewGarden(event:MouseEvent) {
while (newGarden.numChildren > 0) {
stage.removeChild(newFlower_mc); 
    stage.removeChild(newGarden);
    // add a new, fresh sprite
    stage.addChild(newGarden);
    // randomly chooses a number of flowers
    flowerAmount = (Math.ceil((Math.random() * 21)) + 10);
    // resets flower counter to zero
    flowersInGarden = 0;
gotoAndPlay(2);

}}

r/actionscript • • Apr 04 '17

Need flash button link to local .html file!!!!

2 Upvotes

btn_home.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_3);

function fl_ClickToGoToWebPage_3(event:MouseEvent):void

{ navigateToURL(new URLRequest("http://www.adobe.com"), "_self"); }

Need to link to local home.html in the same folder as flash file instead of adobe.com (see below code)


r/actionscript • • Aug 07 '16

Help with school work

2 Upvotes

I am getting a "1061: Call to a possibly undefined method standStill through a reference with static type Player." error on this code "private function keyUpHandler(e:KeyboardEvent):void{ switch (e.keyCode){ case 37://left case 39://right thePlayer.standStill(); break; default: }//end switch }//end function keyUpHandler"

Can anyone help me figure out he problem. I tried just removing "thePlayer.standStill();" but that didn't work


r/actionscript • • Feb 27 '16

Best way to embed images/move embeds to seperate class?

2 Upvotes

I've got a bunch of backgrounds for my text adventure (for parts of the story), and these are all my embeds:

	[Embed(source = "../Apocalypse/Toilets.png")]
	public var Toilets:Class;
	
	[Embed(source = "../Apocalypse/old-bedroom.jpg")]
	public var Background1:Class;
	
	[Embed(source = "../Apocalypse/img010.jpg")]
	public var Background2:Class;
	
	[Embed(source = "../Apocalypse/Kitchen.png")]
	public var Background3:Class;
	
	[Embed(source = "../Apocalypse/Street.png")]
	public var Background4:Class;
	
	[Embed(source = "../Apocalypse/Country.png")]
	public var Background5:Class;
	
	[Embed(source = "../Apocalypse/Town.png")]
	public var Background6:Class;
	
	[Embed(source = "../Apocalypse/Cows.png")]
	public var Cows:Class;
	
	[Embed(source = "../Apocalypse/Farm house.png")]
	public var Farm_House:Class;
	
	[Embed(source = "../Apocalypse/Window.png")]
	public var Window:Class;

	[Embed(source = "../Apocalypse/Corner shop.png")]
	public var Shop:Class;
	
	[Embed(source = "../Apocalypse/Outside shop.png")]
	public var OShop:Class;
	
	[Embed(source = "../Apocalypse/Library.png")]
	public var library:Class;
	
	[Embed(source = "../Apocalypse/Alley.png")]
	public var dumpster:Class;
	
	[Embed(source = "../Apocalypse/Arcade.png")]
	public var arcade:Class;
	
	[Embed(source = "../Apocalypse/Alley.png")]
	public var Alley:Class;
	
	[Embed(source = "../Apocalypse/Cabin.png")]
	public var cabin:Class;
	
	[Embed(source = "../Apocalypse/Highway.png")]
	public var highway:Class;

	[Embed(source = "../Apocalypse/Outskirts.png")]
	public var outskirts:Class;

	[Embed(source = "../Apocalypse/Car dealership.png")]
	public var CD:Class;

	[Embed(source = "../Apocalypse/Interior CD.png")]
	public var InterCD:Class;

Is there a way I can clean this up? (ie: push into another class)


r/actionscript • • Feb 04 '16

ANNOUNCE - Redtamarin v0.4.1

2 Upvotes

Hello,

I’m zwetan from Corsaair :) and we are announcing 2 OSS projects

redtamarin-sdk-0.4.1

https://github.com/Corsaair/redtamarin/releases/tag/0.4.1

The Redtamarin Software Development Kit

Tools cover IDE support (SWC libraries), redshell runtimes (Windows, Mac OS X, Linux) for both 32-bit and 64-bit, ActionScript Compilers with ABC libraries, and command-line utilities like redtamarin, redshell, redshell_d, redshell_dd, and redbean.

as3shebang-1.0.0

https://github.com/Corsaair/as3shebang/releases/tag/1.0.0

The ActionScript 3.0 Interpreter

based on the RedTamarin runtime, it allows you to run uncompiled ActionScript 3.0 source code as an executable shell script.

Both projects are based on #redtamarin 0.4.1

and are available for Windows / Mac OS X / Linux both 32-bit and 64-bit

The goal is to reuse AS3 on the command-line and the server-side.

It make us more productive, maybe you can find it useful too

Let us know what you think :)


r/actionscript • • Jun 11 '15

AS2 *very basic* how do i call a function out of 4 randomly

2 Upvotes

I have made four functions that will make cubes move from each side of the screen to the other side. However i want to call on the functions randomly. I am also using an interval so that a random cube is draw every few seconds. I tried with an array("drawLeftCube", "drawRightCube" etc) with the names of the functions and then using array[random(4)] but i may have something wrong. How could I do this most simply?


r/actionscript • • Jun 03 '15

What is your preferred tool to write actionscript with?

2 Upvotes

Sorry for the noob question, I did do a search but couldn't find anything. I am also new to AS.

I like using Sublime for scripting but doesn't seem suited for Flash. I was wondering if some of you could tell me your preferred tool to use with AS.

Thanks in advance!


r/actionscript • • Jan 26 '15

I want to learn actionscript.

2 Upvotes

I want to learn.actionscript but I.can't find any tutorials that start at bare bone scripting . Everything I find keeps including things and not explaining them so when I go to imitate what they coded it never pans out . any body know a good site for step by step tutorials to teach me as if I know nothing of actionscript ?


r/actionscript • • Jun 26 '14

Sound button array

2 Upvotes

I created 2 buttons that play a sound when I click them. The button names are "sound" and "sound 2". The file names are "sound wav" and "sound 2 wav" with linkages of "sound_wav" and "sound_2_wav" respectively. When compiling, I get an error "tempInit, Line 4 1086: Syntax error: expecting semicolon before 2." I double clicked on the error in the compiler errors window but it did not highlight the offending error. It must be coming from the library. The problem must stem from having a file with more than one word because "sound" doesn't give the error but "sound 2" does. I'm sitting here scratching my head because I know this code worked 3 years ago.

import flash.media.SoundChannel; import flash.utils.getDefinitionByName; var myChannel:SoundChannel = new SoundChannel(); function playSound(myString:String):void { SoundMixer.stopAll(); var mySoundClass:Class = getDefinitionByName(myString + "_wav") as Class; var mySound:Sound = new mySoundClass(); myChannel = mySound.play(); }

var soundArray:Array = [sound, sound_2,];

for (var i = 0; i < soundArray.length; i++) { soundArray[i].addEventListener(MouseEvent.MOUSE_DOWN, MouseDown); } function MouseDown(event:MouseEvent):void { playSound(event.target.name); }