Actionscript 3 :: E.target Detected On CLICK, Not On ROLL_OVER?

Jan 21, 2011

I have a container with several movieclips in. I added an eventlistener to the container and on roll over i trace the e.target.name. The problem is when i roll over the e.target.name is the name of the container, while when i click the e.target.name is the target of the object inside the container. Anyone know how to solve this?

[Code]...

View 1 Replies


Similar Posts:


ActionScript 2.0 :: External Drag And Drop - Target Not Detected On Main Swf?

Mar 30, 2012

Im trying to load my external swf which is a drop and drop swf into the main swf but when i load it only the drag works and the target is not detected so it doesn't drop.the pop up also stops working in the main swf when you type test1 or test2.heres the code i use to load swf in the main swf :

myContainer2.loadMovie("externaldrag.swf");

View 9 Replies

ActionScript 3.0 :: SwapChildren - Swap The Buttons When CLICK Or ROLL_OVER Buttons

Mar 8, 2010

I have 4 buttons , one container and one background movieClip as the attached file shows. Well.. at the Gallery movieclip displayList I add the other three BLACK buttons like this:

[Code]...

Everything I need consist on swap the buttons when i CLICK or ROLL_OVER those buttons, how do I do on thats circunstance? With a container and a background at the same displaylist.

View 2 Replies

ActionScript 2.0 :: Determinate Target Of Mouse Click?

Dec 15, 2011

I have a container MovieClip with 50 movies inside all different names and I need to find what movie was clicked.

