ActionScript 3.0 :: Target Covered MovieClip?
Nov 19, 2010How do I make a MovieClip Targetable even if it is covered by another MovieClip?
View 4 RepliesHow do I make a MovieClip Targetable even if it is covered by another MovieClip?
View 4 RepliesHow do I make a MovieClip targetable even if it is covered by another MovieClip?
View 4 RepliesI am making a game and need to know how much a particular mc is covered by other mc's placed randomly on the screen. Is there a way to tell how much is left seen of the mc as it's slowly being covered by other mc's?
View 3 Repliesqi have a movieclip which is added to the stage:
var profileholder:profileHolder=new profileHolder ;
inside of profileholder is another movieclip(infoBtn) that acts as a button.when the mouse is over profileholder i want to do something with infoBtn like:
//profOver is the over state of profileholder
function profOver(e:Event) {
e.target.infoBtn.alpha=1;
}
this doesn't work and brings up this error:ReferenceError: Error #1069: Property infoBtn not found on flash.display.Loader and there is no default value.
at main_fla::MainTimeline/profOver()
i also tried:
function profOver(e:Event) {
var item:profileHolder=e.target as profileHolder;
item.infoBtn.alpha=1;
}
and get this error:TypeError: Error #1009: Cannot access a property or method of a null object reference.
I'm doing a project that makes a movieclip draggable in different droptarget movieclip. When it is dragged in the 1st target an animation is triggered and so as the rest of the droptargets.Here's my initial code that does'nt work:
btn1.buttonMode = true;
b1OrigX = btn1._x;b1OrigY = btn1._y;
//btn1btn1.onPress = function(){ startDrag(this);}//droptarget = box1btn1.onRelease = function(){ stopDrag(); //droptarge1t
[code]....
I have a carousel menu that is placed on the stage using addChild(); It works fine, but when I place the code in my .fla, the carousel is covered up by my background graphic.I've remedied this by placing an empty movie(menuHolder) clip on layer above the background and assigning it to the addChild(), hence Code:menuHolder.addChild(imageHolder);I don't like the idea of empty movie clips on the stage. I've tried stage.addChild(), but then I get warnings and the .swf seems to slow down after a time...Here is the carousel code (sorry, it's alot, but the addChild is in a couple places)
Code:
//We use 70x70 sized images (change this if different for your images)
const IMAGE_WIDTH:uint = 70;
[code].....
I am making a game and need to know how much a particular mc is covered by other mc's placed randomly on the screen.Is there a way to tell how much is left seen of the mc as it's slowly being covered by other mc's?
View 3 RepliesBy, let's say, another display object. I have no idea what it was called.
View 1 RepliesI know this is a much covered subject but after spending two days trying different things I have to admit I'm baffled. Got two swf I want connected to one another to act like a portfolio gallery - parent is called "portfolio" child is "portfolio_flash_2"
Both have animation at the start with the child having a skip button (cause its animation is 20 odd seconds long). after the animation the thumbnails appear for the larger images.
On both swf's the buttons I'm using to load (parent to child) and unload (child back to parent) appear after the animation - I can get the child to load from the parent but having problems knowing what proper code to use on the child button "page2_btn" to return to the parent.
[Code]...
Facebook Connect uses JS/CSS overlays/popups for user interaction. I have sites with Flash elements, and no matter how I set the z-indices, the Flash always seems to go to the topI have a similar and likely related problem with a div with display:fixed at the top of the screen, where it gets covered by the Flash when you start scrolling.
View 2 RepliesI am currently designing a website for a fiend and would like to make the content of the website tabbed. What I mean by this is I would like the visitors to click on a tab (e.g. Contact) and the tab would slide out with the appropriate information inside. Okay so that part is easy, the problem I am having is that when one tab slides out all of the tabs on layers below the contact layer get covered up. I would still like for all of the other tabs to be visible. I would like for all of the tabs to slide out as if they were behind all of the other tabs.
The link is: [URL]
im trying to scroll a movie clip that contains dynamic text and is covered by a mask. However when i publish the movie i cant see the dynamic text?
View 3 RepliesIts day 3 of learning AS3 for me. I cant seem to target a movieclip within a movieclip. I code with all my actions on the first frame of the root timeline and would like to continue this practice. But when I target the clip from the root my function wont run.
Here is my example:
Code:
wheel_mc.spinBackward_mc.buttonMode = true;
wheel_mc.spinForward_mc.addEventListener(MouseEvent.CLICK, spinForward);
function spinForward(event:MouseEvent):void {
[code]....
Basically it wont gotoAndPlay("fadeIn") and I'm not sure why. So my question so I can move on in my AS3 learning is how to I target a movieclip with another movieclip, or is there another more proper way to do what I'm trying to achieve.
i have 2 sprites on stage. bottomSprite is added to the display list first, followed by topSprite. topSprite partially covers bottomSprite.i've added an event listener to bottomSprite for MouseEvent.MOUSE_MOVED notifications to simply trace the mouseX and mouseY coordinates. however, the notification doesn't work for the parts of bottomSprite that are covered by topSprite.
var bottomSprite:Sprite = new Sprite();
bottomSprite.graphics.beginFill(0x666666, 0.5);
bottomSprite.graphics.drawRect(150,150, 150, 150);
bottomSprite.graphics.endFill();
[code]....
I have some buttons working great on my main timeline using this code on the actual timeline[code]...
So I know I need to make Revlon_mc into another movieclip (so I can do the actual animation inside this movie clip and move it easily around the main timeline) but I'm not what the code would be (something to do with parent perhaps??) and would I still keep the code on the main timeline or would it sit within the new moviclip just created?
I am trying to trace the name of the button that started the eventListener. But instead I keep getting
instance11 instead of the name of the movieClip which should be a number between 0-5
below is part of my actionscript.
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
[Code]....
I have a movieclip named button1 that contains a dynamic text named txt in it.My problem is that if i try
if(event.target==button1)
{
}
[code]....
I have some drop targets that work, but I also have a movie clip that can be turn on over the main timeline. All this clip is, is some low alpha colors for a viewing effect. Since it's above the drop target though it doesn't want to work. Is there a way to make it associate with the droptarget underneath, or a way to make the
View 6 RepliesI have created movieClip through AS3 code but I need to set target on my movie clip. How to do .
private var myClip:MovieClip=new MovieClip();
// now i need to sent target on this myClip.
I've been able to find how to load external .swf's into a target but how do I load a regular MovieClip from my Library? Can you do that with loadMovie?
View 1 Repliesi am making a drag drop game. i created a doc class for the dragged items . i want to make the hit test with some movie clips on the stage but inside the class they are not seen by there names. how to perform my hit test
this is my code,and target1_mc &target2_mc are movie clips on the stage
package {
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.text.TextField;
[Code].....
I have a video player that's control bar's x & y are over the top of the video. It is set to alpha 0, and when the user rolls over the video the control bar's alpha goes to 1 and becomes visible. I have a few even listeners and a function that makes this happen. My issue is that the buffer handle and the volume handle do not go to alpha 0, despite the fact that their parents do. The instance of "volumeHandle" is the child of "volumeSlider". "volumeSlider" does go to alpha 0, then to alpha 1 on rollover, but it's child "volumeHandle, is always visible. The same applies to the respective instances of the buffer bar.
I have tried
volumeHandle.volumeSlider.alpha = 0;
But that doesn't work. My guess is that the conflict lies in the linkage of the controls for the buffer and volume handles.
Can i target the second key frame of an empty movieclip which is created by actionscript.as for example:this.createEmptyMovieClip("target_mc",1);I want to write some script on the second keyframe on the target_mc movie clip. Is that possible.
View 1 RepliesI changed the question as its seems to be a problem with target not registering children mc/ or nested MovieClips.
var box:Box = new Box();
ground.push(box);
levelPlane.addEventListener(MouseEvent.MOUSE_DOWN, onOver);
[Code]....
How Do i target the movieclips(BOX) inside of the main MovieClip(levelPlane)?
imagine i have nested 10 boxes inside a MovieClip Called "levelPlane" i want to click on any of the boxes to add another Mc on the box i clicked x,y location.
is there any way to target a MovieClip from an external class that's NOT the Document Class?
Is it correct to have the Document Class as Main AND View?
I have been working with a very simple tutorial over at [URL], where you drag objects onto a target movieClip. My question is this, how do you target a movieClip inside a movie clip? What I have are 4 color squares that I want to drag and drop onto a pattern_mc. I put the target mc's with in the pattern_mc. In the tutorial the target mc's are not in a movie clip. I put my target mc's in a movieClip because I want to use the pattern_mc as a material.
View 7 RepliesI'm creating a site that allows drag and drop navigation. Here's the current preview:
[URL]
My goal is to allow the user to freely navigate the desktop and explore at their leisure, however, for the user who's a little more impatient I want to offer an option allowing them to click a button on the bottom menu and have the desktop slide directly from the movieclip's current XY coordinates (whatever they are at the time), to a designated XY, and center on that specific section, easing into place.
I've got placeholder buttons, and placeholders for the desired targets, but I can't wrap my mind around the code needed to do it, nor have I found any examples that use the same technique with AS3.
How to target the MovieClip in the listener of its tween ? I have an Array of MovieClip and each one have its own Tween. Each Tween have its own Listener. I want to target the MovieClip in the listener. I search in many forums and tutorials and I don't find anything convincing.
[Code]...
Is there any way to get the name of the MovieClip that a class extends?Lets say I have an MC on stage called boxMC exported for AS using a class box which extends MovieClip.If I trace (this) within my class I will get the name of the class, if I trace (parent) I will get the name of the main MovieClip that boxMC sits within. So how can I target boxMC?Basically I want to be able to return the name of the MovieClip that the class is extending
View 2 RepliesI have the following code
[Code]...
Code: Error #1034: Type Coercion failed: cannot convert movieclip1 to MovieClip. My goal is to have the dropTarget.parent.name turned into a movieclip so I can use properties on it. There is a movieclip that I want to drop on the Target, and I can use "this" for source, the movieclip that I'm dragging, but when I want to have properties on the destination, when I want to convert the String to MovieClip, I get #1034 And I don't know what is it that I'm doing wrong...