ActionScript 3.0 :: Refer To A Movie Clip From An As File?
Apr 13, 2010
i have some thumbnails and a holder on the stage(all are movie clips).clicking on each thumbnails will load an external swf in holder mc.I have made a class for thumbnails,but dont know how to refer "holder mc" from that class, to load those swfs?
View 4 Replies
Similar Posts:
Feb 8, 2011
I am attaching one Movie Clip to another using addChild [code]...
The problem is that when I use MovieClip(parent).mc2 the flash assumes that I call the stage, while I want to call the mc1.
I use only a document class file for this project (not object-oriented approach)
View 2 Replies
Nov 18, 2009
I am writing code in a MovieClip and want to refer to another MovieClip that shares the same parent.it'll be MovieClip(parent).theOtherMovieClip.But I want to refer to the MovieClip using the current MovieClip's instance name + "txt." This was my guess at the code, but it doesn't work.
MovieClip(parent).MovieClip(this.target.name+"txt" )
This didn't work either
MovieClip(parent).this.target.name+"txt"
View 1 Replies
May 14, 2009
I've made a very normal animated pop-up menu for my flash website, i now want the items that show up to refer to the main timeline, i'm kinda puzzeled on this one, because i dont want to store all my content inside the movieclip (that was my first solution)
View 5 Replies
Jun 25, 2009
I had attach a few movieclip in the main stage by using addChild() method. If I going to refer back to them inside other movieclip, How can i do so..
For example,
//attaching at the main stage
var earth1:MovieClip = new earth()
addChild(earth1);
[Code].....
How can I refer back this Movieclip from other movieclip's timeline?
View 1 Replies
Oct 27, 2010
how do we refer the submenubutton which hasbeen masked inside a movie clip.
In my code ,
mainBtn3 is present inside "mm " movie clip . and on click of it I am able to move to another frame using below code . But, if there is a sub menu for the button , and if I am referring it as below [mm.btn3sub1] and trying to move to another frame . I am getting following error
TypeError: Error #1009: Cannot access a property or method of a null object reference. at sumiyatried12356_fla::MainTimeline/frame1()
[Code]....
View 1 Replies
Jan 25, 2010
I just wonder that how can i write this code that means if the "specific" button is clicked(i mean if the homebutton is clicked=true) like this.. and how can i refer a button that in main stage while in an another clip's substage..
View 1 Replies
Jan 25, 2010
I just wonder that how can i write this code that means if the "specific" button is clicked(i mean if the homebutton is clicked=true) like this..and how can i refer a button that in main stage while in an another clip's substage..
View 3 Replies
May 25, 2011
what i have is a sub folder with a swf file... i need the .swf file to refer to a file at the main folder... how can i do that? my structure is like this:
[Code]....
View 1 Replies
Jul 7, 2010
how to pass variables from one Movie clip's AS file to my Main AS file. Let say my Movieclip's AS file is calling damage = 1; so how the Main AS file retrieve the damage value from the Movieclip's AS?
Code:
public class robotMC extends MovieClip
{
public function robotMC()
{
[code]....
View 5 Replies
Feb 17, 2010
I have to build one MXP package for Flash (not Flex). But i have multiple components, somthing like HelpSymbolMovieClips(have its on class), one image holder. etc. I need to combine there swc file into a single MXP file.How can i make a all these multi movieClip functionality in a single SWC file. Am bit confused about the structure of the component which is having multiple functions/MoiveClips. like (Image gallery components.
View 1 Replies
Nov 30, 2010
I am working on a project which there are two .swf file play side by side simultaneously. I need to use one of the file to control the animation in another file.
If they are in same .swf it should be easy. I can just use:
gotoAndPlay("frameNumber")
but there are two .swf now. (lets say movieA and movieB) I think I should use something like:
"LinkToMovieB".gotoAndPlay("frameNumber")
"LinkToMovieB" should be the link to movie clip in the movieB file.
my problem is how do I get the link to movie B's movie clip. or there is other proper way to do this task.
View 1 Replies
Nov 22, 2011
I have a main swf file that is loading multiple external SWF file when a menu button is clicked. Now I want to target a specific swf file to add an extra child from library or from another swf when that specific swf file is loaded. How should I do that? What should I put within the if statement?
var newswf:URLRequest= new URLRequest("./swfs/"+ event.target.name +".swf");
loader.load(newswf);
addChild(loader); //loading swfs dynamically
[Code].....
View 2 Replies
Jun 25, 2009
I have a movieclip on stage, but I want to move it or animate it with the use of an .as file, how do I refer to a movieclip on stage through a .as file?
Is this even possible or do I have to pass the actual movieclip as a parameter to a function of the class?
To make things more clear, here is my code:
Code on main timeline:
Code:
var myBox:Box = new Box();
myBox.x = 80;
myBox.y = 160;
[Code].....
View 2 Replies
Oct 25, 2011
Way of referring to all the movie clips on the stage at once, and of putting that information into a variable for use with hit detection.
View 3 Replies
Nov 30, 2010
I am working on a project which there are two .swf file play side by side simultaneously. I need to use one of the file to control the animation in another file.
If they are in same .swf it should be easy. I can just use:
Quote:
gotoAndPlay("frameNumber")
but there are two .swf now. (lets say movieA and movieB)I think I should use something like:
"LinkToMovieB".gotoAndPlay("frameNumber")
"LinkToMovieB" should be the link to movie clip in the movieB file.
how do I get the link to movie B's movie clip. or there is other proper way to do this task.
View 5 Replies
Feb 24, 2010
Is it possible to refer to a variable in a class file separate from the one you are working in? Say Class1.as had a variable named "exampleVar", and in Class2.as you wanted to put something like "exampleVar++;". Is this possible and if so how would it be achieved?
View 1 Replies
Aug 13, 2009
im trying to understand the code and how it works in building a preloader i have seen there are alot of tutorials but im not fully understanding some of it so i thought better if put 1 statement at and the areas i am unclear on
th first part im not clear on is the number of kilbytes in the movie do write it in the varaible as below .....
var numValue = 100;
var getBytesTotal ; //= the movie maybe is that possible
var getBytesLoaded;
// if kilobytes loaded is less than the number of kilobytes in total ////
///move the preloader forward upto NumValue of 100 ;
[Code].....
View 2 Replies
Aug 21, 2009
so i finally decided to jump to as3 from as2! (yes, it took me some time XD) I have a better understanding of as3 after reading tutorials, however i have a problem/doubt: I have 2 movieclips on my main timeline with the name of the instances: OBJ_1 and OBJ_2. both have animations. OBJ_1 has a stop on its 1st frame; OBJ_2 has an action in its last frame:
[Code]...
View 9 Replies
Jul 10, 2011
What I want is: when the "hero" touches an enemy, all enemies should be removed. The problem is that when the hero touches an enemy it only removes that enemy. This only happens when its inside of an "if" condition. I made another example using buttons and worked perfect. let me show you the examples: in this case I made a button to create some movie clips inside an array:
ActionScript Code:
i = 0
myArray = []
boton1_btn.onPress = function(){
[Code]....
in the dieEnemies() function it only remove the one enemy the hero is hitting. What should I do to make all enemies being removed?
View 4 Replies
Jul 23, 2010
How can I copy a movie clip from one .fla to another .fla file?
View 2 Replies
Feb 5, 2009
I am loading an swf file in a movie clip.After loading the swf file,when i try to trace the width of movieclip. i am getting the width as zero.why it is like that.actually the movieclip contain swf file.
View 5 Replies
Jul 15, 2010
I am working on a site i want to add music to and plan on doing it via a external flash file. The external file works great but i can not get it to import into my main movie. I want to load it into a movie clip so that it is in a specific position and resizes, floats, etc.
i want to import it into a movie clip called "player" and i want it to load when on the frame entrance.
var page_loader:Loader = new Loader();
player.addEventListener(MouseEvent.CLICK, goToContact);
function goToContact(Event:MouseEvent):void {
[Code]....
View 4 Replies
Jul 16, 2004
i need script and some instructions how to: display my movie file_name in example "movie-1.swf" or just "movie-1" inside of my movie-1.swf in the text field or something ...
it is my movie own file name but not writen directly by me from keyboard but writen by script so if i change file name it will be updated automaticly in the movie after movie is reloaded so file movie-1.swf renamed to movie-2.swf will display text "movie-2swf" or just "movie-2"
View 2 Replies
Feb 18, 2010
I am rearranging a flash by adding more picture. By default it was 8 pictures but I want to add unlimited number of pictures on XML file and want to load them in Flash. The XML file is parsed into an array (code provded below). I can not figure out the problem as the flash shows only the default 8
pictures, not showing the additional pictures that i have added. I was hoping someone here can help me in taking the parsed XML file and help me load the image
into the movie clip. Also I want to redirect all the Rotate Picture (3d-carousel-menu) links to the Flash
picture showing state. I mean all the carousel-menu links will be linked to image showing stage.[code]...
View 0 Replies
Aug 12, 2011
I am trying to control a movie clip from the main fla file.
Explaining below:--
I have a main file with menu/navigation.
In another swf file which is loading on the main fla file.
In the another swf file I have a moviclip for example sq1. and I have write the code:--
test2.sq1.visible=false; which is by default value.
when this load in main fla file on the click of a btn I want to visible sq1 I write the code like this way:--
MovieClip(this.parent.parent).test2.sq1.visible=tr ue;
the swf is loading in holder moviclip.
But when I clik on btn the swf is loading but the movieclip is not visible.
View 2 Replies
May 3, 2007
I am trying to build an XML Driven Drop Down Menu similar to the one detailed in the tutorial in The difference is that instead of the menu item taking the user to another website I want it to launch a swf file in a movie clip. Basically, what I'm trying to do is build a training application where the user clicks a button (created from the XML file) and it starts a movie in a movie clip. Seems simple but I haven't been able to find anything on it. All the tutorials involving XML menus have the buttons launching URL's.
View 7 Replies
Aug 11, 2011
I am trying to control a movie clip from the main fla file.I have a main file with menu/navigation. In another swf file which is loading on the main fla file.In the another swf file I have a moviclip for example sq1. and I have write the code: test2.sq1.visible=false;when this load in main fla file on the click of a btn I want to visible on I write the code like this way:-MovieClip(this.parent.parent).test2.sq1.visible=tr ue;the swf is loading in holder moviclip.But when I clik on btn the swf is loading but the movieclip is not visible.
View 2 Replies
Sep 16, 2011
i've been recently working on a game, which based on stills pictures. now, i've made a panoramic 360 swf file using PANO2VR. i've loaded the file into a movie clipe in flash using this code:
loadMovie ("1.swf", ir);
and nothing happened.
View 2 Replies
Aug 27, 2009
So as to make things less confusing (I had a lot of different layers), I made each scene in my animation in its own file. Now I want to put them in the same file, so I thought I could make everything in one file into a movie clip and put it into another file that way.
However, it doesn't seem to work! I can highlight everything, convert it, and paste it into the other file... but when I paste it, it only pastes the first frame of my highlighted selection! How can I convert the whole thing into a movie clip instead of just one frame?
View 5 Replies