ActionScript Code:
for(var str in this){
if(typeof(this[str])=="movieclip"){

[code]....

trace works but how do I know what MovieClip was clicked?

View 3 Replies

ActionScript 3.0 :: Testing A Click Event Target Object's Type?

May 18, 2009

MouseEvent.target will return the target object... but how do I access the specific object type? I know it's probably simple... but it's late and I'm fried. The code below obviously doesn't work. I just need someone to tell me what to put instead of [object MovieClip] and [object SimpleButton]

Code:
stage.addEventListener(MouseEvent.CLICK, fOnClick);
function fOnClick(e:MouseEvent):void {

[code].....

View 10 Replies

Flex :: Making MXML Component Report Target Of Click?

Jan 24, 2011

I have a component based on canvas, and within that component I have two images. I have the component listen for a click and when that event occurs one image goes transparent and the other becomes visible. This part works perfect. Now, on clicking that component, I also want to do something to the parent canvas, I already have this working for more basic types (image, canvas, text, etc) but the problem with my component is that the click event has the internal image as the target, so what I want to happen to the outside canvas is happening to the canvas of the component. How do I make my component as a whole the target of any clicks on it?
3.5 SDK

View 2 Replies

Actionscript 3 :: Set Zoom On Mouse Click Target To Center Of Stage?

Aug 24, 2011

I'm having toruble with an image that I zoom into in flash. I got everything to work, only I want the clicked X and Y coordinats to center to the stage. ( so that the area clicked on always zooms in and position the area clicked to the middle of the stage) the image is a movieclip and it zooms with a tween, but i tried everything but the image wont center the stage..

does anyone have a clue for wich actionscript 3 code I can use to do this?

my code is:

const TWEEN_IN:String = "tweenIn";
const TWEEN_OUT:String = "tweenOut";
var tweenDirection:String;

[Code]....

View 1 Replies

ActionScript 1/2 :: Click And Drag Any Of The Objects (black Circles In Case) To Their Target

Nov 30, 2009

I am working on a simple "Drag and Drop" deal and I have encountered an interesting bug that I can't seem to track down. When testing the movie, the FIRST TIME you click and drag any of the objects (black circles in this case) to their target (the big rectangle), all is well. However upon dragging them OUT of the target area, the object appears to "fight back" against being dragged. I am fairly new to Actionscript and can't seem to find the answer for this one elsewhere. I'm going to apologize in advance for the messy script.

[Code]...

View 3 Replies

ActionScript 1/2 :: Click Invisible Button On Moving Target For Playing Movie

Dec 30, 2009

I have an image of a target on stage, that moves left and right. In the center of the image is an invisible button, occupying the centre circle of the target. The idea is you click the invisible button on the moving target and this starts another movie playing. Seems to me the action script should reside in the button, and be something like this:

on(release){
targetPath(this.movie2);
play();
}

View 2 Replies

ActionScript 3.0 :: Get Underlying "target" Of Custom Right-click ContextMenu?

Aug 18, 2011

This is probably something simple I'm missing. There are tons of tuts out there on how to setup a custom right-click menu, however, I've not seen anything on how to get the target of the right-click, not the menu item, but the object actually right-clicked...

Here's the code I'm using. In the customMenuItemHandler I need both the target menu item AND the target object that was originally clicked to open the menu.[code]...

View 1 Replies

ActionScript 2.0 :: Target Path - Go To Frame 2 When Click On Button On 1st Frame

May 25, 2009

there is a button on 1st frame. there is a movie clip on frame 2. I named the movie clip as "ball_mc" I want to go to frame 2 when I click on button on 1st frame. I know that the code "gotoAndPlay(2);" on button will work. But for some reasons, i want to try another way.... i tried several codes:

1. this.ball_mc.gotoAndPlay();
2. _level.ball_mc.gotoAndPlay();
3. _global.ball_mc.gotoAndPlay();
4. _root.ball_mc.gotoandPlay();

However these codes dun work. Is there other way to resolve this besides this code "gotoAndPlay(2)"?

View 1 Replies

IDE :: Custom Cursor On MC ROLL_OVER Only?

Feb 22, 2010

this is what I want.I have a MC whose color is set to Alpha 0 which is placed over an area where I want on ROLL_OVER the mouse to change to my custom cursor (which will indicate that a mouse click will "do something")this is what I have done.1. created a MC that will be used as my Custom Cursor with alignment sent to center/middle (or center sq. in the grid)2. I have exported it for AS

Code:
//roll over and roll out event handlers: (tgIcon_mc is the MC that I want to make active.)
tgIcon_mc.addEventListener(MouseEvent.ROLL_OVER, rollOverHandler);

[code].....

View 1 Replies

ActionScript 3.0 :: Continuous Scroll On Roll_Over?

Jun 13, 2011

'm still rather new to AS3, I'm trying to make a roll_over scroll function however I've only got it to move a little bit each roll over, I'd like it to continuously do so until the mouse has come off the button area

Scripting:
reel_mov.x=14
r_button.addEventListener(MouseEvent.ROLL_OVER,right);

[code].....

View 7 Replies

ActionScript 3.0 :: Unwanted 'blinking' On Roll_Over?

Nov 11, 2009

Basically I'm creating two (can be more or less) rows of layered MC treaten as Buttons.In each MC there is a small thumbnail hidden behind a coloured layer. When roll_over the coloured layer, this alpha goes to 0(zero) and entire MC resize +10% over x and y.On roll_out the opposite occurs, everything should get to the original alpha and size.

The Problem: when moving the mouse really fast over the MC's and stop suddenly over one of them it starts 'blinking' (size and alpha goes in and out and won't stop unless you move the mouse a little)

ActionScript Code:
for(var i:uint =0; i<16; i++){
var miniPnt:MovieClip=new LittlePantone();
miniPnt.x=_xc;

[code]....

View 2 Replies

Actionscript 3.0 :: Delay On MouseEvent.ROLL_OVER?

May 5, 2010

I have a problem with a mouseover-effect. I have a lot of different objects on my scene. Whenever the mouse is rolled over one of these objects, they will appear a bit larger until the mouse is moved again. I have made it work like this (and it functions):

package
{
import flash.display.MovieClip;
import flash.events.MouseEvent;[code]........

My problem now is, that I want to add another roll over effect:If the user rolls over one of the objects, it will appear a bit larger until he moves his mouse away, but if the user does not move the mouse for more than one second, a "pop-up window" (=New roll_over mouseEvent) has to appear, while the object STILL appears emphasised.So, how do I add a second roll over effect, which appears 1 second later?(the second roll over effect should be a png-image)

View 6 Replies

ActionScript 3.0 :: Return A Value Out Of A ROLL_OVER Function?

May 18, 2009

I cannot for the life of me figure out how to return a value out of a ROLL_OVER function. It seems extremely easy, yet I cannot get it to work. Here is a simplified version of what I am trying to do:

test_mc.addEventListener(MouseEvent.ROLL_OVER, testOver);
function testOver(event:MouseEvent):String
{
return "hello";
}
trace(testOver());

View 3 Replies

'No Flash Detected' Message?

May 6, 2009

I have searched all afternoon, and I thought millions of people must have this problem, but couldn't find a single useful site.I have made a flash site, that works correctly for people with flash. People without Flash however, don't see anything but my background color. No yellowbar on top that enables them to download flash, and no message that they need to have flash either!I want to display a message when the user doesn't have flash, like on www.thehansofoundation.orgI just want the site to say that you need flash, you can download it here, and if you don't get it to install you have to contact your network administrator, because a lot of companies have disabled flash and I want their administrators to explain te problem and not the client I made this site for.

View 2 Replies

ActionScript 3.0 :: Mouse Over Not Detected

Aug 25, 2009

I'm trying to make a grid full of photos as an AS3 class. I would like mouseOver and mouseOut behaviour for the indvidual pictures however, only one of the pictures is triggering a mouseOver event ?_?
 
Code:
 
... 
public class PhotoGrid extends MovieClip{
...
private function loadComplete(ev:Event){            var count:int = parseInt(ev.target.data.picCount);            for(var

[code].....
 
As you can see event listeners are being added to all of the pictures that are being displayed, however, only one actually works.PictureLoader is a custom class extending MovieClip which has a child Loader object (the loaded picture)

View 3 Replies

ActionScript 3.0 :: CTRL+UP Key Not Detected

Jun 6, 2010

I have been using the up/down, left right keys ito scale and rotate an object. I decided to change that to CTRL+up/down/left/right key so I could use the arrows to position the object.

When I change

if( event.keyCode == Keyboard.UP)

to
 
if( event.keyCode == Keyboard.UP && event.ctrlKey)

nothing happens.
 
I've tried a few tests and I can CTRL+left and CTRL+right fires an event, but CTRL+Up or CTRL+Down does not fire an event.
 
without the && event.ctrlKey added, all events work fine. So I knopw the CTRL key works and the arrows work. Just not CTRL+UP or CTRL+DOWN arrow together.

It might be my DELL laptop keyboard, but if so, many will have this problem.

View 1 Replies

Flash :: Beginbegin Cannot Be Detected?

Feb 4, 2011

I have issue with a value that should have just work, however, it seem to be a bug which I could not understand. Maybe you can find any bug?Note: I have no issue with the "begin" and "end", just "beginbegin" and "endend" always return false.My array values:beginbegin,endend,-,-,-,begin,end,-,-,-,begin,end,-,-,-,-,begin,-,endMy code:

private var xm:int = 0;
private function createBeam():void {
for(var a:int=xm;a<naArray.length;a++) {

[code].....

View 1 Replies

Actionscript 3 :: MouseEvent ROLL_OVER/ROLL_OUT Alternatives?

Feb 5, 2011

I have a custom cursor and I want it to change when you highlight a MovieClip, and return to its default value when the MovieClip is not highlighted anymore.I've used MouseEvent.MOUSE_OVER, MouseEvent.ROLL_OVER, MouseEvent.MOUSE_OUT, and MouseEvent.ROLL_OUT. The result isn't very smooth and there is a small delay to when the cursor changes. Also sometimes if you move the mouse fast enough the cursor won't change at all.

View 1 Replies

ActionScript 3.0 :: Play And Stop FLV On ROLL_OVER ROLL_OUT

Feb 7, 2009

i want a flv to start when i mouseover a special location. i have placed a button there with alpha = 0, and with eventListeners for ROLL_OVER and ROLL_OUT.

the roll-out video is the same as the roll-on video, only it goes backwards.
so i want it to start seamlessly where the other one stopped as the mouse rolled out.

this is what i've done so far:

ActionScript Code:
play_btn.addEventListener(MouseEvent.ROLL_OVER, playVid);
play_btn.addEventListener(MouseEvent.ROLL_OUT, playVid);
function playVid(e:MouseEvent):void

[Code]....

it is very staccato, and on ROLL_OUT it removes the video totaly before it plays the out-video. so it's not seamlessly.

So is there a way to "pre-load" these two videos, so it appears as fast as a normal mouseover/mouseout on a button? And a way to keep the on-video on screen untill the off-video starts at its seek-point?

View 1 Replies

ActionScript 3.0 :: Create A Button Roll_over Effect?

Oct 30, 2009

I want to create a button roll_over effect i as3, like the one you see on this link, when you roll_over the small pictures. The picture changes to the oicture you just rolled over and if you remove the mouse the picture you rolled over last stays. here is the link http:[url].....I have 3 buttons like this, and i would like the buttons to go back to their normal state when you roll_over the next button.

View 0 Replies

ActionScript 3.0 :: Possible To Get The ROLL_OVER Event To Pass Through An Object?

Nov 13, 2010

I have one movie clip that sits partially over top of another movie clip. The underlying movie clip has a ROLL_OVER effect on it. Is it possible for the mouse to somehow activate the ROLL_OVER only when the mouse cursor moves over a portion of the overlying movieclip when it's over top the underlying movie clip? In other words, the ROLL_OVER event should be triggered by the mouse cursor as through the overlying movie clip wasn't even there, when the mouse rolls over that area.

View 4 Replies

ActionScript 3.0 :: Stop Effect When Mouse Roll_over?

May 15, 2011

I have this animation where a tv screen has a static effect on it. This is the code of the tv animation:

[Code]....

View 2 Replies

Actionscript 3.0 :: AddChild MC With A Tween And Roll_over Animation?

Mar 31, 2010

I'm trying to create a website to display my architectural portfolio and I'm having troubles with a ROLL_OVER and ROLL_OUT EventListener. I have attached my fla file for you to look at to get have a better understanding of what I'm trying to explain.

What I'm trying to create are project thumbnails that when you roll over the thumbnail movieClip it will expand the other project thumbnails to the right allowing room for a brief summary. Also, the roll over will trigger a function inside the proj1 movieClip that plays the mc timeline, which simply removes a translucent colored layer (classic tween) to expose the project thumbnail in color. (You might want to reference the attached file) The problem I'm have is in the movement of the other thumbnail.

Problems are as followed:

A. When I roll off the thumbnail_mc the other thumbnails don't come back to their original locations.

B. The roll_over only works once. I would like to have it so that every time you roll over it, the proceeding project thumbnails should move to the right, and when you roll off, they should move back to the left to their original locations.

Now, I'm not sure if a if statement is the best way to move the other thumbnail or if I should use a tween. I tried some simple tweens off to the side, which you will see, but I can't get a addChild MovieClip to tween...I believe it has something to do with the instance name, which I'm not sure how to give an instance name to a movieclip that is a addChild...?

View 1 Replies

ActionScript 3.0 :: MouseEvent.ROLL_OVER Crashing Browser?

Feb 23, 2009

I have a movie set up in AS3. it is working with a swf that has a video loaded, a bunch of other external swfs. it all runs smoothly until half way through all of the rollover states just kill the browser. there are no errors in the flash IDE but they crash both IE and FF3

View 1 Replies

ActionScript 3.0 :: Custom Event Not Being Detected

Feb 21, 2012

I've been experimenting with writing my first custom event. So I have a MovieClip class in the library called "Curtains". It plays an animation and at the end of the animation I have the code:

ActionScript Code:
stop();
dispatchEvent(new Event("closed"));

Now I'm creating an instance of this Curtains MC in my class below. The custom event is not being detected. Did I put the event listener in the wrong place? What did I do wrong?

[Code]...

View 9 Replies

ActionScript 3.0 :: Width Detected Is Not Correct?

Apr 17, 2009

I have some items in my library that are all identical. When I place them on the stage, I can see that they are identical width.

When I do a:

trace(mybuttonone.width);
trace(mybuttontwo.width);
trace(mybuttonthree.width);

It traces a different width for each. How do I get it to tell me "real" width instead of some made up number?

View 14 Replies

ActionScript 3.0 :: Flash TouchMove Is Not Detected?

Jul 18, 2011

I'm trying to trace a message and testing some TouchEvent in Device Central with device Flash 10.1 Multitouch. I got TOUCH_BEGIN to work but I can't get TOUCH_MOVE trace message to appear even though I've pressed Alt and move the mouse at the same time on the display sprite. So what am I doing wrong?

Code:
package
{

[code].....

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved