ActionScript 3.0 :: MovieClip Name Inside Other MovieClip Compiler Error
Mar 17, 2010
I have a movieClip called "mcUnitedStates" inside another mother movieClip.
I have two instances of the mother movieClip. One entitled "mcWorldMapTop" on its own layer and the other entitled "mcWorldMapBottom" on its own layer.
I thought having two instances of the same movieClip and applying different filters to the mcUnitedStates movieClip in each.
Error I get is: Access of unidentified property mcWorldMapBottom
I'm doing this because the colorTransform is making the glow the same color as the colorTransform instead of the color I want the glow to be.
I am getting a Compiler error with this code:
stop();
//
import flash.display.Sprite;
import flash.filters.GlowFilter;
[Code].....
View 5 Replies
Similar Posts:
Jan 25, 2012
I have a Button that is inside MovieClip1 which is inside MovieClip2; yet when i click the Button it doesn't dispatch Event.
View 5 Replies
Aug 25, 2010
My buttons work fine in the main time line, but I need to place them in frame 1 of a mc_pages, I get an error about it saying "the statement must appear within on/onClipEvent handler". And I just can't figure out how to do that to save my life. If pc's were cheap their would be a pile of them outside on the curb. I'm thinking I need to split up this action and place some on frame 1 of the main time line and keep some for for my button on frame 1 of pages, but what part? how?
My button loads a new swf in the mc placeholder.
btn01.onRelease = function () {
// let's first unload the current movie, to refresh the cache
(placeholder.unloadMovie());
// SETUP THE MAIN VIDEO PLAYER
autoPlay = "true"; //
autoLoop = "false"; //
[Code] .....
View 9 Replies
Mar 18, 2009
I'm trying to place an instance of a movieclip (instance name: tehMovieClip) from the library within another movieclip (instance name: parentMovieClip) on the stage. tehMovieClip, the movieclip going inside another movieclip, belongs to a class called CollisonDetection (linkage properties, class:CollisonDetection, Base Class: flash.display.MovieClip). When I put tehMovieClip inside parentMovieClip, I get this runtime error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
If I just place tehMovieClip on the stage by itself, it works fine but I need it to be inside parentMovieClip.
View 6 Replies
Apr 17, 2010
I am trying to activate a rollOver-function when the mouse rolls over a movieclip inside of a movieclip.On the main window (root), first you rollOver a button where a window shows up with more options (movieclips).From stage, my first movieclip is called "catapultas_read_more" which leads to amother movieclip called "pic1_mc". The label that is going to play when mouse over on pic1_mc is "rollOn".I tried this.gotoAndPlay("rollOn); directly inserted to the movieclip, but the movieclip inside pic1_mc never starts
View 8 Replies
May 4, 2011
I have the scenario below. I have a movieclip on the stage (root). Inside this movieclip I have a frame with the action below:
_root.MCHappy.visible = false;
_root.MCSad.visible = false;
_root.MCNormal.visible = true;
I cant get this working with AS3. How is the correct way to do that inside a MovieClip with AS3?
View 6 Replies
Oct 21, 2005
I'm creating a menu bar that is a movieclip and inside the movieclip consists of the buttons.Now the menu bar is twice as WIDE as what is visible on the stage.The only part you can see is the text 'menu' on a bar.Then when the mouse hits the bar, it flies across the screen to the otherside of the bar where the menu buttons are.Now the menu bar does its animation over 20 frames - the last frame being the frame where the menu buttons are now visible.
On the last frame i have the 'stop;' code
On the first frame I have this code:
Code:
stop();
this.onEnterFrame = function(){
if(rewind == true){
[code]....
View 2 Replies
Jun 23, 2009
I have been using TweenLite for all of my easing. I was wondering what the code is for having a button inside a movieclip not active while the movieclip is tweening.Then when the movieclip does finish tweening the button then becomes active.
View 2 Replies
Feb 16, 2010
How can I get a button inside a movieclip link to a frame in another movieclip on the scene? I tried this code:
function gotoCenter(event:MouseEvent):void {
MovieClip(root).centermc.gotoAndPlay(2);
}
skruetest.addEventListener(MouseEvent.CLICK, gotoCenter);
..where "skruetest" is the button, "centermc" is the movieclip where I want to go to frame 2. I don�t get errors with this code, but nothing happens when I click the button. What can I do?
View 4 Replies
May 3, 2010
I'm trying to keep my code succinct by naming my section labels the same as the buttons that navigate to them. I've also put the contents of each page in a movie clip of the same name with suffix _mc. The following code successfully traces the name of the movie clip, but how do I tell the compiler that I want to reference the movie clip whose name is held in the string, rather than the string itself.
function clickSection(evtObj:MouseEvent):void {
currentContent = currentLabel + "_mc";
trace(currentContent);
currentContent.alpha = 0;
gotoAndStop(evtObj.target.name);
mainNav_mc.gotoAndStop(evtObj.target.name);
View 3 Replies
Aug 19, 2009
I have a very simple class as so[code]...
I'm loading the mp3 from a compiled swf so I don't have to compile it every time, but am having a nightmare playing it.
Even with loader.loaderContentInfo.content, I can't seem to access my play methods.
I've tried all sorts of casting combinations from the parent timeline, but no luck.
View 4 Replies
Dec 4, 2011
I want to apply actions to a movieClip nested inside a dynamicly attached movieClip, with the attachMovie method; it doesn't works when the movieClip is attached by a button:
1.when the swf movie loads with an attachMovie method the remove_btn clears the window_mc
[Code]....
View 9 Replies
Oct 23, 2009
I have a button inside a movieclip, to which I would like to apply a rollover function. When rolled over, this button (inside MOVIECLIP 1) would make (MOVIECLIP 2) jump to second frame. I'm using Flash 8.This is turning onto a real headache for me, since i've searched every single forum and thread concerning this matter, and nothing seems to work.
View 7 Replies
Oct 27, 2011
i have dynamic buttons in movieclip and i want the movieclip goto 2nd frame once some one click single movieclip while rest remains in 1st frame.the movieclips can be in arrayi have some code here:
Actionscript Code:
var mc:MovieClip = new MovieClip();for(var i:int = 0 ; i < numberOfButtons;i++){ var btn:MovieClip = new button();
[code]....
View 5 Replies
Nov 5, 2010
I have a movieClip button in my library that I dynamically add multiple instances of to the stage using code (so each instance has a unique name). The button has two frames, so it has a basic rollover effect (just changes color. To make the rollover work, I've had to dynamically add an event listener to each new instance of the movieclip, which triggers the rollover function.
I was wondering, instead of adding an event listener each time, can I somehow have an event listener within the movieclip to take care of the rollover? Or will it not make any difference to the number of event listeners, as it will still add a listener with each new instance of the clip?
View 1 Replies
Dec 3, 2006
I have a movie clip, circle_mc, and in it is embed another movie clip, point_mc. I made the circle draggable with this:
Code:
circle_mc.onPress = function() {
startDrag(this);
[code]....
View 3 Replies
May 18, 2010
On the stage I have a movieclip called mc_back. I also have a movieclip on the stage called mc_content. Now, inside mc_content I have a bunch of code and some of it adds, or should add, an EventListener to mc_back as well as a a function that works when mc_back is pressed.
So basically, all code is written inside mc_content and some of it needs to interact with mc_back.
how to target mc_back from inside mc_content. Using stage.mc_back or root.mc_back doesn't work and Google should be my friend, but in this particular problem, it's acting more like my enemy.
View 8 Replies
Aug 3, 2009
Is there any ways to set a movie clip(item2) invisible but set another movie clip which located inside item2 visible?
View 1 Replies
May 17, 2011
I am brand new to AS3 and just about muddled through with AS2. I have a problem which should have a simple solution but everything I try gives errors.I had a load of buttons on the main timline which worked fine. I have moved a load of them into another movieclip called flyoutMenu. Now none work and I get the error:Error #1065: Variable about is not defined.This is the code stripped down to one button:[code]
View 2 Replies
Aug 6, 2009
I have a movieclip running inside a movieclip and i want trigger an action on the timeline in AS2 I would put _root.gotoAndPlay("start6_fl"); or _parent.gotoAndPlay("start6_fl"); depending on were I wanted to go.How do you do this really simple action in AS3?
View 7 Replies
May 3, 2011
I have a mock up fla file showing what i am trying to attempt. I have a button nested in a movie clip on the second frame on main timeline called PageBackBtn. I am trying to get this button to target a label within a movieclip on the first frame of the main timeline. The label also is called PageBackBtn within the movieclip on frame one.
View 0 Replies
Oct 27, 2005
Iv'e got a problem, when creating a movieclip inside a movieclip. I create 5 movieclips dynamically... I want a clickable tag/box on each of these moviclips...
[Code]...
View 9 Replies
Oct 18, 2006
I need it to have a rollover in the initial state (which works fine) and then, in another state (represented by the onOff variable & mc),I need it to have a rollover that has a different size than the actual area being displayed (so that it will do the rollOut when the user leaves the area around the first line of text).I thought I had it figured out by putting a hitSpot movieClip inside the box movieClip, but the box rollover function doesn't let the hitArea rollover function through...Here's the code, and the fla is attached with some samples of what I'm trying to do.
Code:
var onOff:Number = 0;
onOff_mc.onPress = function() {[code]......
View 1 Replies
Feb 10, 2010
I have a movie clip called "myMC". I set its x value as such:
[AS]
var myMC:MovieClip = new MovieClip();
addChild(myMC);
myMC.x = 100;
[Code]....
I know I could proboly acheive this with a math equation but is there a function that can get the exact global position of "myShape"? So that I can position another movieclip or sprite around that movieclip?
View 3 Replies
May 4, 2011
I have a mock up fla file showing what i am trying to attempt. I have a button nested in a movie clip on the second frame on main timeline called PageBackBtn. I am trying to get this button to target a label within a movieclip on the first frame of the main timeline. The label also is called PageBackBtn within the movieclip on frame one.
View 1 Replies
Feb 24, 2011
I am trying to get to a
movieclip nested inside a movieclip in As2:
MovieClip1.movieClip2.movieClip3.gotoAndStop(2)
MovieClip1, MovieClip2, MovieClip3 is instances Names.
View 2 Replies
Apr 27, 2011
I made a script that creates a MovieClip (two stationary Ovals, side by side) from the library and transports them from the left side of the stage to the right.The idea would be to make the RIGHT Oval decrease in size as the MovieClip is traveling while keeping the LEFT Oval the same size. (All of them being part of an Array)I thought to convert the right Oval to a MovieClip within the parent MovieClip, but I have not been able to access the ".width" and ".height" of the nested MovieClip.Not sure whether I'm on the right track or not.
View 5 Replies
Feb 23, 2012
I am not able to create a empty movie clip inside a empty movieClip.
Here the code..
var photoHolder:MovieClip=new MovieClip();
addChild(photoHolder);
var photo:MovieClip=new MovieClip();
[Code]....
View 9 Replies
Sep 10, 2011
I have two movieclips, one loads an image, I resize that mc and add it in a bigger movieclip which has to be resized too. My problem is that that the inner movieclip doesn't resize the way I want although I've tried many variants of the sequence of the commands. I've also taken into account something that I read that an empty mc resizes strangely but it didn't change anything.
that's the code:
loader_mc.x=0;
loader_mc.y=0;
cont_mc.x=1440;
[Code]....
red mc is the outer one but the sizes of the inner are not right it should be about one third of the outer but it's about two thirds. same with the height.
All I want is to be able to resize them independenlty. with the outter beeing bigger than the inner
View 1 Replies
Jan 29, 2010
I have a MovieClip that represents a playable character in my game. Inside of that MovieClip are three frames: One containing a single picture (standing), one containing a second MovieClip (walking) and the last containing a third MovieClip (jumping). Using the Properties tab, I gave each of the frames a name ("Stand", "Walk" and "Jump respectively).
What I want to do with Actionscript is gotoAndStop the "Jump" frame inside my character's MovieClip, and play the first frame of the MovieClip contained in that "Jump" frame. Something like this:
ActionScript Code:
playerMovieClip.gotoAndStop("Jump").gotoAndPlay(1);
View 3 Replies