ActionScript 3.0 :: Starting To Fill Up Game Folder With .as Class Files?

Oct 26, 2010

I'm working on my RPG combat engine, and everything is coming along nicely, except I'm starting to fill up my game folder with .as class files, and I was thinking it's probably smart to rearrange it so I have a folder for characters/enemies, and one for levels etc etc.I'm kinda learning as I go here so thats why I didnt start out with a planned folder structure.nyway, I can't seem to understand the correct way to go about doing it.Example: I have three classes which extend a "Character" class. They are added to the stage by the "Arena" class, when the Arena object is added to the stage by the "Game_Master" class. All of my classes at this point start with just "package {". How do I put the character files in a folder called, say, "characters"? I've tried a bit, but I can't get it to work. I moved them to the folder, made them start with "package characters {" and tried to "import characters.*;" in eventually just about every class, when just importing them to the Game_Master and Arena didn't work.

View 3 Replies


Similar Posts:


Starting Animation - Button Links To Go To Web Folder

Sep 6, 2009

I have a flash movie with some buttons created through action script. Currently the button links are going inside the flash menu, starting an animation. I need them to go to web folder, but I don't know how to do it.

This is the part for the button action :
fm.flashmo_button.onRelease = function(){
_root.page = this._parent.item_no + 1;
_root.play();
};

It creates 8 buttons. I tried this:
fm.flashmo_button.onRelease = function(){
getURL ("[URL]", "_self");
getURL ("[URL]", "_self");
};

When I do this, publish and click on any button, it opens both links. How can I assign for each button, a link? Here's the whole code for the button generation and linking :
stop();
import mx.transitions.Tween;
import mx.transitions.easing.*;
flashmo_logo._visible = false;
flashmo_logo._y = 300;
menu_item_group.menu_item._visible = false;
[Code] .....

View 5 Replies

Flex :: Flash Loader Demands Library Files In Folder Other Than Folder Where Main Project File Is?

Jul 29, 2010

i have situation in which i have some library projects, say

"DataProcessors","Lib2"

, included in my lets say "MainProject" (a web project) placed on directory

"E:in-debugMainProject.swf"

, when i build the project it automatically place all the libs .swf in its "E:in-debug" folder, but when i debug or run the project it it gives loading error that

"E:DataProcessors.swf"

not found but i have those lib files on

"E:in-debugDataProcessors.swf"..

what could be the possible errors.

View 1 Replies

ActionScript 3.0 :: Organise A Game With Multiple Class Files?

Mar 6, 2010

I'm making the game Breakout as an AS3 application using OOP. I am getting very confused though. I know that objects should be only responsible for themselves. But this is where I get stuck, they need to communicate as some level to add and remove screens, and I am getting majorly confused as to what is going too far, when it could maybe achieved in a simpler more OOP way.

I've worked out the hierarchy of my classes, in terms of where they are being added (I think). Here it is roughly drawn out below. Have I got the order right based on OOP principles? Like, Introscreen will listen for play being pressed then call a method of the document class that will remove introscreen and then attach gamescreen. Is that right?

Another thing that puzzples me. It seems to me if I made a level and put the paddle and the ball in that, then arranged all the bricks in that level, that I'd be duplicating work (based on the fact I need paddle and ball for level 2 also). So it would be best if I could have gamescreen with paddle and the ball and then add level1/2/3 to display list which would therefore set up the appropriate brick placement. But then, wouldn't that mean that I couldn't do hittests because my level 1/2 or 3 wouldn't be a sibling to the bat and the ball, them residing as a sibling in the level's parent class?

[code]....

View 4 Replies

ActionScript 3.0 :: Import Class From Folder Outside Root Folder?

Sep 26, 2009

How do I import a class that resides outside the root folder of a fla file?

From root I should go back two folders to get the classes I want, which by the way is TweenMax. I don't want to copy these classes to every website's folder.

View 5 Replies

ActionScript 2.0 :: Starting And Stopping Audio Files?

Jan 10, 2007

I have 4 sets of 2 buttons (on and off):

Each set of buttons I want to trigger and stop a different audio file. (4 audio files in total)

I would like for the sound files to be saved within the .fla file.

I have done lots of searching but I still haven't been able to get this to work.

View 1 Replies

Starting/streaming/loading/playing Large SWF Video Files?

Jul 28, 2009

I have recently "inherited" several websites that feature 1 to 10 minute video animations in SWF formatOne of my challenges is to get these files to appear or play in a timely manner so that the viewer does not loss interest as it is loading. My questions will start with file size.reduce or minimize the size of published SWF files while still maintaining high quality video output? Second, how about this business of preloading.I don't really understand that term but my thinking is that if a large movie could be loading while another, shorter, movie is playing, or a graphic displaying, that this could be useful in my case. Lastly, how about streaming in general. Are there ways to optimally use a given download speed to efficiently stream SWF video?

View 5 Replies

Actionscript 3 :: Starting Class On Certain Frame?

Nov 11, 2011

I created an AS file and used it as a class, inside it I called buttons and slideshow images. After that I decided to create an intro by moving the timeline. My problem is that all the objects are displayed from the very first frame, is there a way to make the entire class start after certain frame? Code for reference:

[Code]...

View 1 Replies

ActionScript 2.0 :: Get Files From Folder?

Sep 29, 2006

I'm making a desktop application and I need to get all of the file from in certain folder. Is this possible in AS? IE, I need to get the name of and import every file in the folder C://documents and settings/my pics.

View 1 Replies

ActionScript 3.0 :: AIR - Extract Files To Folder?

Dec 29, 2010

What I want to do is to extract a zip file to a specific folder.I am using the code below that promts the user to choose which directory the zip should be extracted to and the extracts it succesfully.Now I would like define a fixed folder where the files should be axtracted to instead of letting the user decide.

Actionscript Code:
function extractZIP():void {  output.text = "extractZIP MANUAL"; zipOutput.browseForDirectory("Select Directory for extract"); 

[code].......

View 1 Replies

Flex :: Get A List Of Files In A Folder?

Dec 2, 2009

what I need to do is get a list of files in a folder in a Flex application from the web (i.e. all the files in a location like [URL]

View 2 Replies

Flash - How To Know Which Files Are Available In A Specific Web Folder

May 19, 2010

I would like to build an image gallery in Flash with AS2 or AS3 that detects automatically the number of images available in a specific folder (say a level below the swf file).The goal is to don't have to config any xml files with the images to show.

View 1 Replies

How To Get Name Of Every Files From Specific Folder Into Array

Jun 29, 2010

I'm trying to get the name of every files from a specific folder into an array, but I get this error and I can't find why...
TypeError: Error #1009: Cannot access a property or method of a null object reference.

Here's my code:
import flash.filesystem.File;
function getFileList(directory:String):Array {
var folder:File = new File(directory);
var files:Array = folder.getDirectoryListing();
var fileList:Array;
[Code] .....

View 2 Replies

As3 :: Flash - Listing Files In A Folder?

Aug 10, 2010

I want to get a list images inside a folder but in order to do that, I need to get the names all the files inside a folder first. What flash class should I look into to allow me to do this?

EDIT:how about doing this using php? what should I return/echo on my php file?

View 3 Replies

Php :: Uploading A Folder Which May Contain Sub Folders Along With Files

May 9, 2011

I'm working on an application where client may upload any folder which may contain sub folders along with files. Is it possible to upload a folder instead of a file?

View 1 Replies

Flash :: Embed All Files From A Folder?

May 31, 2011

I want to embed all xml files of a given folder. For now I'm doing something like this:

[Embed(source="../somefolder/file1.xml", mimeType="application/octet-stream")]
private var MyClass1:Class;
[Embed(source="../somefolder/file2.xml", mimeType="application/octet-stream")]
private var MyClass2:Class;

[Code]....

The list of XML files will grow to 10+ files, so I'm looking for a more elegant and dynamic way to embed those files.

The files should be embedded on compilation, to load them via URLLoader is not an option.

View 2 Replies

Flex 3 :: Get All Files Of A Folder In An Array

Jul 8, 2011

How can i get all the files in a given folder in flex project. the folder is within the project itself, under src folder, like.[code]I want to get the names of all jpg file in an array.. how it can be done programmaticly?

View 2 Replies

Asp.net :: When Does IE Delete Files From Temporary Folder

Mar 13, 2012

Our application is a ASP.NET + Flex running on IIS 6.0 server. On the client machines we run IE8 for display. IE creates temp files that seems to be taking up disk space. The Temporary Internet Folder size continues to grow seems to exceed the limit of 8MB - automatic recycle. When and under what conditions does IE delete files from the temporary folders?

View 1 Replies

ActionScript 3.0 :: Read Name Of Files In Folder?

Oct 23, 2009

I'm just beginning to learn actionscript (I'm using Flash CS4).There's this little project I'm working on as part of my learning activities.I have a folder with 12 jpgs and I want to randomly load 6 of them into 6 mc's that I already have in my stage. I say randomly because I would like to have different images everytime I play my little movie. I know that if the jpgs names where somewhat serialized (i.e. "pic1.jpg", "pic2.jpg", etc.) I could easily do it by creating a variable to contain the numeric part of the name and concatenate it with the rest of the name (or something like that).

The name of my jpgs are pure strings (like "basketball", "soccer", etc.).Can I (via actionscript) read those names and push them into an array even though the names are pure alphabetical strings?If this is possible, I think I can figure out the randomizing after pushing the names into the array.

View 4 Replies

ActionScript 2.0 :: Saving Files In A Specified Folder?

Jul 9, 2005

Is it possible, either with AS1.0 or as2.0 to save a text file and create folders from flash in a specified directory?I know how to use sharedObject, but I was wondering if there was any way to save files to other locations or even create a folder to save them into.

View 2 Replies

ActionScript 2.0 :: Loading Files From A Folder?

Aug 21, 2006

I have this script (below) that picks out the files from a folder and loads them into the swf without saying specifically what the filenames are. At the moment they load in 1 at a time, how can I make it so they all load at once in a horizontal row with a whote gap between each of them?The whole point of this is so the user can just upload files to a folder and not have to touch any script etc.The plan is to put them into an infinate menu (that part is ready, its just the first bit thats causing me problems).

Code:
delay = 3000;
//-----------------------
function loadPHP(loaded) {
if (loaded) {
imageArr = new Array();

[code].....

View 3 Replies

ActionScript 2.0 :: Tween Class - Change The Starting Point?

Jun 4, 2007

this might be an easy question but i have not found the answer. i want a MC to move vertically upwards and then stop. i have the code below but this tweens downwards. i tried changing the -30 value but it doesn't seem to change the starting point. import mx.transitions.Tween; import mx.transitions.easing.*; var xPosT:Tween = new Tween(kText,"_y", Bounce.easeOut, -30, 56, 3, true);}; xPosT.onMotionFinished = function() {};

View 3 Replies

ActionScript 2.0 :: How Many Swf Files Are Located In A Certain Folder Of Website

Jan 6, 2009

how can i use actionscript 2 to find out how many swf files are located in a certain folder of my website?

View 2 Replies

ActionScript 3.0 :: Counting Files In Folder With Same 2 Variables

Apr 8, 2010

Here is my code:
var vi3585 = 0;
var loader:URLLoader = new URLLoader();
//telling the loader that we are dealing with variables here.
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
//This is an eventlistener
loader.addEventListener(Event.COMPLETE, loading);
[Code] .....

I have dynamic number of files inside a folder. Every file has 2 variables in it vt11 and vt11s. I need a script that checks if the variables in the files have certain values and if it has this value than it counts this file. Basically what this script does is that it counts how many files in the folder have the same 2 variables in it and than displays this number in the text box. The above script always shows 1, no mater how many files with the same 2 variables are in folder.

View 1 Replies

ActionScript 3.0 :: Accessing Files Only In Specified Folder Via CrossDomain?

Apr 18, 2010

How do I specify files to be accessed only in a specific folder via a crossdomain?
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "[URL]">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="[URL]"/>
<allow-access-from domain="*.newdomain.com" secure="true" />
</cross-domain-policy>

View 3 Replies

Xml :: Flash Player Can Not Access Files Out Of Www Folder?

Oct 24, 2011

I have a flash player which play mp3 files from xml. at now mp3 files are downloadable with software like internet download manager. if i move mp3 files to out of www and change xml location attribute to '../mp3filename.mp3' player can not play mp3. my question are

1) flash file can access files out of root folder

2) what is best way to protect files from download?

View 2 Replies

ActionScript 3.0 :: Count Files In Folder Without PHP, Workaround

Nov 6, 2009

I've got this Flash project where there are a number of different photo galleries that hold images. Now, I want Flash to be able to see how many pictures are available within a folder so it can create the right number of thumbnails.

At this time, you might think... well there are numerous topics about this issue and PHP is the answer. But I perhaps have a workaround and I was wondering whether it is an 'acceptable' one or if it poses to many problems.

How about I let flash create an 'experimental' loader that loads images rapidly, theoretically till infinity. This loader starts with 1.jpg, followed by 2.jpg, 3.jpg, etc... (also the names of the images inside the folder obviously). There is also an eventlistener added to the contentLoaderInfo stating:

ActionScript Code:
experimentalLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, checkFileEnd);

As soon as Flash is trying to open the file, let's say, 51.jpg and this file does not exist, the Event described above fires. This event will then tell Flash to stop counting since it apparently reached the end. The experimental loader will then be removed and the normal thumbnail loaders will be created up till 50.jpg.

View 0 Replies

ActionScript 2.0 :: Check The Folder Destination For Swf Files?

Dec 15, 2009

I'm building an swf that's suppose to work locally (offline).That swf is like a menu for some other swf that the user will download and will be prompted to put them in the same folder of the main swf.What I want to do is the main swf to be able to recognise which swf the user have downloaded in order to show them 'available' on main menu.Is there a way to check the folder destination for swf files or something?

View 4 Replies

IDE :: Loading Png Files From External Folder In Flash?

Jun 1, 2009

I recently got the following code from one of your tutorials and am wondering why it is that when I try to change the .jpg images to .png images, the images no longer appear in the swf file. Does flash no allow .png files to be loaded.The reason that I need the files to be png is because the have to have a transparent backgroung.[code].....

View 9 Replies

ActionScript 3.0 :: Loading Files Dynamically Outside Of The Project Folder?

Jul 31, 2009

I'm working on an image gallery in Flash that plays a slideshow of different images I have on my hard drive. I've got the basics of it working, but I'm still stuck on something. If my images are in the same folder as the Flash project file or a sub-folder of it, then it works fine. However, I can't figure out how to load images from some other folder. In my case, the Flash project is located at "~/Programming/Flash/Projects/slideshow/" and the images I want to load are at "~/Pictures/Gallery/". Using a normal path didn't work so I figured I could access them with a file:// path, but that doesn't work either gives me "Error #2035: URL Not Found"). Is there a specific way you have to format the file path in Flash, or is it just not possible?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved