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


Similar Posts:


Collision Detection Incorrectly Detecting Collision?

Oct 16, 2009

In my file (AS2), I have a small square at the middle of the page. Diagonally to the right, I have a vertical wall which is a rectangle. Pasted inside my small square, I have the code:

onClipEvent(enterFrame) {
if (Key.isDown(Key.RIGHT)) {
if (this.hitTest(Wall._x, Wall._y, false))  _x =

[code]......

View 1 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

Gravity And Collision In CS4?

Sep 14, 2009

I worked on a new Flash project, but I cant seem to find a good solution for how I want my objects to collide. In my project I have: a Ball(moving object) and a Floor(not moving).
 
The ball is positioned over the floor and drops onto the floor through the gravity that is applied with the code.

[Code]...
 
Is there a way to have a global gravity in flash AS3. In which you could choose what objects you want to be affected by it? Is there a way to have a block of code that separates moving from still objects and will not let any objects collide(not overlap)?

View 1 Replies

IDE :: Gravity And Collision In CS4?

Sep 14, 2009

In my project I have: a Ball(moving object) and a Floor(not moving).The ball is positioned over the floor and drops onto the floor through the gravity that is applied with the code.

[code]....

First: the -23 in the code is what I don't like. Second: every single object that deals with collisions would need to be put into the if statement.Is there a way to have a global gravity in flash AS3. In which you could choose what objects you want to be affected by it?Is there a way to have a block of code that separates moving from still objects and will not let any objects collide(not overlap)?

View 2 Replies

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

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 :: Determine When Number Is Even / Odd

Apr 13, 2011

Im working at a school project atm, and i need to know how you determine if a number is even or odd

View 1 Replies

ActionScript 2.0 :: Determine When Something Is Rotating CW / CCW?

Dec 1, 2007

Is there a way in actionscript to determine if something is rotating CW or CCW? I created a knob in Flash but i'm stuck on how to tell which way the user is dragging it?

View 2 Replies

Checking Collision Between Two Symbols

Jan 7, 2010

What kind of code would one need to check for collisions between two symbols? I am hoping to become a game designer so this is important for future references.

View 8 Replies

AS 2 :: CS3 Collision Detection Ie Hit Test

Jun 21, 2010

Im currently working on a demo flash game built on AS 2.0. im a very beginner to this flash and AS and im stuck up with a very silly concept though im not able to overcome it. the problem i have is with collision detection ie hit test and im really struggling with it.

[Code]....

View 1 Replies

Flash :: Using Boxes For Hit Collision?

Jan 31, 2010

I am trying to use boxes for hit collision. I want to be precise with the collision so I was thinking about making multiple small boxes and checking for collision that way. This maybe a stupid idea or a smart one. If I do this way will that affect the performance of the game even though the boxes are invisible and wont be drawn on the stage.

map out the object starting from its center outward. Like right, left, top and bottom. I am creating a flying shooter so the plane has a long wing span. I could also map out the wing span and tail and so on.

View 2 Replies

ActionScript 3.0 :: Gravity And Collision In CS4?

Sep 14, 2009

In my project I have: a Ball(moving object) and a Floor(not moving).The ball is positioned over the floor and drops onto the floor through the gravity that is applied with the code.

Code:
var gy:Number = 0;
var gravity:Number = .2
function ballMovement(event:Event):void{

[code]....

First: the -23 in the code is what I don't like.

Second: every single object that deals with collisions would need to be put into the if statement.Is there a way to have a global gravity in flash AS3. In which you could choose what objects you want to be affected by it?Is there a way to have a block of code that separates moving from still objects and will not let any objects collide(not overlap)?

View 1 Replies

Actionscript 3.0 :: Collision Detection Kit?

Oct 16, 2010

Im using CDK, and I want to exclude color black.im using this: __collisionList.excludeColor(0x00000000);

View 5 Replies

ActionScript 2.0 :: Collision For A Line?

Jun 7, 2007

I have two particles (mc's) that are linked together to a line. Both particles use xspeed and yspeed when they are moving.

Then to my question.. how will the particles xspeed/yspeed change when the line collide into another movieclip? I know how I can check the collision, but I don't know how I'm going to change the speeds.

I have to use (in the very collision moment);

particle_1's xspeed/yspeed
particle_2's xspeed/yspeed

the lines rotation the direction the line came from the length of the line where on the line it collides

View 4 Replies

IDE :: Easy Way To Do Collision Detection?

May 3, 2009

Its been many years since I've used flash and I was just wondering what the easiest way to do collision detection was now. I know that there was some hit test bounding box stuff present earlier but I don't know the capabilities of flash cs4 and the advances that have been made. Google searches have yielded things like complex pixel-perfect collision detection but not a lot seems to have been written about CS4 yet.

View 3 Replies

IDE :: Collision Detections For Multiple Mc?

Feb 10, 2010

I am trying to create collision detection between mcs without having to write the code 10 times.
I thought this would work but it gives me this error:

TypeError: Error #1034: Type Coercion failed: cannot convert "crisisAnimation" to flash.display.MovieClip.
at ImagineServicesText2_fla::MainTimeline/hitTester()

Code:
var target_mc:Array = new Array();
var numTextBoxes:Number;
target_mc = ["crisisAnimation","eventTextAnimation","mediaRelationsAnimation", "mediaAnimation", "graphicAnimation", "webAnimation", "advertisingAnimation"];

[code]....

View 4 Replies

ActionScript 3.0 :: Determine Time Between Key Presses?

May 28, 2009

How would I go about determining the time in-between key presses in AS3? Basically, if a user is tapping the space bar to a beat, I want to be able to average the time in between 10 taps/key presses and get an output time in milliseconds.

My thought was to use an interval and after every press I would add that amount of time to an array. After 10 presses, I would take the average of all the numbers in the array and then output that number.

View 1 Replies

ActionScript 2.0 :: Using Variables To Determine Timeline Nav?

May 31, 2009

I am building a menu system. There are 4 main menu buttons for the 4 different pages of the site. When you click on one of these I want to animate the existing menu structure off the page in a fancy way. So each area has an exit animation if you like. The thing is i would only rather have this ONCE in the timeline for each page/area. So would it be possible to play it once and then after it, have a variable to determine where yuo go next that is already assigned a value depending on what button the end user pressed.

[Code]...

View 5 Replies







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