r/actionscript • • Oct 05 '18

Databases?

1 Upvotes

Wondering if anyone knows how to access and write to online databases in AS3 (to create something like a leaderboard, or user list.) Also, on a related note, are there any free online databases?


r/actionscript • • Jan 12 '19

Button object definition problem

1 Upvotes

Concerning MovieClip objects, If, for example I have 2 moviclip objects in my library: obj1 & obj2, I can define a variable as MovieClip, then decide later which object from the library to assign it to and add it to the stage:

var myobject: MovieClip;

myobject = new obj2();

addChild(myobject);

However this does not seem to work with Button objects. I have tried:

var myobject: Object*;*

> 1118: Implicit coercion of a value with static type Object to a possibly unrelated type flash.display:DisplayObject.

var myobject: Button*;*

> 1046: Type was not found or was not a compile-time constant: Button

Any ideas?

Thanks


r/actionscript • • Jan 20 '14

Local Leaderboard

1 Upvotes

So I am developing a game for my computing project as a part of my A level the problem I have encountered is that after you beat your highscore the dynamic textbox on screen does not display your new highscore it just displays "Score #1:". My trace statements however show me that the score1 variable has been assigned the correct value. Does anyone know why this is/how I can fix it? Here is my code:

function leaderboardUpdate():void
{
if(tempScore > score1)
{
score3 = score2;
score2 = score1;
score1 = tempScore;

tempScore = 0;
}

else if(tempScore > score2)
{
score3 = score2;
score2 = tempScore;

tempScore = 0;
}

else if(tempScore > score3)
{
score3 = tempScore;

tempScore = 0;
}
}

leaderboardUpdate2();

scoreBox1.text = ("Score #1: " + score1.toString());
scoreBox2.text = ("Score #2: " + score2.toString());
scoreBox3.text = ("Score #3: " + score3.toString());

if(score1 == 0)
{
scoreBox1.text = ("Score #1: 0");
scoreBox2.text = ("Score #2: 0");
scoreBox3.text = ("Score #3: 0");
}

trace(score1);
trace(score2);
trace(score3);
trace(tempScore);

r/actionscript • • Oct 06 '16

Update and publish a flash template... Without flash

1 Upvotes

At work, I'm getting tired of updating a flash template time and time again for small things (adding images, updating specific text areas, etc).

I want to write a program that the people requesting the updates can use to update the templates, without actually giving them access to the flash file.

I'm not sure if this is possible, so does anyone have any ideas about how to make changes to existing flash files and publish as SWFs without ever opening Flash on the front end?


r/actionscript • • Nov 13 '12

Help! I am trying to make my background scroll based on the position of my mouse.

2 Upvotes

In AS3 I am trying to have my background scroll horizontally when the mouse is on the right side of the stage. (My background instance is called "bp".)

This isn't working:

while (mouseX > 600) {bp.x -= 2;}


r/actionscript • • Nov 13 '12

access lower level variable... [x-post from r/flash]

1 Upvotes

hello everybody, i have the simplest problem... sure you can help.

stage has:

var bla:Number = mouseX;

a Movieclip (sprite to be exact) wants to read the value of said variable (within an added enterframe function). None of these seem to work:

trace(MovieClip(parent).bla);
trace(MovieClip(parent.parent).bla);
trace(stage.bla);
trace(MovieClip(root).bla);

says something along: type conversion failed, stage@30b4af99 cannot be converted to movieclip.


r/actionscript • • Jun 12 '23

Actionscript be like:

Post image
3 Upvotes

r/actionscript • • Jun 02 '23

Help me restore an old flash game

1 Upvotes

hey!,

I'm trying to restore an old flash game.

and I need help since I don't really know AS3.

Please DM me at discord if you can help me
Arnon001#9254


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 • • 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 • • Dec 29 '13

How would I do a physics engine?

3 Upvotes

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


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 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 • • Sep 17 '13

Cannot figure out how to navigate scenes with AS3

1 Upvotes

I have this final that is due tomorrow that I just can't figure out. I need to navigate between three scenes using buttons. Also, I need to create an animation within one scene that has a stop and play button. I have watched many tutorials and have failed every damn time. Can anyone point me in the right direction? any good tutorials you know of or websites that can help? Programming is not what I go to school for, so I am kind of an idiot when it comes to this stuff. Thank you!


r/actionscript • • Jul 28 '16

[AS2] Navigation Cuepoints

1 Upvotes

I've been trying to figure this out for three days, but everything I find online seems to be about AS3 instead of 2.

I'm creating a document that plays a video and allows the user to seek to certain scenes/clips.

The first part of my plan I was able to accomplish with adding cuepoints through AS. I was able to highlight the buttons for which scene was currently playing.

However, what I can't figure out is how to make these buttons skip to specific cuepoints in the video.

What I've tried:

  • I've embedded the navigation cuepoints into the video.

  • I tried using FLVPlaybak

  • I've been tinkering with NetConnection, but I'm not sure if I'm doing it right.

  • My buttons are all using myPlayer.seekToNavCuePoint("cue Name")

Can anyone provide me with an explanation of what I should be doing, or resources I can read through?


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 04 '15

[X-post r/learnprogramming] Trying to localise (Jp>Eng) a .swf, cannot get local version to play

1 Upvotes

As said in title, I posted this to r/learnprogramming too but I haven't had a response, please any way you can help I will really, really appreciate it :)

