ActionScript 3.0 :: Determine Which One Has Been Clicked

Oct 7, 2009

i am trying to make a photo gallery so when people click on a thumbnail it expands to full screen, my problem is i have lots of pictures and i want to determine which one has been clicked. i thought i would use the e.target in a simple if statement like this:

[Code].....

in this picture one and two are both on the stage with instance names of picture and picture2.

View 3 Replies


Similar Posts:


ActionScript 2.0 :: Determine Which Button Is Clicked?

Aug 2, 2006

I would like the submenu to become black when clicked and so on. Here's some code (if you have the time the whole thing is included as an attachment). Greetings from Sweden.

Code:
function createSubMenu(num, nypos) {
var array = "sm"+num+"_array";
var totalsm = eval(array).length;

[Code]....

View 2 Replies

ActionScript 3.0 :: Determine If Text Was Clicked In TextField?

Jul 15, 2009

I have a TextField, containing some characters. The TextField is bigger though and containes some empty space. Now I need to determine if on a mouse click on this TextField, the user hit the text or if he hits the empty space.

View 4 Replies

ActionScript 3.0 :: Function To Determine Which Button Is Being Clicked?

Oct 19, 2010

I'm writing an app where I want to know which, of an unspecified set of buttons, the user is clicking.The actual location of buttons determined by previous user actions, so I cant use information like mouseX.You can see from the code the way I'm attacking this - trying to access the button based on its position in the display list of a container. Unfortunately this has always led to type coercion errors 0 - AS can't see that e.target is a DisplayObject.se has solved this problem.

ActionScript Code:
import flash.display.DisplayObject;
import flash.display.Graphics;

[code].....

View 2 Replies

ActionScript 2.0 :: Forloop - Determine Which Thumb Was Clicked?

Jun 18, 2008

i basically have a gallery with thumbs loaded in via xml. and then a currentThumb.onRollover function depending on which thumb was clicked. Now this is all within the forloop function on frame1. what if I want the actions to occur on frame 2 of the main timeline after the coinciding thumb has been clicked. How can I determine which thumb was clicked? I tried using a _global.id = i; but that doesnt store the correct value from the loop.

View 8 Replies

Flex :: Determine Which Path Element Clicked In FXG File?

Oct 17, 2011

I am working on a sample map application using Flex 4/fxg? Now I have got FXG paths held in Group elements with id's( I have assigned path's id's to the corresponding group container)? But when I click anywhere in the map, I do not get the clicked group as target/currentTarget in event handler. How to determine which element is clicked?

[Code]...

View 1 Replies

Actionscript 3 :: Determine The Index Of An Element In Array That Has Been Clicked?

Jan 3, 2012

Say, I have an array of movie clips (dummies). Each dummy has an event listener and reacts to clicks. And when a dummy is clicked, I want to know the index of the clicked dummy.

I've only come up with this solution: run through the whole array of dummies and find out which dummy is the target, then exit the 'for' cycle and assign some global variable the value of counter variable, but this way the application I am building will demontsrate poor performance.

View 2 Replies

Flex :: Events - Determine Which Button Was Clicked In Dialog

Feb 26, 2012

I am using browseForSave() to give the user a chance to save a file before navigating back to a previous screen. As of now the cancel button on the save dialog just closes the save dialog. I want to see if the cancel button was clicked, and if so continue navigating back to the previous screen without saving. Right now the person has to save the file in order to move back. Below is the code I'm using.

[Code]...

View 1 Replies

Actionscript 3 :: Determine The Index Of An Element In Array That Has Been Clicked?

Sep 2, 2004

I have an array of movie clips (dummies). Each dummy has an event listener and reacts to clicks. And when a dummy is clicked, I want to know the index of the clicked dummy.I've only come up with this solution: run through the whole array of dummies and find out which dummy is the target, then exit the 'for' cycle and assign some global variable the value of counter variable, but this way the application I am building will demontsrate poor performance.

View 12 Replies

ActionScript 3.0 :: Alert Flash To Determine Which Movie Clip On The Stage Is Clicked?

Apr 13, 2011

I have a group of movie clips, each placed randomly on the stage. I want to be able to click one of the movie clips and move them around. They are stored in an array.

View 5 Replies

ActionScript 3.0 :: Detect Wheather The Button Is Clicked Or Not And Disable It If Clicked?

Jun 9, 2010

I have 4 navigation button and like home, about us etc....  And i want to disable home when it is click and cannot clicked it until the user click another button first. means if a visitor is at home page then home navigation is disabled, and all other are active, and when they click at aboutus button then the pages goes to the about us page and the about us button is disabled and other get active. I want this solution in AS3 with oop concept.

View 6 Replies

ActionScript 2.0 :: Buttons To Stay Orange Once Clicked And Only Roll Out Back To Grey When The User Has Clicked On Another Button In The List

Feb 7, 2007

I've got about 6 buttons laid out, one on top of the other in a list format. In their normal state the buttons are grey in colour, when I rollover them, the buttons flash and turn to orange. Now, what I need to happen is this: I want the buttons to stay orange once clicked and only roll out back to grey when the user has clicked on another button in the list. I've been told that the best way to do this is via adding a listener, however I am a little unsure as to how to go about this. I've checked the flash help file and have a basic understanding of how listeners work...but can't really wrap my head around applying it to this situation. Perhaps I will need to have all the buttons as separate broadcasters?

View 2 Replies

ActionScript 2.0 :: When Mouse Is Clicked, Detect Which Movieclip Is Clicked

Sep 9, 2009

I have parent movieclip and in that many different children movieclips

What i want to do is when i CLICK, i want to detect which movieclip it has clicked and call corresponding function (defined by onpress event) of that movieclip.

View 6 Replies

ActionScript 3.0 :: If ButtonOne Is Clicked && ButtonTwo Is Clicked > Go To And Play?

Nov 6, 2011

What does the code look like if I want the user to click two specific buttons then go to a new frame. I've been trying different methods, but I am honestly not brilliant with conditional statements. This is what I've got so far...

about_btn.addEventListener(MouseEvent.CLICK, clickAbout);
home_btn.addEventListener(MouseEvent.CLICK, clickMain);
if (function clickMain(event) && function clickAbout(event))

[code]....

View 7 Replies

ActionScript 2.0 :: Buttons That Stay Clicked Until Another Is Clicked?

Feb 8, 2011

I haven't been able to find a solution that fits my project. I am working on a 50 state map, where I need each state to stay down once clicked, but go up when any other state is clicked. [code]...

View 9 Replies

ActionScript 2.0 :: Active Button - Stay The Rollon Color After It's Clicked And Then The Rolloff Color When Another Button Is Clicked?

Sep 29, 2008

How can I make it stay the rollon color after it's clicked and then the rolloff color when another button is clicked?

[Code]...

View 7 Replies

Determine When Someone Is On With Flash?

Sep 27, 2010

I want to update a row in mysql when a user uses an application with flash. And when they exit that application, I want to change the row to reflect that the user has left. Is there a way to do this easily? Currently, I'm thinking of writing a connection manager with sockets.

View 1 Replies

ActionScript 3.0 :: Determine The X Value Of A Rectangle?

Mar 18, 2009

I am creating 6 rectangles through a loop like this:

var target:Array = new Array();
for (var i:Number = 1; i < 7; i++){
target
= new Sprite();
target.graphics.lineStyle(0,0,1);

[Code]...

View 6 Replies

Determine AS Version With/without Having Flash?

May 4, 2009

We generate a LOT of swfs where I work. We've got a group of people managing putting the swfs into our asset management system. These people do NOT have flash or anything adobe. However, they need to be able to determine the AS setting on the swfs. Is there a tool (preferably cheap or even free) that can be used to determine the Actionscript level of a swf?

View 11 Replies

ActionScript 3.0 :: Determine End Of Video?

Oct 22, 2009

I need to know how to tell when I've reached the end of video. I seem to recall there's a command new to flash 10 that will let you know without having to track the total bytes used or time elapsed or anything complicated like that. 

View 4 Replies

ActionScript 3.0 :: Determine When Tween Is Done?

Dec 3, 2009

I'm loading texts from an external file and horizontally scroll the texts accross the screen with the following tween:

slideXTween = new Tween(txtField, "x", None.easeNone, txtField.x, -txtField.x*3, 70, true);
 
How do I find out when the tween is done and start loading another external text file or show a static/dynamic movie clip on the screen?

View 10 Replies

ActionScript 1/2 :: Swf Determine What URL It's Hosted Under?

Jan 31, 2010

Is there any way via Actionscript that I can have a swf determine what URL it's hosted under? For instance, if I put my swf on this site, I want it to behave one way and on another behave completely differently. Make sense?

View 7 Replies

ActionScript 3.0 :: Determine Whether A Swf Is Being Tested In The IDE?

Apr 19, 2010

Is there an easy way to determine whether a swf is being tested in the IDE?
Have a number of params that change whether I'm working in development or production .. it's getting tiresome changing them .. i'ld be nice if I could do it programatically ..

View 3 Replies

ActionScript 3.0 :: Determine When A Mc Is On A Certain Frame?

Sep 4, 2010

I'm trying to trigger functions when a mc is on a certain frame, but the code I have doesn't seem to be working.
 
I have this code on the main timeline
 
function test (e:Event){
if (test_mc.currentFrame == 6){
trace("test_mc.currentFrame == 6")
}
}

And then in the test.mc itself, on frame 6 I have this code stop();

I've given it an instance name on the stage and it's not giving me any errors, but it's also not giving me any results.

View 1 Replies

Determine Buffering / Playing?

Oct 8, 2010

I'm trying to use NetStream events from an FMS 3.5.4 server but am having trouble.  I'd like to simply know when a video is playing, buffering, or idle.  I know about Play.Start and Play.Stop, but these can mean the video is playing, or the video is buffering.  Buffer.Full and Buffer.Flush can occur when a video is paused, playing, stopped, seeking, etc.  I'm scouring over every event I get, but I really see no good way to determine what the exact state of a NetStream is at a given time.

View 1 Replies

Determine When FMS Is Starting To Get Overloaded?

Aug 5, 2011

We have a set of FMS's deployed on Amazon's EC2.  One of the things we want to be able to do is automatically detect when we should start up another FMS instance.  To do that, I've been looking for metrics I could measure on the local FMS box to help me identify "transition" points, e.g., when we should add capacity or remove excess capacity.

I ran some load testing to find out where the capacity limits of a particular box, but ran into a couple of problems[code]...

View 9 Replies

Flash :: Determine Availability With JSP

Jul 9, 2010

I need to swap a JSP form with a Flash form should the user have it installed. I know there is a JavaScript option, but don't want to use this as that cuts out people who have Flash but not JavaScript.

View 1 Replies

Determine If IOS App Is Built With Flash?

Apr 5, 2011

Is FarmVille on the iOS built with Flash? And if so, how can you tell? Are there certain flags that exist in the form of certain files or magic numbers within the .app folder hierarchy?

View 3 Replies

ActionScript 3.0 :: Determine If A Dictionary Contains A Particular Key Or Not?

Aug 18, 2008

What is the correct way to determine if a Dictionary contains a particular key or not?

In Java I can do:
HashMap x= new HashMap();
x.containsKey("test"); // returns true/false
Is this the correct way in AS3?
var xictionary = new Dictionary();
x["test"] == null

[Code]...

View 7 Replies

ActionScript 3.0 :: Collision: Determine The Name Of Mc Hit

Feb 2, 2010

suppose I have a set of movieclips on stage. Each movieclips has its own name. I can drag one of these and check when my dragged movieclip collide with the other ones. Is there a way to determine the name of the movieclip that was hit by the dragged one without having to use a for-loop statement and/or array?

View 2 Replies







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