basically i want to be able to load different button.swf files, like button1.swf button2.swf etc and assign them a class so the class handles all the default behaviour of the button. This is for skinning purposes. I want to be able to load a button.swf file into my main movie ( the button.swf has no actionscript in it at all, just the graphics ) and then make it an instance of a existing class like for example button.as . the clips are not in the library so i can not specify the class in the linkage properties. It has to be loaded externally.
I am loading an embeded swf file with SWFLoader using actionscript 3 in Flash Builder 4.5. When I load this swf and set "wmode" to "transparent" in HTML, it works as expected and you can see the background color through the swf object in HTML.
However, when I load the swf in Air with the following code:
[Embed(source="swf/data.swf")] var data:Class; swfLoader = new SWFLoader(); swfLoader.percentWidth = 100;
I have one Swfloader. This swfloader loads file A.swf.On creationComplete event, File A.swf loads another swf(file B.swf).
Everything works fine when I run the application once in the same machine.But when I run two or more instance of the application, the first works fine (both file A and B are loaded) but the second swf (file B) is not loaded by file A.why the first swf (file A) doesn't load file B, when the application is running in multiple instance ?
I have a movieclip instance named 'placeholder' on the canvas, and I want to change the alpha of the named movieclip from it's class without effecting the alpha of all the movieclips of the same type. How would I specifically target the named movieclip instance that is on the canvas?
I've created a Flash Animation (CS5, ActionScript 3) and converted it to SWF. The flash animation needs the values of 3 variables (defined in the swf timeline) BEFORE it starts running in my Flex application. I've embedded the swf file using swfloader in Flex, but I need to pass the parameters from Flex into Flash before the animation starts. How do I do this?
The way I have my flex code setup below, the variables are not being updated. I get an exception every time it gets to the changeParams function because it can't find "Type", "Num1", etc.
Part of My flash code:
//These 3 variables need to be populated via Flex BEFORE the animation starts... var Num2:int; var Num1:int;
I have a swf file sample.swf which has its actionscript class in Main.as. This Main.as has various objects declared as public in it. For instance lets consider an object myData of class MyData (in MyData.as).
I am loading this swf file in my AIR app using swfLoader. I want to know how do I access myData.func() using swfLoader.loaderInfo.content.
Is it possible to automatically assign an object to a class during testing project? I know you can do so by assigning in a movie clip's property the identifier but I need to know if I'm say creating a game, and it gives the user the ability to choose a player, I need that player/movie clip that the user chose to be assigned to a specific actionscript class.
I understand how to tell Flash that a preexisting symbol in the library should belong to a certain custom class, but how do you do this when creating movie clips w/ createEmptyMovieClip?
i am currently having a scenario where I have a Container class and wish to extend it's capabilities to TabContainer and SliderContainer. Both the component are using the same swf file.
Can I define a linkage for the movieclip in library using Container and change it to TabContainer dynamically through actionscript? How?
What is the best method to add a listener to a movieclip in a class file? I created a loading animation on the main timeline and I tried making it into a class. I can get all the graphics drawn and placed, but can't see to figure out how to add the listener in the class.
How you can assign a class to an object on stage.[code]...
This would make a new object, but the current object already exists, it just needs to be notified that it's of the type "ClassName" so it can inherit it's properties.I've also tried assigning the "ClassName" in the linkage as either the base path or the class name. But in either situations I get an error saying that the class needs to be unique when I use the same class on multiple objects.
possible to create a movieclip and apply it to a class file that you could make? I mean...When you have a movieclip in the library in flash and have it be exported for actionscript...is it possible to do this for movieclip made in actionscript?
Does flash have an equivalent to Flex'sApplication.application.[insert application method or propertyI want to get access from an as3 class file to the mainstage. a call to this.root from the stage to the class will notwork because I need the root object stage to execute an addChild
I have a Bullet class - which defines and controls the firing of bullets (and works perfectly in all ways) - and now I'd like to add to it the ability to detect if it has hit a spaceship-movieclip sitting in my main .fla's timeline - what's the proper syntax to do this?
here's my code:
Code: public function moveBullet(e:Event): void { this.y = this.y - 20; // moves bullet up-screen, shooting vertically if (this.y <= 0) {
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?
what I'm trying to do is store a movieclip inside each array element using a for loop.However, I have 2 movieclips to choose from and I want the movieclip to be randomly assigned to each element in the array.Here's what I have so far but the syntax is obviously wrong:
Code: var enemyArray:Array = new Array(); var randomEnemyNo:int; var noOfEnemyMC:int = 2;[code].....
I am new to AS3 and, I am just trying some simple(maybe) functions. Is it possible to assign values to a movie clip? I have three buttons and I want each one to have a value (1, 2, and 3). I tried var buttonOne = 1 and I get this error "ReferenceError: Error #1056: Cannot create property buttonMode on Number." How do I assign a value to a movieClip(if possible)?
for (var j:Number = 0; j<myObj.rows; j++) { var clip:String="clip"+j _root.re1.reel1.clip.loadMovie("images/jackpot/"+display_array[j*5]+".jpg");} This is my for loop and my movieclip path is _root.re1.reel1.clip0 to _root.re1.reel1.clip3 So how can assign clip no?
Instead of posting my entire files and such, I'll make a brief example of my situation and my desired outcome.My files consist of my document class entitled Engine.as and another class Abilities.as all within the same folder.On my stage I have a MovieClip with the instance name of item1_mc. On its personal timeline I have 2 frames, one entitled "inactive" and the other "active". Here's a sample of very similar code....
Code: package { import flash.display.MovieClip;
[code]....
How do I access item1_mc? In reality I have 6 different clips and I desire to access much more than frame changes...what's the overall best way to be able to interact with an item placed on the stage via an external .as file that is not the document class?