Actionscript 3.0 :: Control Scaling In Array Using Event.currentTarget

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


Similar Posts:


ActionScript 3.0 :: Control Scaling In Array Using Event.currentTarget?

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:
import flash.events.MouseEvent;
import flash.display.MovieClip;

[code].....

View 1 Replies

ActionScript 3.0 :: Difference Between Event.target & Event.currentTarget?

May 4, 2010

i'm new to AS3. Couldn't understand what some of the explanations out there are getting at, so i decided to post it here. In the code example below, what does event.target & event.currentTarget point to?

[Code]...

View 5 Replies

ActionScript 3.0 :: Event.target Or Event.currentTarget?

Jul 11, 2011

I have a Flex 4 List component which I have tied a click event to. In my event, my assignment of the source file paths works just fine --> my larger image displays just fine when a thumbnail click happens. My problem comes when trying to attach elements of the dataProvider to text inputs on another panel. Actionscript is throwing an error. Can someone point me in the right direction??

[Code]...

View 6 Replies

ActionScript 3.0 :: Using Event.currentTarget With XML?

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

IDE :: Event.currentTarget.name To External URL?

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

ActionScript 3.0 :: Pass Event.currentTarget To Function

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

Flash :: Assign Variable Name To Event.currentTarget?

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

ActionScript 3.0 :: Sending Looped Event.CurrentTarget To Start Position?

Nov 23, 2010

I've got a problem with an if/else statement within a function which checks to see which 'drop area' one of ten items should to snap to.. the problem is I can only set the start location of each item to work on the first hitTest, otherwise after clicking another item or positioning any item in one of the drop areas, the drop area becomes it's start location due to startDrag() and stopDrag() been called again to move the object..

What I've tried to do here is to create a variable (which does trace the correct (currentTargetHome) movieclip reference, but as a string) but it doesn't work when I try to access it's attributes using [currentTargetHome]. The item exists within the movieclip "gamePage" and the rest of the function works !

[Code].....

View 9 Replies

ActionScript 3.0 :: E.currentTarget - Trigger A Tween For Everything Else In The Array?

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

ActionScript 3.0 :: Event.currentTarget - Use One Function For All Buttons - Load Another MovieClip In Library

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

Actionscript 3 :: Check If A Movieclip Exists On A Specific Location Relative To Event.currentTarget?

Sep 22, 2011

How can I check if the stage contains a movieclip on a specific x and y location on the stage?I'm building a colour-guessing game. The purpose is to walk a path through a generated field of hexagons, each assigned a random colour (yellow, red, blue or green), based on what soundfile you hear. So if you hear "yellow", you have to click a yellow tile etc.But because I want it to be a path, and the colours of the tiles are randomly generated, I have to check which colours border the currently active tile. I literally have no idea how to do this. I thought this might work but it doesnt:

if ((this.tile.y == (event.currentTarget.y - 64)) != null) {
//add the colour of this tile to array
}

[code].....

View 2 Replies

Actionscript 3.0 :: CurrentTarget And Concatenation - Control A Movieclip With The Name Of "SuboneNav"

Jun 20, 2010

I 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 (different variations of ["Sub"+mc]). I tried getting e.currentTarget.name instead but there are issues with using what it returns to reference a movieclip etc...

View 2 Replies

AS3 :: Flash - Control Scaling Of Objects During Fullscreen?

Aug 12, 2011

I have flash ui built over the chromeless youtube player right now and I'm wondering if there is anyway to set certain sprites within the stage to not scale on fullscreen without having to do inverted scaling.

Edit: I use FlashDevelop as my IDE and building this purely in as3

View 1 Replies

Professional :: Event Listener - Remove The Child (e.currentTarget) And Create A New Child In Its Place With The Next Line But It Doesn't Work

Feb 19, 2010

