ActionScript 2.0 :: Create A Class To Learn The In's And Out's Of II - Reference
Jun 23, 2006
I am trying to create a class to learn the in's and out's of AS II and i have stumpled into a bit of a problem i cannot resolve. Below is my class, the problem i am running into is on the monitorLoad() method... Take note of the traces, the first one gives me whatever i input into the class and the second one gets lost and traces undefined...so the problem I am running into has to do with where i create the empty movie clip....but i have no idea where i should create it in order to manipulate my loadBar_mov instance i will manually place on my stage...i realize using _root is not that dynamic and i probably should avoid it...but i dunno what else to do.
[Code]...
View 7 Replies
Similar Posts:
Oct 15, 2010
I can't figure out how to create a reference to a class so I don't have to keep typing the class.staticvar.item
So usually I have this: DocClass.build_class.firstFunction();
I would rather in my sub class just be able to say; private var build_class:Class = Class(getDefinitionByName("DocClass.build_class"));
so throughout the sub class I only have to type the reference, build_class...
What am I doing wrong?
View 11 Replies
Jun 20, 2010
I'm creating a mask effect. i create 10 movieclip with a library class reference that appear on the screen with a random alpha effect. THe problem is that if i try the effect alone all works ok. if i mask the layer that contains the effect on an image i don't see the effect. i see directly the image masked with the boxes. i can't explain that because i've the effect first but it seems that when i test the movie the effect doesn't play and the boxes appear directly on the screen.
View 5 Replies
May 6, 2010
package uk.co.bigroom.utils
{
import flash.utils.Dictionary;
/**
* Class to create a weak reference to an object. A weak reference
[code]....
In this Class, how they denote one as Weak Reference and one as Strong reference.
View 1 Replies
May 17, 2011
I'm new to Flash AS3. I started making a game and I am a bit confused. Let's assume that I want to create a game that has multiple levels/modes, how can I do this in an object orientated way?
When i create games in other languages e.g. XNA C#, i create a separate class then create an object of that class within the main class and run the game based on a simple statement.
[Code]...
View 2 Replies
Aug 29, 2007
I've been playing around with custom classes. My objective was to create a custom class (Testing) that would create a box when an instance of the class is created. I've tried three different approaches, however only (3) seems to be showing up. I'm just curious why (1) or (2) doesn't work?
Also is there a better approach than (3)? Since at the moment it's been created on _root. I hope the box can only be accessible through the instance. Since I'd like to incorporate the whole idea of public, private, encapsulation, etc.
[Code]...
View 3 Replies
Jul 28, 2011
Using Flash CS5 Professional I have created a symbol, dragged it onto the stage, and given it an instance name of GreenLight1. If I want to make this visible from the document class, I can simply do the GreenLight1.visible=true; and poof it's good to go when I test the file. As long as I stay in the document class I am good to go, but now I'm trying to move to another class and hitting ALL kinds of trouble just trying to get Flash to allow me to access this simple object. All I am looking to do is have this GreenLight1 go invisible (visible=false) when a certain condition occurs in this new class and Flash just won't let me access GreenLight1 at all. Things I've tried thus far:
stage is passed to the class and is referenced by _stage and is working just fine when I do _stage.addchild or anything like that. So I have tried "_stage.GreenLight1.visible=false;" and I get "ReferenceError: Error #1069: Property GreenLight1 not found on flash.display.Stage and there is no default value." My document class extends Sprite, so I figured I'd try the root function. So I tried "Sprite(root).GreenLight1.visible=false;" and I get "1119: Access of possibly undefined property GreenLight1 through a reference with static type flash.display:Sprite." I tried to create the Resource class as described therein. To which I came across the same problem that I started with in that it doesn't know what GreenLight1 is to begin with so I got "1120: Access of undefined property GreenLight1." Here is my code for Resource.as (am I supposed to pass something to this class from the document class?)
[Code]...
View 2 Replies
Dec 7, 2009
Is there a way I can reference a Movie clip I have on the main stage from a custom class of a document class?[code]
View 1 Replies
Dec 8, 2009
Is there a way to refer to a Movieclip on the stage from a class file of the document class
Lets say I have 3 MovieClips on the stage(a Circle, a Square and a Triangle)
I have the document class which calls another class that controls the MC on the stage
Example
ActionScript Code:
package {
public class Example extends Sprite {
//Create the instance of the class being called
[Code]....
View 1 Replies
Jun 28, 2010
Given that both of these calls to getQualifiedClassName return the same thing (mx:Label), how would one go about programatically differentiating between an instance of a class and a reference to the class...
var lab1:Label=new Label();
var lab2:Class=Label;
var qcn1:String=getQualifiedClassName(lab1);
var qcn2:String=getQualifiedClassName(lab2);
In other words, how could I know that lab1 is of type Label, while lab2 is type "Class". typeof() simply returns "object" for both... getQualifiedClassName returns "mx.controls::Label" for both...
View 3 Replies
Jul 21, 2011
I am doing a looping background with 2 identical BG movieClip (B1 and B2). Those 2 are "new" by the same class.
var B1:MovieClip = new BG();
var B2:MovieClip = new BG();
But because this BG class picture is loader from the internet and the picture is rather big. When I addressed its loading by using progressEvent. The picture is really loaded 2 times. Is there anyway I create B2 based on B1 without using new BG() again? Since it definitely makes a new BG with Loader code inside.
[Code]....
View 2 Replies
Jan 8, 2012
The question is a bit silly. I am trying to implement a skill updating system. So to explain.There is a class
class AppInfo
{
public static var power:int = 10;
[code]......
View 3 Replies
Mar 15, 2006
I want to retrieve the var reference of an instance of a class from within the class. For example:
ActionScript Code:
var ref:MyClass = new MyClass ();
//then via some method, I would like to get the var ref inside the class
ref.getRef(); //returns "ref" instead of [object Object]
[Code]....
You may ask why, well I want to do some spring cleaning inside this manager class I am making. Of course the above is a simplistic version of what I am trying to do.
View 2 Replies
Jan 7, 2005
how can I self refer to an instance of a class within the class definition file?Here is an example
PHP Code:
public function fireBullet(target:MovieClip) {
Bullet_mc = target.attachMovie("Bullet", "Bullet1", 1);
}
}
Now everytime I want to call the function I have to put this as my target, (fireBullet(this))I cannot just put it in the code as it gives me an error.
View 9 Replies
Oct 14, 2009
Can you tell me how to learn Flash (AS3)? Which books to read, which videos to watch? I want learn it.
View 10 Replies
Jun 4, 2006
What do you guys think is the best way to learn Actionscript is? I checked the sticky and the links, they are some good links, but I was wondering what is the best way to go about learning Actionscript. Repetition is probably a factor but should I go from tutorial to tutorial or go up in skill gradually?
View 6 Replies
Mar 30, 2010
What would be an advisable way to learn actionscript 3? Is it best to read up and experiment with the basics first or can you jump in at the deep end and try to do more complicated things with the help of forums? Are you going to learn much that way?
View 6 Replies
Jun 21, 2009
I had a complete interactive application built in ActionScript 2.0, and now need to revise and update it -- which means converting the old code to 3.0. The first scene is a preloader for the entire application that loads and intro animation before launching the application. I went to the help section figuring that once I had some actionScript in the file, I could delete and experiment with the code until I began to understand (I did take a semester long course in Java, but not much has been retained). If you couldn't tell already, I'm a designer and not a programmer.
I copied the ActionScript from the help section, and pasted it into my Flash document. I went to test movie and got the following error message: "1037: Packages cannot be nested" I can't even figure out what that means! I have nothing else in my document.
[Code]...
View 5 Replies
Jan 11, 2011
I don't seem to find any decent AS3 book for learning Object Oriented Design.
I checked several ones but most assume that you are an intermediate or advanced AS3 developer.One like AS3 Design & Patterns is good but starts simple and get really complicated quickly. Another 2 are Object Oriented AS3 and Advanced AS3 with design patterns is TOO ADVANCED. Now we have OOP books but not for the little guy with limited programming experience like me. What are my alternatives? A friend of mine told me get Head First Java and learn from there it explain Java but especially OOP for beginners. What do you guys think I should do? I feel it is a shame that I need to go to Java to learn OOP because AS3 books are not for beginners.
View 9 Replies
May 7, 2011
I have a FLA (say Main.FLA) document class with a child MovieClip on the stage: into the child MovieClip I load other swf files: each of the files contains its own Document Class (every swf is a somewhat independent application, say quizzes and so on).For some reason I must use the Main document class to store data (scores or so) from the child swfs loaded into the Main swf. HOW do I reference the Main class? I can't find a way.[code]and dispatch an Event this way from the loaded swf document class to the Main class:[code]Now, first of all I don't know if this could even work. Secondly, I tried to make it work by adding an event listener to my Main class but id did not work.
View 9 Replies
Sep 2, 2009
Does anyone have any links to tutorials where I could learn Actionscript 3.0?
View 1 Replies
May 13, 2010
i'm newbie in flash action script. I would like to be a game flash maker, mmmm....i'm very confused where do i start? what first step should i learn to create game...
View 3 Replies
Mar 4, 2011
Can i learn Flex without learning ActionScript 3?
View 4 Replies
Oct 26, 2011
There is a AIR based software where in you can see as demos as well as code.. I forgot its name.. can anyone please let me know.. the software is from Adobe.
View 1 Replies
Sep 22, 2008
I don't know any other programming languages, but I would like to learn how to use actionscript.
View 1 Replies
Mar 26, 2011
I'm trying to learn flash to learn times tables, so I want to almost but not quite repeat things. I haven't done programming since punch cards so all the "how to get from Actionscript 2 to 3" is less than helpful.I've got a Game Design book but I"m not finding how to simply copy a chunk of frames to repeat (and then change how it ends to take one answer off).
View 2 Replies
Nov 22, 2006
Would be of amjor benifit to learn the AS3 structure by way of Flex for the next verison of Flash? What I mean is, will Flash 9's AS be AS3 such as it is in Flex... and if so, would it be wise for me to familiarize myself with Flex's way of coding for that very reason?
View 5 Replies
Apr 8, 2011
Does anyone know how to extract a class reference from an SWC file? I know I can right click / "Go to definition", and view the class definition. I need to extract these for each class in an SWC. Can anyone provide a method to do so automatically?
View 3 Replies
Feb 14, 2011
I am a Java developer. I am good at learning new languages but I can't make head or tail of AS3. It seems like a different mindset that I can't get into or something.Could you provide links a AS3 tutorials that explain everything well, preferable targeted for people who have already programmed?
View 5 Replies
May 17, 2009
I'm looking for general recomendations and tutorials in regards to learning to integrate engines and library code into my projects. I think I have the very basics of AS3 sorted, or at least I know how to figure them out (alot due to this forum).
[Code]...
View 2 Replies