ActionScript 2.0 :: Addressing Class Variables Which Are Movies?
Sep 1, 2006
I'm having a bit of a problem with this. I have a class- MiniMap which extends the MovieClip class.This class has a variable which is itself a movieClip, this movieClip is a small window which can be moved around on the map to select which portion of the miniMap will be shown in the bigger map.
How do I refer back a events on the class variables to effect the host class?
[Code]...
View 4 Replies
Similar Posts:
Sep 30, 2004
I am trying to make some way of addressing a movieclip but I want it to be able to change. I have a for loop which is creating a new movieclip instances until it is equal to or less than my arrays length. Well it makes all these and it names them test0 test1 test2 test3.. and so on. Now I am trying to write a loop that address all of them, the only problem is I dont know how to use a variable to address them, or some work around to do so.
View 3 Replies
Feb 19, 2004
I want to know how I can pass parameters between 2 swf files..
View 7 Replies
May 29, 2002
I'm trying to do a demo with a fastforward button and a rewind button that will go to the next scene and previous scene...however, due to the format that my predecessor created used...I'm stuck with alot of scenes. The navbar (ff and rewind buttons) is in a .swf file called main. The actual demo is in demo3.swf. I created a loader scene to redirect to the correct scene (when ff and rewind are hit), how to pass the variables needed from the main movie. What would be the correct syntax or steps?
View 11 Replies
Feb 19, 2004
I want to know how I can pass parameters between 2 swf files..
View 7 Replies
Sep 4, 2002
I have been receiving great help for the past few days on many different things, and now I have another issue. I am creating a form in an SWF that pops up in a window over my main site. Is there a way to pass the information that the user submits in that form to my main movie? Or will I have to embed the form movie into my main movie? Is there a tutorial dealing with this? Also, since I'm asking, is there a way to save information to a text file using ActionScript or Flash, or whatever? I was thinking the other thing I could do would be to save the information in a text file, then dynamically load it in a text box on the main site.
View 1 Replies
Jul 7, 2002
I subscribe for this forum becausethis r the actions i have in my level 1
on (rollOver) {
startDrag (this, false, 250, 270, 750, 520);
Mouse.hide();
[code].....
View 7 Replies
Jan 11, 2011
I am loading various movies into a "shell"movie as and when they are needed using loadMovie... However I have one movie which I am loading in to the shell "holder" movie which is supposed to load in variables from a php file. Now when this swf file is run in the browser outside of the shell, it loads in all the variables just fine. The loadVariablesNum command loads into "0" the root timeline, but when I run the shell and navigate to the swf file, none of the variables appear.I am guessing I need to load the variables into 'this' movie, but I have tried that by using the complete path...
_root.holder_mc.loadVariablesNum("scorevars.php"," post");
But this doens't pick up the vars. My problem is I am not fully understanding the relationship between swf's loaded into each other and how the timelines interact...
View 1 Replies
Dec 23, 2002
Basically I have a button which can be clicked to load an external movie, the external movie loads an ASP script.Dependent upon the button clicked I want to be able to execute different SQL statements.
View 4 Replies
Feb 24, 2004
I am loading various movies into a "shell"movie as and when they are needed using loadMovie.However I have one movie which I am loading in to the shell "holder" movie which is supposed to load in variables from a php file. Now when this swf file is run in the browser outside of the shell, it loads in all the variables just fine. The loadVariablesNum command loads into "0" the root timeline, but when I run the shell and navigate to the swf file, none of the variables appear.I am guessing I need to load the variables into 'this' movie, but I have tried that by using the complete path _root.holder_mc.loadVariablesNum("scorevars.php"," post");My problem is I am not fully understanding the relationship between swf's loaded into each other and how the timelines interact.
View 5 Replies
Apr 14, 2002
I have two movies: m1 and m2. In m1 I set a variable to variable="yes". Now, I want m2 to read the variable and do an action depended on the variable (see the example below).
This is the AS in m1:
on (release) {
docufield = "background.txt";
}
And this is the AS in m2:
this.loadVariables(docufield);
View 7 Replies
Feb 24, 2004
Scenario:I am loading various movies into a "shell"movie as and when they are needed using loadMovie... No problems there.However I have one movie which I am loading in to the shell "holder" movie which is supposed to load in variables from a php file. Now when this swf file is run in the browser outside of the shell, it loads in all the variables just fine. The loadVariablesNum command loads into "0" the root timeline, but when I run the shell and navigate to the swf file, none of the variables appear.I am guessing I need to load the variables into 'this' movie, but I have tried that by using the completepath..._root.holder_mc.loadVariablesNum("scorevars.php"," post");But this doens't pick up the vars. My problem is I am not fully understanding the relationship between swf's loaded into each other and how the timelines interact.
View 5 Replies
Nov 16, 2003
is it possible to pass variables between flash movies...
i.e. if you had 2 (or more) seperate flash movies in an HTML page, can you control one with the other?
View 2 Replies
Apr 7, 2009
I want to send variables between flash movies on different machines. How can I go about doing something like this?
View 4 Replies
Oct 14, 2002
I have a movie which is made up:
Level0= my interface layout with buttons
Level1= the different sections of the site, are loaded into this level (eg. home.swf, aboutus.swf etc.)
Because each of these sections has both an 'in' and 'out' transition, i want to use variables (on the buttons) to control these external movies that are loaded into the main movie (im even starting to confuse myself
basically in a nutshell... can you use buttons which control a movie ,which has been loaded at another layer, using variables....
View 1 Replies
Feb 21, 2003
Does anyone know of a good way to pass variables between flash movies on different html pages? Should I use a flash cookie? pass the variables in the URL of the html file and then try to get them back out on the next page?
View 3 Replies
Jun 23, 2009
I'm new on AS3, I'll try to explain what my project consists: Well, There is a main.fla and It loads external movies triggered by button items. The content animation sequence introduction starts with tweenLite and fills the stage with elements from Library (movieClips, buttons) and some sprites. I've built the intro animation through actionscript. Perhaps I'll need to explain how I did it the TweenLite structure, but the code lines are too long
The transitions / navigation:
Each button before load the external movie has a respective animation that removes the other buttons from the stage. It triggers an "outro" animation and then loads the External Swf.
First:
Each external Swfs contains a removeChild action in a MovieClip that CLOSES and removes the movie.. Like a "pop up" with a close action. After closed It should replay the intro animation and replace the buttons in the stage but it's not happening because I don't know how to communicate between different timelines / external movies.
View 1 Replies
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
Sep 20, 2009
I am creating a Weapon class for a game and the weapons itself will be the sub classes. The sub classes will hard code some values (such as max ammo and the weapon name).
I trying to access this declared data in the base class constructor, at the moment it's not outputting the values. Is this possible?
I've broken my Weapon class for simplicity:
ActionScript Code:
package
{
import flash.display.MovieClip;
[Code]....
My current workaround is creating a protected method in the base class to trace the information and calling that method in the sub class's constructor, this works fine but this doesn't seem like the most efficient technique?
View 7 Replies
Oct 16, 2009
Now I would like to use the variable out of class1 in class2 and change the value there.Afterwords use class2 in the main, but I get an error message. Why?
ActionScript Code:
//class No. 1 "MyClass1.as"
package MyPackage
[code].....
View 3 Replies
Apr 28, 2010
What is the correct syntax to initiate a function in a class similar to constructing an associative array? I have a function that's custom variables is ballooning out and I'd like to label them in the call for sanity sake.
currently:
myClass.myClassFunction("hello world",999,0xff0000);
desired:
myClass.myClassFunction(myText:"hello world",myNumber:999,myColor:0xff0000);
and the class itself for reference:
class com.myClass {
public var myText:String;
public var myNumber:Number;
[code]....
View 6 Replies
May 2, 2006
[Code].....
Ok- so the idea is that when you click a button it plays the movies assigned to the variables gallery & button to the frames mentioned. Then the variables are changed and then when another buttons is clicked it does the same - 'except it doesn't - it does it once then sits there I have to use variables because there's a lot more buttons..but i don't understand why it doesn't work - it seems such a simple and obvious thing to try and do - why is it so HARD???
View 14 Replies
Jun 23, 2010
Is it "better" to initialize AS3 class variables in the class constructor? Or can I just initialize them to their default value when I declare them at the top of my class? I ask because when there's a lot of class variables, it appears inefficient to declare them in one place and then initialize them in another when I could easily do both in the same place. It one option is better than the other,
[Code]...
View 2 Replies
Oct 4, 2011
0: Its not rocket science, but my surname aint Oppenheimer either so... read on if ou dare.
1: this is my third attempt at mastering OO and flash CS5 so, i hope we can all have a laugh after.
2: In short.. I added a 64x64 tiled movie in flash. Read it out in an array, in a.. well original way(just to see if i could get it to work so stop lauging already), and tried to recreate them using a flash class.
2a: The recreate class works but shows the Tiles in a random order, every time a new one?! this is what happens..
[Code]...
View 5 Replies
Jan 16, 2007
I have an intro.swf file that is basically a movie with sound that is exported for actionscript but not exported in the first frame. I just stuck it in a movie on my timeline and it works great and the preloader works because it doesn't load the sound before the preloader. I use :
musicSound = new Sound();
musicSound.attachSound("music");
musicSound.start();
to play the sound in intro.swf.
However, now this intro.swf gets loaded into an index.swf and everything works fine and the sound plays as long as I have the sound included in BOTH the intro.swf and the index.swf and the sound is exported on the first frame in the index.swf. I was hoping I could remove the sound entirely from my index.swf since it already loads into the intro but so far
View 9 Replies
Oct 25, 2005
I have been having trouble creating a movie clip with a reverse rollover effect within a movie which has a reverse rollover effect. that sounds confusing
In essence I wish to create a panel that rolls out on rollover and rolls back in reverse when the you rollout. I have done this using this script
[Code]...
However I wish to make movies within this movie that have the same effect on them. But when I create another movie or button within this movie it is not registering on rollover. I guess because the script on the main movie overrides it?
View 2 Replies
Nov 18, 2009
I've been modifying some code I wrote a while ago that simply loads and plays an external FLV. The original code works well as I can simply copy the swf into any folder and when run, it will play the FLV with the given name in that particular folder.
I decided to have a photo still over of the movie before it plays, so I modified the script and 'loader' to put in the external Jpg. If I test the swf it works fine. But when I install the code from a sub folder into a webpage via 'object', the Flash file trues to find the photo in the webpage folder not the sub folder where the swf originates and where both the FLV and jpg are?? Both the FLVplayback and Jpg loader address in the same way in 'parameters' of properties, yet the FLV plays and the jpg won't. I only discovered what exactly was happening on a hunch and copied a different photo into the main web page folder with the same name.
I have also rewritten it a completely different way using movieloader, but got exactly the same results. I know I could put the full web address of the jpg into the parameters, but then I have to modify it every time I use it. I'd really like to be to simply copy it into another folder.
View 3 Replies
Jan 9, 2003
I was wondering what you put in for addressing the duplicate MC?
View 10 Replies
Nov 7, 2004
I have the instance 'CONTENT_ldr' on the main timeline. Now I need to load an swf into it using AS when I press on the 'Illu_mc' button placed in my HomeMenu_mc.
Heres the script I have placed in my HomeMenu_mc:
this.Illu_mc.onRelease = function() {
this._parent.CONTENT_ldr.contentPath = "ILLUPROJ.swf";
};
View 6 Replies
Jun 11, 2009
I imported the flvplayback component on-stage in one frame and gave the instance a name of hv.If a button takes the movie to another frame, how do I pause the flv at that point
View 1 Replies