public function GlobalSolutions()
{
Navigation(' Home ', 'index', 235, 0x97F9EC);
Navigation(' Office Supplies ', 'Office_Supplies', 295, 0x97F9EC);

[code]....
 
I want to remove the appropriate child (e.currentTarget) and create a new child in its place with the next line, but it doesn't work. What do?

View 13 Replies

Actionscript :: Flex - MouseOver Event And Image Scaling

Apr 18, 2010

1) if I create items in a for loop, is correct to add a new eventListener for each item ? Or should I add only 1 eventListener to the parent ? and call the event through ID ? 2) if I want to scale my item, (a LinkButton with icon image), I noticed that the icon is sometimes resized with delay, so I have a bit of flickering when I trigger the event. Should I not use icons, and set the image in another way ? How can I fix this?

View 1 Replies

ActionScript 3.0 :: Scaling Down A Movieclip On MOUSE_DOWN Calls A Registered ROLL_OUT Event Listener?

Apr 12, 2010

I'd like to simply scale down a movieclip (that I'm treating as a button) when the user presses their mouse button.  When users release the mouse button, I want my button to scale back to it's normal (.scaleX = .scaleY = 1) size.  My button also has listereners for a ROLL_OUT event to turn off (.alpha = 0) a highlight movieclip that rests atop movieclips showing the different states the button can be in.
 
When I roll over the button, the higlight comes, but there is an annoying flicker problem.  For some odd reason, when I press the mouse button the ROLL_OUT event handler function is called, yet I didn't scale the movie down enough for the cursor to be off of the actual button itself.  I do not want that flicker.  I'm not sure why ROLL_OUT is being called even though the event is clearly a mouse down, and within the mouse down event handler I am scaling the button movie clip, but not enough to remove out from under the cursor.  In other words, if I click the button at its registration point, a flicker appears.
 
Here's my code. 

//this add all the appropriate listeners to the button        private function addMouseListeners()        {            this.addEventListener(MouseEvent.MOUSE_OVER, mouseOver);            this.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);            this.addEventListener(MouseEvent.ROLL_OUT, rollOut);            this.addEventListener(MouseEvent.MOUSE_UP, mouseUp);        }    

[code]....
 
why my rollOut function is being called when the mouse button is pressed, and called once more when the mouse button is released.

View 8 Replies

ActionScript 2.0 :: No Resize/scaling A Movie Clip On The Scaling Stage?

Mar 11, 2008

I've search through all the threads with "scaling" and "resizing" and can't find the solution.

Basically I have a GUI element on a gallery that I don't want to scale, while the rest of the page is free to resize/scale.

I think I need to add a listener of some sort to the stage, but I'm not sure how to do this.

View 2 Replies

ActionScript 3.0 :: Scaling Button Background Without Scaling Text?

Feb 23, 2009

I'm building some navigation that extends all the way from left to right across my SWF. When the window resizes, I'd like the nav buttons to get wider but not have the text on the buttons get wider.

The buttons themselves are rectangles with a vertical gradient and a stroke around the outside. I'm using 9-slice scaling so the stroke doesn't scale, but the middle (gradient) gets wider or narrower.What'd be great is to be able to select an object or layer and say "don't scale, even if the rest of this movie clip scales". Is there a way to do that, or will I have to do it via actionscript?

View 1 Replies

ActionScript 3.0 :: Scaling Movieclip Not Scaling But Repeating?

May 20, 2010

i have a diagonal movieclip that I am trying to scale along with the background video. The background video scales perfect, I am attaching the diagonal movieclip (br in the code as bottomright) with addChild
Instead of scaling with the window, it seems to repeat such as the image is displaying. this is the main section of the code that is doing the scaling
 
var br:mc_bottomright = new mc_bottomright();
addChild(br);
//proportional scale
if ((stage.stageWidth / stage.stageHeight)> (owidth/oheight))

[code]....

View 4 Replies

ActionScript 3.0 :: Scaling A Movieclip Without Scaling Its Contents

Apr 10, 2009

I am trying to achieve an effect of scaling a movie clip on click...very similar to [URL] When the user clicks on See, Hear, Play and Shop boxes, the boxes expand. I have created a box movieclip that has a bar on top. This bar is a movie clip inside the box movieclip. When i try to scale the main box movieclip, the internal bar movie clip scales as well. How to stop this?

View 2 Replies

Flex :: HTML Control's Event Won't Fire?

Sep 14, 2011

I'm having trouble firing or capturing the results of an event firing.

Here's the current code...

<s:Panel id="instructionsPanel" left="0" right="0" top="0" bottom="0" title="Register">
<mx:HTML id="htmlViewer" left="10" right="10" top="0" bottom="10"

[Code].....

What's happening is that the user fills out a form in the HTML Viewer, then when they click the submit button I want to be notified of the page change.

If they land on URL A, then they'll be shown one message. If they land on URL B, they'll be shown another.

However, the event isn't firing.

I've also tried COMPLETE and HTML_DOM_INITIALIZE.

View 1 Replies

ActionScript 3.0 :: Access The Check-box Control And Its Event-listeners?

Jan 22, 2009

How to access the Check-box control and its event-listeners. If a check-box(which is a movie-clip) is selected, I need AS 3.0 code in such a way that:

[Code]...

View 2 Replies

Flex :: DragDrop Event Not Firing For TextArea Control?

Feb 2, 2010

I'm working on a simple view in my app that allows a user to drag an item from a list control and drop it onto a textarea.

Seems the dragEnter event fires just fine, but the dragDrop event does not.

View 1 Replies

ActionScript 3.0 :: Making A Keyboard Event Control A Button?

Dec 12, 2010

how to make an keyboard event listener control a button to have it make a sound. i am making a drum kit that you will be able to play using specific key on the keyboard. i have it built and functioning with just using mouse clicks but for my end result i would like to have the keyboard and mouse be able to control it.

View 1 Replies

ActionScript 2.0 :: Array.onPress - Add A OnPress Event To Dynamically Duplicated MovieClips ID's Stored In Array List

Apr 15, 2011

lets say i have dynamically duplicated movieClips ID's stored in array list. i want to add a onPress event to them. how do i do it?

[Code]...

View 5 Replies

ActionScript 3.0 :: Can't Remove Enterframe Event Listener In Control Animation

Jan 12, 2011

I am trying to create a simple play, stop, rewind. fforward controller. I have the slideShow and the Control in the same time line. As the enterframe event is nested inside a function it will rewind but then none of the other buttons will work as I am not able to removeEventListener for the enterframe event.

[Code].....

View 2 Replies

Flex :: 3 - Adobe 3 List Control Selection And Change Event

Nov 22, 2009

I created a list control at runtime as following:

[Code]....

//Where myDataArray is an ArrayCollection consisting of my Custom ValueObjects. When i execute the code it displays my list with custom item renderer, which is fine. But when bring my mouse over it, it doesn't give any colour highlight which means it is not selecting. Secondly, when i click on any of the list item, it doesn't dispatch any change event. I tried a lot but couldn't understand it.

View 1 Replies

Flex :: 3 DateChooser Control - Date Selection Changes On MouseUp Event

Dec 13, 2010

If you have a DateChooser control next to a text control and you left click your mouse to select the text then continue holding down the mouse button and letting the mouse button up while over the datechooser control, the selectedDate value changes to the date you are hovering over. I have users that are having issues with this and it happens unintentionally because of the proximity of the two controls. I cannot find a way to stop this effect. Basically I would want the selectedDate to only change if the user actually clicks the calendar control ie. mouseDown or click. Calling functions in those events do not change this behavior. I need a way to disable the control from changing the date on the mouseUpEvent (I think).

View 1 Replies

ActionScript 2.0 :: Control A MovieClip Animation Based On A NetStream Event?

Jul 29, 2006

[URL]

What I am trying to do is get the animation of the audio levels (red bars next to the power switch) to only happen while a video is actually playing (videos are in the video gallery section). I have the animation done and I can easily get it to start and stop based on pressing the play and stop buttons, but since they start and pause the video you would get instances where the video isn't playing but the audio levels would be animated, which I don't want.

Here is an example of the code in the play button (using NetConnection and NetStream to play the videos):

Code:
play_btn.onPress = function() {
playSound.start();
infoText_txt.text = "PLAY";
my_ns.pause(spotToPlay);
};

The only way I can think to make it work exactly as I want it is to have Flash look to see if the video is actually playing or not and I can't figure out how to do this or if its even possible using the NetStream command I am using to start and stop the videos.

View 5 Replies







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