ActionScript 3.0 :: External Class Access?

May 24, 2010

I've a website in which i have a menu that handle some external swf.My Problem is that when i've clicked on one section of the website and then i click on another menu button to gain access on another section i wanna to make an "go out transition" for the current loaded section. This transtion must be different for every website section, so for this i'm going to create a "go out transition" in every external swf class that i have for every section.Now my question is: How can i access from the main class to every single classes of the section to obtain the properly "go out transition" ?

View 9 Replies


Similar Posts:


Actionscript 3 :: Access Function In External Class Located In External Swf

Oct 22, 2011

I am trying to access a function in a loaded swf that has external class.. I would like to avoid having to put the function on my "Main" Doc class in the external swf and instead access the function directly from the class

This is what ive tried so far and it's a no dice:

private function startLoad(){
var loader:Loader = new Loader();
var req:URLRequest = new URLRequest("one.swf");

[Code]....

View 1 Replies

ActionScript 3.0 :: Class To Access External XML?

Jul 31, 2009

So I have a class that reads from an external XML file, and it works great. (uses RLRequest and complete event listener)I have functions in it to read certain parts of the file.Im trying to create a new instance of that class in my document class. I am able to do this, BUT because the XML class loads the file, and uses a complete event listener to load it, anything I try to access (var or function) come up blank because it fires before the file is done being loaded.Id like to be able to do something like this.

Code:
var prefs:XMLClass = new XMLClass();
var localcolor:uint = prefs.color; (access the public variable color)

[code]....

View 2 Replies

ActionScript 3.0 :: Access Loaded SWF From An External Class?

May 3, 2010

This situation is rather tricky because I'm having to control movieclips/properties in both the Parent and Child SWFs.

The path I took was not to have a slave document in the loaded SWF as it was looking for all the library movieclips I was referencing in the Parent. I didn't know how to resolve that easily, so I decided to to refer to the Loaded SWF movieclips using an instance of the class onComplete[code]...

View 2 Replies

ActionScript 3.0 :: Access .fla Library From External Class?

Jun 3, 2010

I have a folder with my .fla, and a folder called "classes" where I stored all my classes. I'm trying to access a MC in the .fla file so that I reference it from one of those classes in the "classes" folder. for you visual learners...

Code:
<project>
project1.fla <- library here

[code].....

View 3 Replies

ActionScript 3.0 :: Access Library From External Class?

Oct 23, 2011

have an external class which controls about 400 buttons. But I want this class to also be able to show a Popup window. But this would mean I would need to access the Library.Within this library would be a MovieClip exported for Actionscript with the name PopUP.WITHIN the fla it's easy:PHP Code:va popUpWindow:PopUP = new PopUP();addChild(popUpWindow);

View 4 Replies

ActionScript 3.0 :: Access Main Class Function From External?

Feb 9, 2009

I'm quite confused about how to do it, look at this [code]...

View 2 Replies

ActionScript 3.0 :: Access Clip On Stage From External Class?

Feb 13, 2009

I've got a textfield on the main Fla called 'debug'i've created a Class which refers to the textfield, but when i launch my fla, it says:1120: Access of undefined property debug.

ActionScript Code:
package {
.....

[code]....

View 9 Replies

ActionScript 3.0 :: Access MovieClip From External Class File?

Jan 19, 2009

I am currently using an external Class file for an instance in my .fla project. It creates an instance of that specific class and has it carry out some functions.I want to access a MovieClip on the stage in the .fla file in the external Class file. How can I do this?For example, the Class file creates an instance of that class, and I want the x and y coordinates of that instance to be equal to that of let's say circle_mc. Now circle_mc is on the stage of the .fla file, and therefore cannot be accessed. How can I get around this?

View 5 Replies

ActionScript 3.0 :: Access An External Class In An Existing Fla File?

Dec 20, 2010

I have an Existing FLA file (It is my Project file) and I have downloaded one good example Class file with Fla. But there is no code at all on the stage just it is retrieving instructions from the Class. How can I use this class file in my existing fla file.

View 3 Replies

ActionScript 3.0 :: Access An Object That Has Been Made In A Class In An External AS Document

Sep 12, 2009

I'm using the following code to arrange indexes of objects on the stage the only problem is I can't access an Object that has been made in a class in an external AS document. if i go into the document and trace I can see it but i can't access it from the document class and arrange its index anybody have any ideas?

[Code]...

View 1 Replies

ActionScript 3.0 :: Flash - Access Player.x And Player.y From External Class?

May 8, 2011

I am trying to put together a simple game and have been doing really well until I decided I am going to have to create a new class to handle enemies.What I have so far is a player walking around on random terrains and I am up to the point where I have placed x amount of enemies on stage at appropriate times. I have written their class which will hopefully eventually handle their behavior and it outputs simple trace("BOO!").

Where I face the problem is that I obviously would like to make these enemies follow the player to attack. But when I try to access the .x or .y attributes of the player, it throws an error: 'call to a possibly undefined property with static type Class'?I have tried accessing the .x using the following ways (where badger is my player instance and Main is my class definition within the properties of the FLA):

Main.badger.x
Main(root).badger.x
Stage.badger.x

I have also tried to access other vars and still nope..My class code is this:

Code:
package
{
import flash.display.MovieClip
import flash.display.Stage

[code]....

View 1 Replies

ActionScript 3.0 :: Using An External Class To Reference Functions From Another External Class?

Mar 25, 2010

I have a Main.fla which loads Main.as as its document class. In Main.as I have a public function named "Main" which runs a trace. I also have another .as file called Preloader.as, which also has a public function in it, this one named "Preloader" with simple trace in it. I just cannot figure out how to use Preloader() from the Preloader class in Main() from the Main class. Main.as loads up fine when the SWF loads and traces.

View 10 Replies

Flash :: Access Object Property Or Function On Extended Class That Isn't In The Super Class?

Jan 29, 2012

If I have three classes:

public class Example {
public function Example () {
}[code]............

You can see that the two last classes extend the first one, and both have the 'variable' property. In case that I have an instance of Example and I am sure it is also an ExtendedExample OR AnotherExtendedExample instance, is there some way to access the 'variable' property? Something like

function functionThatReceivesAnExtendedExample (ex:Example):void {
if(some condition that I may need) {
ex.func()

View 3 Replies

Actionscript 3 :: Access Variables In Main Application Class From Instantiated Class?

Apr 8, 2010

I have a initApp.as which instantiates a class which needs to access the "currentState" property and the States array as well. However we cannot get this to work as we cannot see how we can access this information.

Within initApp.as currentState is accessed via "this.currentState". This does not work in the class which is instatiated within initApp.as. The following error is thrown:

"Access of undefined property currentState."

View 1 Replies

Actionscript 3 :: Access A Public Property From AvEniroments Class Through The Player Class?

Nov 24, 2011

I have the following inheritance structure:

var environment:AvEnvironment = new AvEnvironment(...);
addChild(environment);
environment.addChild(new Terrain());
environment.addChild(new Player());

I am trying to access a public property from AvEniroments class through the Player class, however I'm getting an undefined property error (#119). I've tried the following:

this.x = AvEnvironment.xs // public property in this class
this.x = parent.xs

I've also tried something like this:

var ev:AvEnvironment = AvEnvironment(parent);
this.x = ev.xs

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

View 1 Replies

Actionscript 3 :: Access A Displayobject On Stage In A Class That Is Not A Document Class?

Mar 7, 2012

How to access a display object on the stage in a class which is not a document class?

I am looking for a solution that doesn't involve passing the stage as a parameter to the class.

One solution i always come across is using "TopLevel.as". Is it a good method because as far as I have heard using global variables is not recommended because it might cause some problems while working on big projects.

View 1 Replies

ActionScript 3.0 :: Access The Stage Property From A Different Class That's Not The Principal Class?

Jul 2, 2009

I was wondering how do you access the stage property from a different class that's not the principal class tied to the fla? Essentially, I have main.as which calls another class menu.as, and I can't seem to be able to use the stage.stageWidth property from menu.as. What's the proper way to be able to use the stage property from any class? Do I have to import it separately each time?

View 2 Replies

ActionScript 3.0 :: Flash Access TextField From Class Imported By Doc Class?

Aug 17, 2010

I'm just now learning the new object oriented way of scripting. It's been a wild ride, but I've finally learned how to keep script off my frames (very hard coming from as2).Here's my problem:

I have a TextField on the stage in my main .fla file named loadPercent.

I'm loading a jpg with preLoad.as and displaying the bytes loaded in loadPercent.

I can access my loadPercent TextField from my MainClass

but I can't access it from preLoad.as

the document class is MainClass.as

Code:
package
{
import flash.display.MovieClip;[code]....

I get three '#1120 access of undefined propery' errors for each time i try to access loadPercent.

a few basic questions: 1. all my files are in a folder in my documents, not in the flash directory, is this bad? I've seen people using com.whatever etc.

2. my main .fla file does not share the same name as my MainClass.as (it's not named MainClass.fla) Is that a problem?

I'm assuming these are inconsequential because my code seems to work up to a certain point.

View 7 Replies

ActionScript 3.0 :: Access A Movieclip On Document Class From Another Class?

Mar 3, 2011

Going further on my app, I felt in another problem. Despite having lots of posts on the web regarding this, none of the solutions worked for me In my document class (Main.as) ve two containers. One empty and another with a star that is being imported from the library. Here´s the main class:

package
{
import flash.display.*;

[code]......

View 4 Replies

ActionScript 3.0 :: Access Function At Main Class From A Sub Class?

Mar 3, 2011

My first experience is build an aquarium with a lot of fish swimming, and they can be clicked. When one of them is clicked we should receive a trace message saying ("I�m a Fish!"). To do this, I thought that the best way will be:

1- create a document class, named Main.as

2- create a base class, named Clicked.as

2- create a movie clip with a fish.

3- export the movieclip to actionscript. In the mc properties set Class as "fish" and Base Class as "Clicked".

View 6 Replies

ActionScript 3.0 :: Possible To Extend Class W/o Access To Class Code?

Feb 3, 2010

Say you were importing flash.events.KeyboardEvent and you wanted it to extend the MovieClip class, is this possible? Where you dont have access to the class to just type "extends XXX"

View 14 Replies

ActionScript 3.0 :: Access A Function In The Main Class From Another Class?

Mar 1, 2010

i have a game that i want to put load screen on, which i created a separate class for. first the main class is initialized and in the constructor function, it does an addChild(loadScreen) which places an instance of the loadScreen MC on the stage. within the loadScreen is a "Play Button" that when a user presses this button i want it to continue startGame in the Main class. the way i tried it was Main.startGame from the loadScreen class, but that obviously does not work. is it possible to call a function from a different class.i have three files:

Main.fla
Main.as
loadScreen.as

the Main.as file:

Code:
package
{
import flash.text.*;
import flash.display.*;

[code]....

View 3 Replies

ActionScript 3.0 :: Creating A New Instance Fails When Base Class Is Assigned To An External Class File?

Jul 22, 2009

I'm trying to create a new instance of a MovieClip when the original one has been used. Would sound easy enough. Just use: var

instanceName:ClassName = new ClassName();

the class name/mc in the library im trying to duplicate is MCg1 so

var instanceName:MCg1 = new MCg1(); right?

However, the particular object in the library i'm trying to duplicate has a base class that is an external class file (just to control it's drag drop functionality)... i.e baseclass is not set to the standard flash.display.MovieClip, or whatever the case maybe. So i end out with a: TypeError: Error #1009: Cannot access a property or method of a null object reference.

View 6 Replies

ActionScript 3.0 :: Loading External Swf Which Attached With Its Own External Class?

Jun 27, 2009

Lets say I have Main.swf and sub.swf, and I wanna load sub when I press a button from Main, but sub.swf has its own external class file attached, so here is the problem, when I load sub using loader class and I would get this message from the output panel:

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

seems loader class can not access sub.swf's external class when sub is being loaded.

View 1 Replies

ActionScript 3.0 :: Access Values Held By A Class Instance From Another Class Instance?

Oct 14, 2009

I have to admit I pretty much ran away from Flash when AS2 came along and only used it for animation purposes over the last 5 years.So I'm having a major crash course in AS3 in Flash CS3 and I'm not enjoying it one bit. I'm getting maybe 10mins of finished work per hour as I try to figure out the limits and rules of AS3. Quite often it seems that AS3 simply can't do what I want it to. Anyway: Characterchecks.as is the main class and it loads a bunch of XML into four arrays. The file starts like this:[code]If I trace the value of, say, cc._Categories from the main FLA, it's empty. I'm guessing that the next line of AS in the main FLA doesn't wait for the previously called function to complete? (This may tie in to my next problem)My next step is that I want to display various things based on the data in the array. I have another class, Display.as which will hold all the functions to create the items on display. I thought it would be best for these to be a separate object. I wonder if I'm right?

So I declare an instance of Characterchecks in the main FLA and call it cc, and then run the functions to populate the arrays... Now I create an instance of Display and call it cd. How can I get functions in cd to see the values of the variables in cc? And if the main timeline can't tell that the functions aren't finished filling the arrays, how is cd supposed to know?I might be asking dumb questions, or maybe I'm doing things ***-backwards, I don't know. I'd appreciate any help, I really would. This whole thing has me at the end of my tether... being the most technically advanced person in my circle of co-workers and web design friends means I have no-one to explain why things need to be done a certain way or what the best way is.

View 3 Replies

Access Class Object In .fla?

Mar 12, 2012

I have tried for days to solve this. I am trying to access the "newsData" object from my .fla to populate my manually created textfields.

Here is the class:

package {
import com.adobe.serialization.json.JSON;
import flash.net.URLLoader;
import flash.net.URLRequest;

[code]....

View 9 Replies

ActionScript 3.0 :: Access Var In Class From Outside Of It?

Apr 21, 2011

I have a movie clip called "House" on the first frame of the movie clip there a text box with an instance name if "Hp_txt". the House has a class called "House" and that class has a public variable called "Hp" that will change depending on whats happening at that point in the movie clip.

How can i get the Hp_txt text to display the Hp var. P.S. Hp_txt isn't really textbox. I made it with the text tool and it's type is "TLF Text".

View 7 Replies

ActionScript 3.0 :: Access Mc From Class?

Aug 18, 2011

I have a mc in a stage instance name is "ball_mc" and mc in library, it's name is "box".

Now I need to access both the mc's. Without giving the class name in the property panel..

View 0 Replies

ActionScript 3.0 :: Can't Access Var From Within Class

Sep 9, 2011

i m having trouble with a private var within a class. the class is composed of 2 methods, one public one private. while in the private method i can access my var, the same code in the public one gives me error #1009.

[Code]....

View 7 Replies







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