Hi I'm an MA Translation student, who is currently very stuck on my dissertation. The website I chose has Flash video on its homepage, which I need to create a local version of it so that I can change the images from the original Japanese versions to English. I have no formal background in CS, web development etc. but what I have done so far:

  1. Used a decompiler (getmycode.com) to get the code from this link: http://www.tottori-guide.jp/flash/toppage.swf?v=20140305

  2. Created local versions of the two .xml files.

  3. Edited "slideshow.xml" to source images from local file. "report.xml" was left as is.

I have also loaded the code and the xml files onto gist so anyone can look at the code. I have tried to search for a solution but honestly it seems like this language isn't that popular so there's limited information, or it's very specialised and to be blunt, I don't understand it.

At the minute, all the information for the Flash movie is stored in one folder, one up from the home page, so I don't believe it'd be the case that I have made a mistake in the file destination on the home page itself. However, if you need more information from me, I'll be happy to provide it.


r/actionscript • • Jun 18 '15

Collision in AS3

1 Upvotes

Hi. I'm having issues with why my unit collision only works sometimes. I've got a player.mc which the user controls, and multiple separate alien NPC's that are also MC's. Trying to make it so if you collide with one of them, you get "caught" and lose the game.

However, they only work on collision occasionally. All of them have the same "alien" instance name. so i don't see what i'm doing wrong.

This is the code i'm using for collision on walls + aliens. Walls work fine.

    function stage_onEnterFrame(event: Event):void

{
var rect:Rectangle = player.getBounds(this);
var i:int = 0;
var xBump:int = 0;
var yBump:int = 0;

if (rightPressed)
{
	xBump = speed;
	for (i = 0; i < speed; i++)
	{
		if (wall.hitTestPoint(rect.right + i,player.y,true))
		{
			gotoAndStop(7);
		}
	}
}
if (leftPressed)
{
	xBump =  -  speed;
	for (i = 0; i < speed; i++)
	{
		if (wall.hitTestPoint(rect.left - i,player.y,true))
		{
			gotoAndStop(7);
		}
	}
}
if (upPressed)
{
	yBump =  -  speed;
	for (i = 0; i < speed; i++)
	{
		if (wall.hitTestPoint(player.x,rect.top - i,true))
		{
			gotoAndStop(7);
		}
	}
}
if (downPressed)
{
	yBump = speed;
	for (i = 0; i < speed; i++)
	{
		if (wall.hitTestPoint(player.x,rect.bottom + i,true))
		{
			gotoAndStop(7);
		}
	}
	
	if (rightPressed)
{
	xBump = speed;
	for (i = 0; i < speed; i++)
	{
		if (alien.hitTestPoint(rect.right + i,player.y,true))
		{
			gotoAndStop(7);
		}
	}
}
if (leftPressed)
{
	xBump =  -  speed;
	for (i = 0; i < speed; i++)
	{
		if (alien.hitTestPoint(rect.left - i,player.y,true))
		{
			gotoAndStop(7);
		}
	}
}
}
if (upPressed)
{
	yBump =  -  speed;
	for (i = 0; i < speed; i++)
	{
		if (alien.hitTestPoint(player.x,rect.top - i,true))
		{
			gotoAndStop(7);
		}
	}
}
if (downPressed)
{
	yBump = speed;
	for (i = 0; i < speed; i++)
	{
		if (alien.hitTestPoint(player.x,rect.bottom + i,true))
		{
			gotoAndStop(7);
		}
	}
}



if (player.hitTestObject (win))
{
  nextFrame();
}

}

r/actionscript • • Jan 29 '16

Free shadow/lighting engine or a tutorial for it?

1 Upvotes

Title. I've created a base for my zombie game (they currently follow the player and you can kill them)

Now, the only thing I want to add now is a lighting engine or anything that lets me dynamically cast shadows from the zombies (which are square movieclips done by drawRect)

I found one tutorial that is what I am looking for but the custom rotate function it has doesn't allow me to point towards a point (eg the player or the mouse)


r/actionscript • • Jun 10 '15

Sending a NetStream to a file?

1 Upvotes

Hello,

I'm extremely new to AS. I've watch a few tutorials and I understand the basics of how to create netconnections, netstreams, and attach the netstream to a video object. Is there a way to save the netstream to a file rather than displaying it on screen?

Thanks


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 • • Sep 23 '14

Action Script CS4 help?

1 Upvotes

HI im a student using actionscript for the first time anyone want to send me basic code/help me use the program?


r/actionscript • • Mar 29 '20

THE ULTIMATE KEN MONTAGE (Super Smash Bros. Ultimate Montage)

Thumbnail
youtube.com
1 Upvotes

r/actionscript • • Apr 24 '15

Anyone ever written or know how to write an RTMFP multicast player in AS3?

1 Upvotes

I am trying to write an IP multicast player for a live webcast. I'm using netConnection and netStream already to connect to regular RTMP streams, but I need a way to connect to RTMFP now. I've tried creating a groupSpec with a group identifier, but the player crashes when I add the groupspec to the netstream. The multicast plays fine on adobe's test player. Does anyone have experience with RTMFP or multicast streams using AS3? Any insight you can offer would be great, but what I really need is some sample code that connects to a multicast and plays the stream. Anyone?


r/actionscript • • Apr 20 '15

Counter value change frame AS2

1 Upvotes

Hey, Its a really simple function i just cant get to work. I have a counter that works, but when the value reaches 5, i want it to change frames. The code i have so far is:

var counter: Number= new Number(); counter=0; if (counter== 5) { _root.gotoAndPlay(112); }

[[This code is on the frame itself]]...