ActionScript 3.0 :: Get A Hold Of All Buttons Except For CurrentTarget?
Jul 4, 2010
i have a set of 6 buttons and upon clicking one of the buttons i want to tween the others that were not clicked to fade out. how do i do this? i know how to do the tween part but i dont know how to get a hold of the buttons that are not currentTarget...
View 2 Replies
Similar Posts:
Jul 4, 2010
I have a set of 6 buttons and upon clicking one of the buttons i want to tween the others that were not clicked to fade out.
View 3 Replies
Dec 7, 2009
I have a movieClip in my library that I am loading into a scrollPane. When I click on the scrollPane I want to know the name of the target I am clicking on. I am trying event.currentTarget but all that I get in the output box is ObjectMovieClip. I want to use one function for all my buttons so when I click on them it loads another movieClip in my library. I realize I could make 3 separate functions, but I'ld like to use just one.
[Code]....
View 13 Replies
Oct 13, 2009
I've got a symbol on stage and a button. The button rotates the symbol CCW half a degree. Code: on(release){ mySymbol._rotation -= 0.5;} I wanna add an on (press and hold) action on button so that the symbol will be rotated continuously when the button is on hold.. I can't make this work for over a week now.
View 7 Replies
Oct 16, 2009
I have created a map of Scotland, in Flash, with buttons for each region.As you can see (attached), it is pretty basic, with links off to a specific page of a website that I'm developing.1) When a region is clicked, on my current map, I have it redirecting to a page on the website with a QueryString value which populates the two "region" drop down menus. I'd like, when this happens, for the on state that was just selected (clicked) to remain in focus until a user rolls out onto another region. Is that possible? The problem I'm having is that when the map initially loads, I need it to be blank.2) How do I take a copy of images from Flash? I've tried exporting as a gif, but the colours are different and the text is awful looking
View 14 Replies
Jan 16, 2009
I am loading a series of thumnails through an XML file into a scrolling movieClip. I am able to get all of the images to load and scroll and even control their alpha value using event.currentTarget. What I am having a problem with is getting the corresponding XML attribute(@title) to load into a dynamic text field.Here is a snippet of my XML file:
<thumbs>
<thumb img="http:url_1"
title="Title One" />[code]....
The thumbnail alpha changes and the text field changes to the text that is defined by the first title attribute. What I need to figure out is how to use a variable instead of the "#". I'm assuming that I should be able to make use of event.currentTarget like I did to change the alpha of the thumbail movieClip.
View 7 Replies
Feb 18, 2011
I have 3 movieclips. Each sends the game to one level. Inside each movieclip theres more movieclips.
[Code]...
View 2 Replies
Oct 25, 2011
i'm wondering how i can run a function that has the same name as the current target. so when i click a button with the instance name "notes" this will run the "notes" function e.g
ActionScript Code:
evt.currentTarget.name();//run the function with the same name as the target
this doesn't work and returns a Error #1006: value is not a function.
View 2 Replies
Nov 10, 2011
If you have a series of sprites in a movie clip, can you get the currentTarget.currentTarget as it were? So if a sprite throws a mouse event, I can capture that?
Sorry if that's gobbledegook.
I have a movie clip called myMC. In that are a series of sprites sitting in a vertical row. On mouse up I want to know which sprite I was over. currentTarget gives me the parent movie clip, can I get the sprite underneath?
View 7 Replies
Mar 14, 2009
AS3 coding, and despite being able to find posts about most of my problems, this problem has stumped me, and I'm not certain what words to search for.I'm trying to make a list of MCs on my stage to link to external URLs.I figured the following would work, but it just pulls the 'event.currentTarget.name+"URL"'the instance names of the MCs are "idlink" and "findStore"Is there a way I can get the loadLink variable to pull the URL instead of the "idlinkURL" string, or is my logic for this completely backwards?
Code:
var buyLinks:Array = [idlink, findStore];
// add listeners to the menu array
[code].....
View 1 Replies
Mar 19, 2009
whats the difference between target and currentTarget properties.
View 9 Replies
Apr 13, 2010
Have 8 mc's, and when I click one want something to happen to all except the one that I clicked.My question is how do I declare "all except currentTarget" for a MouseEvent?
View 2 Replies
Jan 10, 2011
I have create a few sprites consist of various music notes, when the cursor sprite move over to one of the notes, it would blink using intersect. I have no idea on how to make the cursor detect which note it overlap.
View 1 Replies
May 7, 2011
I dont understand the difference, they both seems the same but... I guess they are not.
View 3 Replies
Dec 15, 2011
Possible Duplicate: Difference between e.target and e.currentTarget I don't really understand the difference between these two event.target and event.CurrentTarget and explanation.
View 2 Replies
Jun 20, 2010
I'm new to AS3 and was wondering how I can use something like:
var mc:MovieClip = MovieClip(e.currentTarget);
As part of another instance name.
For example if the currentTarget was a move clip with an instance name of "oneNav" and then I wanted to control a movieclip with the name of "SuboneNav", how could I do it? All the variations of concatenation I'm familiar with weren't working. I even tied getting e.currentTarget.name instead but there always seems to be an issue.
View 5 Replies
Feb 11, 2011
I know I'm missing something rather basic here, but can't figure it out. I want to take a "currentlySelected" target of a hit test and attach it to a movieClip container. It traces as an object, but I can't figure out how to translate this to a movieClip. I'm sure I've done this before--- but I'm drawing a blank.
Code:
trace(currentlySelected + " hit test box 1")
currentlySelected.x=box1.x;
[code].....
View 1 Replies
Feb 11, 2009
Here is what the help defines both:
targetproperty
The event target. This property contains the target node. For example, if a user clicks an OK button, the target node is the display list node containing that button.
currentTargetproperty
The object that is actively processing the Event object with an event listener. For example, if a user clicks an OK button, the current target could be the node containing that button or one of its ancestors that has registered an event listener for that event.
View 2 Replies
Mar 10, 2009
is there something similar to currentTarget with dropTarget?Right now dropTarget will get me the "lowest" DisplayObject possible, but I'd like to get the top-most. I cannot use parent as my objects are of different nesting depths.
View 1 Replies
Feb 1, 2010
i'm trying to create a menu system where each item expands in height when clicked but is then collapsed back to the original state when other items are clicked.m is the height of the expanded state. n is the height of the collapsed state. i is the number tacked on the instance name.Also, I'm using Tweener for smoother transitions. I've done this already by copying out the code but it's 24 items so 24x24 lines of code when I'd like to be able to do it a little more elegantly. Here's roughly what I want to do, but don't know if it's possible:[code]So every box below the one that's been clicked on most recently gets the value of m added to the y value and every box above doesn't.Is it possible to retrieve the value of the variable i that corresponds to the currentTarget?
View 1 Replies
Mar 2, 2010
Quick question, what's the different between these:
[Code]...
I get the basic concept, you're targeting the object that you want to use from the listener in the function. But when do you use which?
View 2 Replies
Aug 25, 2010
I have a number of MC's that I've assigned listeners to through a loop that references an xml table.
//create listeners for all biketrails mc's and designate functionsfunction createListenersbk():void{for(var i:uint=0;i<bktrlXml.row.length();i++){var mc:MovieClip =
[Code].....
I thought I'd be able to replicate the above code and somehow refernce the "idlink" children through the e.curentTarget.
View 1 Replies
May 12, 2011
I'm making a tile game in flash and I need to pass event.currentTarget (the current tile) into a new function which sends the tile back to it's start position.[code]I need to call this function from other places in my code..I've tried passing the object itself to another function as a variable but it loses it's start position information !
View 2 Replies
Apr 1, 2012
I am designing a game in which the player can travel through doors when they are the same color.There are three doors on stage: "door1","door2" and "door3". Each door is an instance of the same symbol. The symbol contains six frames, 3 copies of the door in a different color and 3 copies of the door in different colors with an icon of the player.. The frames are labeled "color1", "color2" "color3" and also "player1","player2" and "player3".
I am attempting to write code that tells Flash to a)select a door at random and then select a random frame for the randomly selected door to set the game for play. For instance, at startup, Flash randomly selects "door2"and then randomly selects "player2". So, the player's starting position will be on "door2" and the door will be red. After this, Flash will select the other door colors randomly from the frames labelled "color1","color2" or "color3".I am attempting to do this with this code:
var min:Number =1;
var max:Number =3;
("door"+String(Math.floor(Math.random()* (max - min) + min) ));
This randomly selects the door.I would like this to randomly select the color of the randomly selected door.
(e.currentTarget).gotoAndStop("color"+String(Math.floor(Math.random() * (max - min) + min); ));
View 9 Replies
Dec 13, 2009
I want to use mutliple images in my flash script and instead of writing tons of code I want to get the 'currentTarget' and assign a variable name to it so I can tweenlite it . Instead of me naming all the instances i thought the following would work but it doesn't.
wedding.addEventListener(MouseEvent.ROLL_OVER, pan_over) ;
function pan_over(e:MouseEvent):void{
var ct:string = Event.currentTarget.name ;
[code].....
View 2 Replies
Feb 20, 2010
package {
import flash.display.;
import flash.events.;
[code]....
View 1 Replies
Feb 25, 2010
the difference between target and currenttarget in flex?
View 3 Replies
Jul 15, 2009
The code I am having trouble with is al the way at the bottom (Actions layer on the stage). Below the multi-line comment.Basically, I have a rotating image bar. One the first level of my file, on the stage, is a container movie clip called "imageScroll". The code that allows the images to rotate is applied to the container clip. Inside of "imageScroll", are a series of 36 images, each with their own unique instance name.On the main level, I have a block of code which first detects when the user mouses over imageScroll. Next my code attempts to dig down one level into imageScroll and find the instance name of the image the users mouse is hovering over.
I want to then store that instance name in a string "_destination", then take that string and store it in a MovieClip variable "currentClip". By doing this, I can then use the variable currentClip to effect the code at the bottom, which causes the images to scale up when the user mouses over, and scale back when the user mouses out.The way I currently have my file set up, the code always returns the instance name imageScroll. I am using event.currentTarget.name to try and pull the instance name of the image. I have tried using event.target.name, but that pulls the instance name of a movie clip two levels lower then I want to go.I basically need a way to modify my code so it finds out which movie clip inside of the container imageScroll the user is mousing over.For those who would prefer to have all the code here, see below:
Code:
//Import required flash packages
import flash.utils.*;
[code].....
View 1 Replies
Feb 17, 2010
I have a function which triggers a tween for the currentTarget in an array when target is clicked but how can I trigger a tween for everything else in the array??
[Code]...
View 2 Replies
Jul 30, 2011
I'm trying to tween six Movieclip (using TweenLite) in an Array to where they scale up when pressed. When another is pressed it scales up and the others will scale down. I'm having trouble getting them to do this consistently. This is probably a minor fix for most of you, but I have been tackling this for two days.[code]
View 1 Replies