Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




AsDocs, How To Exclude Everything But My Own Classes?



Hi,

Today I started to figure out the whole asDocs thing, which is very cool, actually.
I managed to generate correct asDocs using the 'External Tools Configuration' in FDT3 (mac).
That wasn't too hard.

I want to use asDocs for complete projects, so that my code still makes sense to me (or my colleagues) in a couple of months, or weeks, or days in my case.

The problem is the following:
When I generate my asDocs documentation of a project that is using third-party classes (which they usually do)(e.g. Papervision3D, as3corelib, Flint particles, etc.) I don't want the documentation of THAT files to be generated.
I'm aware of the '-exclude-classes' commandline, but as far as I know this works only for single classes, so that wouldn't be the ideal solution.

Is there anyone who has experience with asDocs, I'm probably overseeing something, please help me out.

Thanks,

Gertjan



KirupaForum > Flash > ActionScript 3.0
Posted on: 12-28-2008, 06:45 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

ASDocs
Trying to compile documentation from classes. Can't get ASDocs to work All it does is show me long list of places that I didn't type local variables and nothing happens. I've gotten it to document a single class but obviously that's no good. Why doesn't it just go through the comments and generate the files? Does anyone know how to get around this besides going back and typing every damn variable?

Thanks

Getting ASDOCs And HTML Files To Render Correctly
Hey folks,

For the last 3 days I have been working on updating my asdocs and the associated example swf files for jwo_lib (which is an open source Flex component library).

I am using Google Code as the host for the project because I love SVN and they provide a great source. The issue is this. When I upload my asdocs and example files to the repository it doesn't render the HTML correctly in Firefox. It works as expected in IE.

Any thoughts?

Here are the relevant links for you to try:
http://jwopitz-lib.googlecode.com/svn/trunk/examples/ - try one of the html files.
http://jwopitz-lib.googlecode.com/sv...doc/index.html

Do these render in FF for you guys as expected?

Thanks,
Jwopitz

Exclude Element
hi,

I am converting a DisplayObjectContainer as a Bitmap using BitmapData.

The DisplayObjectContainer has many DisplayObjects. I want to exclude few DisplayObjects while i tranform into Bitmap.

Therefore the bitmap should not have that particular displayobjects alone.

is there any suggestion?

How Can I Exclude The Comas ?
This is an excert of my program:


ActionScript Code:
for (n=0;n<t/2;n++){    tabela1 = tabela1.concat(sorteio[n],"
");}


and the problem is that the words apear between comas.

Keep the good work

How Can I Exclude The Comas ?
This is an excert of my program:


ActionScript Code:
for (n=0;n<t/2;n++){    tabela1 = tabela1.concat(sorteio[n],"
");}


and the problem is that the words apear between comas.

Keep the good work

For - Exclude A Range Of Numbers
for (i=1; i<8; i++) {
}

this will give me from 1 to 7
...but if I need to exclude numbers from 3 to 5, how should I do?

i<3 and i>5 and i<8

:p I'm messing up this...I'm sure...

For - Exclude A Range Of Numbers
for (i=1; i<8; i++) {
}

this will give me from 1 to 7
...but if I need to exclude numbers from 3 to 5, how should I do?

i<3 and i>5 and i<8

:p I'm messing up this...I'm sure...

Exclude A Layer When Publishing
Hi,

I have created a menu system which works just fine. The client has now come back and said that one of the menu buttons needs to be excluded but will appear at a later stage.

Is there any way of exluding a layer when I publish a SWF file. Like in Photoshop if I take the eye off a layer and export the image as jpeg, that layer will not be included in the image?

Thanks,
James

Background Color/Exclude .exe Menu
Hi,

I am trying to create a Flash movie with each scene using a different background color.  I know that you can set the background color of the entire movie...which would affect the color of each scene in the movie, but how do you set the background color for each scene?  (ie. scene1 has a red background, scene2 has a blackground, etc.)

In addition, in my publish settings I set Projector .exe.  Once I click on the .exe file, I notice that the file menu appears.  This menu allows users to rewind, play, the .exe...how do I get rid of this menu?  I do not want to allow my users to select from the file menu.

Thank you in advance for you info!!!  (smile)

Reggie

email: r.dean@attbi.com



How To Exclude "" From Input Textfield
the method:

textfield.restrict = "^\" for some reason does not work...

i used the following inelegant workaround so far:


Code:
this.input.onChanged = function ()
{
var pos;
if ((pos = this.text.indexOf ("\")) != -1)
{
this.text = this.text.substr (0, pos);
}
};
any ideas ?

Custom Classes: One Class Tracks Multiple Other Classes?
I'm working on a coloring that allows kids to place objects on a scene and then color them so the image can be printed out. So assume you have sky background, the child can select a bird object, drag it into place and once they have it in place, color everything on the page (with a given palette of colors.)

So far it going great. However I want to track what objects have been added to the drawing on the fly. I have a potential solution using arrays but I'm thinking this is perfect opportunity to start using custom classes.

I'm thinking that I'd create a new instantiate a copy of the object class each time an object is added to the scene. However to track the objects added to the scene I'm thinking I'll also use an listing class to track them.

What I'm not sure about is the would the listing class simply contain an array of object identifiers? Any thoughts on the structure of the listing class?

I'm very new to oop as I've mainly been doing procedural programming up to this point but I'm eager to give this a shot.

Thanks!

Using Flex Classes In Classes Linked To Symbols
Hi all

I have a fla file where I link a symbol to an action script class. This action script classes references mx.collections.ArrayCollection; so when I attempt to publish the fla file, I get the error message:
1017: The definition of base class ArrayCollection was not found.

I then tried to add a class path (this folder contains the mx... classes):
C:Program FilesAdobeFlex Builder 3sdks3.0.0frameworksprojectsframeworksrc

and the the above error 1017 wasresolved, but now I get the error:

Version.as, line 18 1004: Namespace was not found or is not a compile-time constant.

So now I am pretty much stuck. What do I need to do for this to work ? Please note that the code compiles fine in flex, so it is not som basic coding error ?

Instantiating Classes Inside Classes
I have a class called spaceship in which i have instanciated another class weapon. However, when i call on a method of weapon (which at this point is just simply trying to trace "hello"), it doenst work and the object basically doenst exist. It's delcared in the class as:

Code:
private var ShipWeapon:weapon;
Note that when I instantiate a weapon class on the main timeline the thing works and "hello" is printed to the output panel. However, nothing at all happens when instantiated the weapon class inside my spaceship class. Both traces come up "undefined". Do i need to declare the class as some sore of special class or somethings? Thanks in advance

[classes] Best Method To Communicate Between Classes
Here's the scenerio:

I have a component that is associated with a class. Inside the component is an empty movieclip.

-component (part of a class)
&nbsp;&nbsp;-mc

The main component's class upon init will load a movie from a remote server into the mc movieclip. System.security.allowDomain is in there...

Now, inside the swf that gets loaded into the mc is an empty movieclip that's associated with it's own class:

-component (part of a class)
&nbsp;&nbsp;-mc (contains loaded movie)
&nbsp;&nbsp;&nbsp;&nbsp;-mc (part of a separate class)


Now here's the challenge... I need to have the loaded movie > mc's class be able to communicate with the main component's class.

What's the best setup to be able to communicate between the two classes directly? That is, if I don't have loaded movie > mc > class inherit from the component's class.

thanks in advance...

Nathan

Best Flash Classes (Taught Classes)
I think this site is great for newbies in the flash world to Advanced flash developers. I am an intermediate flash designer/developer and I have been using flash since 1998. My strengths are more on the design side for sure. I am just curious what your experience is with going to a week long flash class. I have been to several classes and my last one was a week long one with Joshua Davis on advanced actionscript in NYC a while back. This was still coding in AS1 with dot syntax so only some of it is relevant to what we are doing today. I am wondering what are the best classes out there today and what your experiences are if you have been to any. I wish another event like this: grant skinners FITC flash 8 workshop or this Colin Moocks actionscript bootcamp were available but I can't find anything like it. My friend went to Colin's workshop a while back and mentioned how he went into design patterns with AS2 and it would be great to learn about that. ANyhow any suggestions would be great. Post your thoughts.

Instantiating Classes Inside Classes
I have a class called spaceship in which i have instanciated another class weapon. However, when i call on a method of weapon (which at this point is just simply trying to trace "hello"), it doenst work. The compiler obviously didn't flag anything, but i also get "undefined" for all my weapon class varibles. Do i need to declare the class as some sore of special class or somethings? Thanks in advance

Accessing Classes From Classes
ok something I don't get. In as2 I used to have a main class, which I created an instance of my Useful.as Class in. And then when I created say a monster instance from my monster class, I used to pass it a reference to the main class, so I could access the Useful instance from a function in my monster class like this


Code:
main.Useful.RandomNumber(1,100);


But this doesn't seem to work in as3

It just gives me a reference error, even though when you look with debug mode the Useful instance is sitting there in the main class, and there is also a reference inside my monster instance to the main class. I found that if a pass a direct reference to the Useful instance to the monsters constructor, and setup a var called Useful inside my monster instance then I can just do this


Code:
Useful.RandomNumber(1,100);


but why doesn't the old AS2 way of things work?

Accessing Classes From Other Classes
Two Classes: Tile, Map

I know Tile works and is accessible from the main timeline because I can create and object and trace properties, so the timeline is able to import it.

When placing the same import statement in the Map class I get: 1046: Type was not found or was not a compile-time constant: Tile.

Here is code


ActionScript Code:
package layout
{
    public class Tile
    {
        public var filename:String;
        public var myX:int;
        public var myY:int;
        public var ext:String;
        public function Tile(sFilename:String)
        {
            filename = sFilename;
            var nPos1 = sFilename.indexOf('_');
            var nPos2 = sFilename.indexOf('.');
            myX = Number(sFilename.substring(0, nPos1));
            myY = Number(sFilename.substring(nPos1+1, nPos2));
            ext = sFilename.substring(nPos2, sFilename.length);
        }
    }
}




ActionScript Code:
package layout
{
    import flash.display.*;
    import flash.net.URLRequest;
    import flash.events.Event;
    import layout.Tile;
    public class Map extends Sprite
    {
        // tiles[y][x]
        public var tiles:Array = new Array();
        public function Map()
        {
            if (map == false)
            {
                var map:Sprite = new Sprite();
                this.addChild(map);
            }
        }
        public function AddTile(sFilename:String)
        {
            var Tile:Tile = new Tile(sFilename); //This line causes issue
            tiles[Tile.myY] = new Array();
            tiles[Tile.myY][Tile.myX] = new Array(Tile, false);
        }
    }
}

Using Classes Inside Of Classes
I have created a custom sound class called MySoundClass that extends the Sound class... it is declared as class com.stickyMatters.WineGlassPiano.MySoundClass. I also have another class called SongPlayer that is declared as com.stickyMatters.WineGlassPaino.SongPlayer... my question is.. how do i use the MySoundClass inside of the SongPlayer class... when I try to import it says I cannot use the import statement inside of a class file. I know in AS3 you can use the package keyword to create packages and do that... but as far as I can see there is no package keyword in AS2... because I tried, and it just tells me htere is a syntax error on the line with the package declaration... can you use one custom class inside another? and if so... how?

P.S. just to be sure... i am using flash CS3 and writing AS2 files. Thanks!

Classes In Mx 2004 (new To Classes)
hi everyone, Im Nubis, from Argentina.
Iīm new to woking whit classes, Im using flash mx 2004 pro.

Ive created a class, that works correctly, it creates a square, a textbox, and uses a variable to pupulate the textbox.
(im sorry for my english)

in my library i have a MC (an empty MC) that is linked to that class.

I use this script to place the clip on the stage
attachMovie("card", "card", 1)
iknow the class works fine, but, I dont know where to pass the parameters to the class.

And if I use : Card = new MyCard("this Cardīs Name or label ")
both the clip and the textbox are not created.

could anybody please help me?

thanks in advance :)
(feel free to make comments about my code)

this is my class code:
// MyCard
class MyCard extends MovieClip {
var thisCardName:String;
//method for creating the square
function gen_sqr (){
this.createEmptyMovieClip("Square",2);
with(this["Square"]){
beginFill (0x0099FF, 100);
lineStyle (1, 0x003399, 100);
moveTo (0, 0);
lineTo (100, 0);
lineTo (100, 70);
lineTo (0, 70);
lineTo (0, 0);
endFill();
}
}
//method for generating the textfield
function gen_txt(my_text){
this.createTextField("mytext",3,0,0,50,20);
with(this["mytext"]){
text = my_text;
multiline = true;
html = true;
}
}
//constructor
function MyCard (thisName:String){
//set the name or label for the card
thisCardName = thisName;
//
gen_sqr()
gen_txt(thisName)
//
trace("newclass Created")
trace(thisCardName)
}
}

Importing Classes In To AS3 Classes?
I am not sure how to import multiple classes into an AS3 class. Also I am bit confused on how "package" works now.

This is currently what I have and its wrong:


Code:
package {
import flash.display.*;
import flash.net.URLRequest;
import flash.events.Event;

class LoadImage {

public function LoadImage() {
var container:Sprite = new Sprite();
addChild(container);

var pictLdr:Loader = new Loader();

var pictURL:String = "catfishSMv.jpg"
var pictURLReq:URLRequest = new URLRequest(pictURL);
pictLdr.load(pictURLReq);
pictLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoaded);
function imgLoaded(e:Event):void {
container.addChild(pictLdr.content);
}
}
}
}
How should I actually do this?

Thanks

Classes In Mx 2004 (new To Classes)
hi everyone, Im Nubis, from Argentina.
Iīm new to woking whit classes, Im using flash mx 2004 pro.

Ive created a class, that works correctly, it creates a square, a textbox, and uses a variable to pupulate the textbox.
(im sorry for my english)

in my library i have a MC (an empty MC) that is linked to that class.

I use this script to place the clip on the stage
attachMovie("card", "card", 1)
iknow the class works fine, but, I dont know where to pass the parameters to the class.

And if I use : Card = new MyCard("this Cardīs Name or label ")
both the clip and the textbox are not created.

could anybody please help me?

thanks in advance :)
(feel free to make comments about my code)

this is my class code:
// MyCard
class MyCard extends MovieClip {
var thisCardName:String;
//method for creating the square
function gen_sqr (){
this.createEmptyMovieClip("Square",2);
with(this["Square"]){
beginFill (0x0099FF, 100);
lineStyle (1, 0x003399, 100);
moveTo (0, 0);
lineTo (100, 0);
lineTo (100, 70);
lineTo (0, 70);
lineTo (0, 0);
endFill();
}
}
//method for generating the textfield
function gen_txt(my_text){
this.createTextField("mytext",3,0,0,50,20);
with(this["mytext"]){
text = my_text;
multiline = true;
html = true;
}
}
//constructor
function MyCard (thisName:String){
//set the name or label for the card
thisCardName = thisName;
//
gen_sqr()
gen_txt(thisName)
//
trace("newclass Created")
trace(thisCardName)
}
}

Accessing Classes From Classes
Hi... I'm having some trouble with these bits of code... I got some help before from wangbar to sort it out when the var stored was in a class of its own. But trying to access it from another class isn't working...

class Ipa{
var c : Settings;
function Ipa() {
}
}

class Settings {
var currSubs:Boolean;
function Settings (s:Boolean) {
currSubs = s;
}
function getSubsOn ():Boolean {
return currSubs;
}
function setSubsOn (s:Boolean):Boolean {
currSubs = s;
return currSubs;
}
}

then at root level:
var dpp : Ipa = new Ipa();
dpp.c.setSubtitlesOn(false);

and level 3:
_global.subtitles = _level0.dpp.c.getSubtitlesOn();

if ( _global.subtitles == false){
_level3.speech._visible = false;
};


 And nothing happens...subtitles still showing...
Thanks in advance for help.
     silverswim


 


AS1 Classes And AS2 Intrinsic Classes
Anyone ever mess around with writing an AS1 style class (so that it can be used prior to your class export frame) and writing an intrinsic AS2 class to go along with it, to enable compile-time checking?

It's working well, at least for instance members. (The trick is you need to define your constructor like so:Code:

var MyAS1Class = function... and NOTCode:

function MyAS1Class...)

But for static members, I can't seem to get the compiler to recognize the AS1 static members as validating against the AS2 intrinsic classes static members. In other words:

Code:

import the.intrinsic.class.Foo
#include "the/actual/as1/class/Foo.as"

var myFoo:Foo = new Foo();

// This cause the compiler to complain:
myFoo.nonExistentProperty = "moo";

// This goes by undetected:
Foo.NON_EXISTENT_STATIC_PROP = "moo";

// This gets caught:
the.intrinsic.class.Foo.NON_EXISTENT_STATIC_PROP = "moo";
// But doesn't help because it's referencing the intrinsic class, which
// doesn't actually have any code and never gets compiled
(obviously the properties mentioned are not defined in this example intrinsic class)

It's apparently a problem of the actual AS1 class being a var on the timeline and the AS2 intrinsic class existing in a different namespace.

I've tried putting my AS1 class in the _global.the.intrinsic.class.Foo variable, like it would if it were a regular AS2 class.

I've tried Object.registerClass("_global.the.intrinsic.class.Foo", Foo), which I thought would work, but maybe I'm doing it wrong.

So far the best workaround is this:
Code:

Foo.__resolve = function(name:String):Void {
    trace("Oops, the member you've accessed, " + name + ", does not exist");
}Which at least provides run-time checking, but not compile-time checking, which is obviously why I'm doing this intrinsic thing at all.

I know this is a very esoteric question...any suggestions?

PS
Man, I do NOT miss writing AS1 OOP! I tend to forget how great AS2 OOP is when I use it exclusively. But coming back to AS1 OOP...<napoleonDynamite>Gawh!</napoleonDynamite>

Using Custom Classes Inside Of Custom Classes
I have created a custom sound class called MySoundClass that extends the Sound class... it is declared as class com.stickyMatters.WineGlassPiano.MySoundClass. I also have another class called SongPlayer that is declared as com.stickyMatters.WineGlassPaino.SongPlayer... my question is.. how do i use the MySoundClass inside of the SongPlayer class... when I try to import it says I cannot use the import statement inside of a class file. I know in AS3 you can use the package keyword to create packages and do that... but as far as I can see there is no package keyword in AS2... because I tried, and it just tells me htere is a syntax error on the line with the package declaration... can you use one custom class inside another? and if so... how?

P.S. just to be sure... i am using flash CS3 and writing AS2 files. Thanks!

Using Custom Classes Inside Of Custom Classes
I have created a custom sound class called MySoundClass that extends the Sound class... it is declared as class com.stickyMatters.WineGlassPiano.MySoundClass. I also have another class called SongPlayer that is declared as com.stickyMatters.WineGlassPaino.SongPlayer... my question is.. how do i use the MySoundClass inside of the SongPlayer class... when I try to import it says I cannot use the import statement inside of a class file. I know in AS3 you can use the package keyword to create packages and do that... but as far as I can see there is no package keyword in AS2... because I tried, and it just tells me htere is a syntax error on the line with the package declaration... can you use one custom class inside another? and if so... how?

P.S. just to be sure... i am using flash CS3 and writing AS2 files. Thanks!

Classes
I'm having trouble finding info on how to setup classes in flash 5.

What i want to do is:

Create balls at a set interval.

These balls roll back and forth across a floor changing direction and color when they bounce off the walls.

So I'd like each ball to have a color variable and a direction variable.

How do i make a movieclip with these 'internal' variables, and how do i create them during play?

Using 3D Classes In MX
Hi,
I am hoping someone here is familiar with Brandon Williams 3D classes for creating cameras and vector objects in 3D in Flash MX.

I am trying to create a continous flyaround of a circular set of movieclips. This works fine if I rotate the movieclips using the rotation matrix, but to give me more interaction I wanted to create a camera that flew around the static movieclips. To do this I tell the camera to move sideways by a set amount and then look at a triplet point (the center of the circle of movieclips - and this is fine in the y direction, but then I wanted to add a more interesting movement upwards as well, so I tell the camera to move_upwards by a set amount and then look at the triplet. This works for 90 degrees of rotation at which point I can't tell exactly what it is doing but seems to have a problem deciding which direction to go and so just sits there.

If anyone can understand what I am going on about - help me!!
Robin

Classes?
How can i define a class like the Array class where you can assign values to a variatble directly and yet have it have functions attached to it.

I want to be able to do this.

myVar = 5;
myVar.testOutput();

//-----I want output to be
5

is this possible?
thanks

Classes && OOP In MX
Hello, everyone.

How would I go about associating a class with a movie clip? I mean, if I have an AS class, is it possible to be able to do the following:


Code:
MCnode1 = new Treenode();
And it create a new movieclip on the stage AND I be able to access members of the class Treenode in later AS code? Also, I'm unsure if the class should be defined on the _root and then I make the above calls, or if I should create the MC and then in the MC have the code...

Please excuse my stupidity and thanks for all your help!

Classes
I downloaded a file and it imports a class (This glass: http://www.bit-101.com/Particles/) I can't figure out how to install the class. When I run my movie it says there is an error, it can't find the class.

Thanks!!

Where To Look? Classes?
I have created a MC that will act as a button. It consists of 2 layers, a dynamic text box layer and a hitBox layer, that expands to the size of the dynamic text box, when it is passed the text that will populate the button.

On this button I place a bunch of code and all works fine.

I am now building a chart that will contain many of these buttons and I would like to not have to place the code on each and every one. I know that I could place the button MC inside of another MC and would not have to paste the code each time this way.

However, I would like to make this button a class or somehting like that, that has the code associated with it. Does this make sense?

I guess I am asking if this is the right train of thought and if it is, could someone point me to a tut that may help me learn how to do this? If this is not the right way to go, then what is?

Thanks.

_t

Classes
I have a ActionsScript class in the file AIChar.as



PHP Code:



class AIChar extends MovieClip
{
    var mc : MovieClip;
    
    public function AIChar(passed_mc : MovieClip){
        mc = passed_mc;
        mc.onEnterFrame = function ()
        {
            trace("1");
            mc._y -= 20;
            update;
        }
    }
    public function update(){
        trace("2");
        mc._y -= 20;
    }
}




then in a fla file i have on a move clip:



PHP Code:



onClipEvent (load) {  
    import AIChar.as;
      var thechar:AIChar = new AIChar(this);
}




after i run the output widow continuely says 1 but the movie clip does not move up, what am i doing wrong

AS 2.0 Classes More Than 50 Kb
Im exporting my SWF with AS 2.0 classes. My size report tells me they account for 50kb of the 57kb total!

Anyway of reducing the (way too big imho!) size used by the AS 2.0 classes?

Hope someeone can help!

Tim.

AS 2 Classes
I have been working on a tutorial on how to build classes in AS 2. In the tutorial they use the following function:

code: public function set year(nYear:Number):Void {
if(nYear >= 1886){
_nYear = nYear;
}else{
_nYear = 1886;
}
}

My question is, what does the :Void do? This isn't explained at all in the tutorial. It is just kind of there and bugs me not knowing why or when I would use that syntax.

Here is the link to the tutorial in case anyone else is interested in it. It's pretty good so far.

http://www.flash-mx.com/flash/actionscript_lott.cfm

Thanks.

_t

Classes Help
Hey, I'm pretty new to OOP and im trying to learn it.
Anyway, here's my question...
Say i have a class, lets just call it objects, and anything that inherits from it has to be under the effects of gravity.
Now lets say i have a class called Projectile, which will have to hitTest with an object. The projectile class will inherit from the objects class, so the projectile will fall with gravity and do anything else the objects class does.

So how would I go about doing this? First off I thought of having an onEnterFrame function for th objects class which would keep decreasing the objects y velocity ( so it falls ) and the bullet class would also do an mc.onEnterFrame = function ect... which will do the hitTesting.

But one will overwrite the other :

Anyone know the best way to do things similar to this?

Thx

Where To Put My Classes?
hello,

have just finished writing about 30 odd classes, they all contain variables and functions that i use on a regular basis,

i just what to know where i put them so that i can use them without using new myClass() or import,
also i need to know what to name my classes, i know its something like mx.com.something.something.myClass(or something similar).

thanks for your time,


zlatan

Where To Put My Classes?
hi there i posted this in the mx forum accidently, i asked a mod to move it but they are lazy so i will post a link to it here,

please help me.

[link] ,

thanks,

zlatan

Using Classes
Does anyone know where I can find a good tutorial about using Classes in Flash?

I'm pretty new to Flash Actionscriping but know Java, I need to know how to make functions, call them, and reference movieclips within the class.

Thanks for the help,
HalcyonDreamer

P.S. This smilie rocks .

Something I Don't Get Re Classes
Hi,

simple this for someone who knows!, I'm putting this as one of the properties of my class

var Tiles:Array = new Array();

but when I try to add to that array with a method, Tiles is nowhere to be found in my object, its only when I copy that line again into the constructor that Tiles suddenly appears, so my question is, why is that? and then does that mean I only need to declare my array in the constructor?

thanks for any help
boombanguk

Classes-help Please
I learned actionscript from a book, and nowhere in there were classes. I recently realized I knew almost nothing about them. What the heck is the purpose of classes? Any general advice you could provide would be helpful. By the way, sorry to everyone on the games forum for posting about RPG's when I don't even know classes.

Help With Classes...
So i've created a class, which as I have learned requires an external flash file and a command like:


Code:
import Class1.as;
is there anyway to have the as file embedded into the fla so it doesnt need to call an external as file from the same directory? or if that isnt possible can it be called from anywhere on the internet like the following:

Code:
import http://www.blanksite/testing/Class1.as;

New To Classes
I have an external AS file. How do I add that to my classes directory? Thank you for your help!

[F8] Classes
Hi,

I have two questions about classes usage:

1) Is it possible to compile classes and distribute the compiled files instead the .as source code?

2) Is it possible to load classes remotely, from a url?

Thanks!

Classes.fla?
I am a developer who recently decided to give Flash developement a try. I am attempting to use xPath to query an rss feed. I have looked everywhere for help on including the DataBindingClasses. When I go to: Window > Common Libraries I do not see a Classes option. Is there something else I need to have beforehand?

Thanks.

Classes
Hi,

I am fairly new to Flash and Actionscript. I'm using Flash MX 2004 and was wondering if I still need to create classes in an external .as file or is it do-able in the actionscript of the frames? And this may sound a little silly but how do I create an external .as file?

Thanks,
DeMarHc

Key Classes [f8]
Hi guys,

I am looking for some help using Key classes. The aim i want to achieve is to have some code, so that (for example here, i will say i want to use the "2" key) if 2 is pressed and then released it performs one action, say goes to one frame and plays from there. But if the "2" key is held down, it goes to a different frame and plays.

I think it will be using Key classes and listeners, but i have no idea how to use them, or how to set this up so that it works.

Any help will be very gratefull thank you

Ian

[F8] Using Classes
Hello there i was wondering if anyone can take a look at this and tell me why it aint workin. I have a class which should make an object move inside an fla file, it manages to bring back the trace function from the class, so i know it is using the class functions but it doesnt move the specified object in the fla and i dont know why.

This is my first go with classes so do forgive me if my problem is really simple. Any way here is the code:

-fla:

Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
#include "mc_tween2.as"

var Action:movement = new movement();

box_mc._x = 0;
box_mc._y = 0;

box_mc.onRelease = function(){
Action.wizo();
trace("move");
}
-class:

Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;

class movement{

private var loop:Function;
public var tweenOne:Tween;
public var tweenTwo:Tween;
private var clip:MovieClip;
private static var SYMBOL_ID:String = "box_mc";
public var box_mc:MovieClip;

public function movement(target:MovieClip, depth:Number, x:Number, y:Number){
clip = target.attachMovie(movement.SYMBOL_ID, "box" + depth, depth);
clip._x = x;
clip._y = y;
}

public function wizo(){
loop = function(){
tweenOne.start();
}

tweenOne = new Tween(box_mc,"_y",Regular.easeIn,0,300,2,true);
tweenOne.onMotionFinished = function(){
tweenTwo = new Tween(box_mc,"_x",Regular.easeIn,0,200,2,true);
box_mc.colorTransformTo(0, 232, 0, 23, 0, 190, 100, 0, 2, "linear");
tweenTwo.onMotionFinished = function(){
box_mc.colorTransformTo(0, 0, 0, 255, 0, 102, 100, 0, 0, "linear");
box_mc._x = 0;
loop();
trace("this should be working");
}
}
}
}
cheers.

Can You Use AS2 Classes With AS3?
I will eventually move to CS3 and AS3. I have a quite large library with AS2 classes that I've collected... Will these still work in AS3?

All the best, Niklas

Copyright Đ 2005-08 www.BigResource.com, All rights reserved