ActionScript 2.0 :: Auto Targeting System - Switch Targets With The "D" Key?

Jul 29, 2009

Auto targeting system, i am able to find the Target with the rotating arm holding the "S" key but i need some tips how i can switch targets with the "D" Key?

View 9 Replies


Similar Posts:


ActionScript 3.0 :: Targeting A Particle System In A Container?

May 5, 2009

I've written a game with a particle system, as the particles go off the stage, they are removed.  At the end of the game I want to remove all the particles which are still on the stage.  How can I do this?
 
My first thought is to put all the particles in a container and then remove the container at the end of the game.  However, if I put the particles in a container, I can't reference them anymore with event.target

View 2 Replies

ActionScript 3.0 :: Building An Auto-complete Menu System?

Nov 20, 2009

I am building an autocomplete menu system, and need the general function to be simple as I will be adding a lot more functionality to it later...

this is my start, but it returns too many results, how can I bind the results?

[Code].....

View 1 Replies

ActionScript 3.0 :: System.useCodePage - Getting Error 1120: Access Of Undefined Property 'System?

Aug 7, 2009

I got a textfile who i am reading on a serverside script and passing it as a script to my client side as3 code. The problem is that i am using characters like ä,ö,ü,ß and this isn't well displayed. I tried System.useCodePage but the compiler complains about : 1120: Access of undefined property 'System'. It doesnt matter if I tried this on the first line of the 'Action' in the first scene or in the first line of the first .as file i am loading. (btw i am only working with .as file and not in the timeline). When i am importing flash.System.* the compiler complains he dont know useCodePage.

View 3 Replies

ActionScript 2.0 :: Making An Auto-play/an Auto-resume?

Jan 2, 2009

I'm making an interactive film. At certain points within the film, the viewer has the ability to select from a few options that will direct them to an external video clip (they are flashback scenes). The main story pauses when the user selects a flashback scene and I'm clear on how to achieve this.

However, my issue is that once the flashback scene ends and the external video closes, I'm not sure how the main story will resume. Is it possible for it to auto-play (resume) in some way? My last resort would be to have the viewer select a play button - this is only because I do not want a break in the narrative and want to limit the amount of clicks the viewer has to make.

View 9 Replies

ActionScript 3.0 :: Particle System And Masking - Particle System Movieclips To Display An Image?

Dec 29, 2010

Is it possible to make this a mask? The system contains one movieclip of a circle called ball, also a class called ball and a class called particle. I want the particle system movieclips to display an image...I'm sure this is possible...just have not been able to find a way. A little backround, I'm a completely selftaught n00b when it comes to AS3, but I'm grasping it fairly well... the tutorial is on this website, called A Simple Particle System Using Actionscript 3.

View 0 Replies

ActionScript 3.0 :: Switch / Case And Nested Switch / Case

Oct 30, 2011

What I'm trying to do is create a program that, depending on 2 variables, multiplies another variable by a static number. Heres the code I have so far:

[Code]...

View 1 Replies

ActionScript 2.0 :: Can Default From Switch/case Be Used In Another Switch/case

Dec 10, 2003

I want this on an MC:

[AS]
i = 0;
switch(thing){
case 0:

[code]....

Basically what I'm wondering is, will I lose the value of i in the first switch once I'm out of the switch? Can the second switch read the 1st switch?

View 8 Replies

ActionScript 3.0 :: Switch/Case And Nested Switch/Case?

Oct 29, 2011

Im trying to create a program that, depending on 2 variables, multiplies another variable by a static number. A friend suggested I use case/switch instead of if/else statements,which is what I was using before.

[Code]...

View 1 Replies

ActionScript 3.0 :: Add Targets During A Game?

Aug 4, 2009

I am trying to improve a basic paddle ball game by adding one or more targets to be hit by the ball during the game. The idea is targets appear and then when hit by the ball, the player's score is incremented then target is destroyed.

The problem is that a test for collision of ball with target gives an error during compile time as the target does not exist yet. On declaring the target at the start of the game but adding to the stage after a time, still creates the target at position (0,0) as follows[code]...

View 3 Replies

IDE :: Drag And Drop With Targets?

Apr 9, 2009

I followed kirupa's drag and drop with targets tutorial. I want the clock in my fla file to get bigger when it touches the bar. How can i do this?

View 7 Replies

ActionScript 2.0 :: Two Drop Targets At Once?

May 18, 2007

I'm using this actionscript at the moment:

Code:
if (_root.pin2._droptarget == "/container/mcDraw"){

but is it possible to have two droptargets so that the actions are only carried out when the drag object is dropped within the bounds of two different movieclips? i.e when all three are overlapping.

View 1 Replies

ActionScript 2.0 :: Multiple Targets For SetScrollTarget?

Oct 31, 2002

Does anyone know if there is a way to have 1 scrollbar scroll more than one textfield? (I'm trying to create a shadow in my textfield thisway, but the scrolling seems to cause some problems here..)

View 3 Replies

ActionScript 3.0 :: Lock On To Multiple Targets?

Jul 31, 2009

This is for a fretboard type game, I want six dots (fingers) to lock on to any of the 6 targets. This code doesn't seem to work, instead of locking on to each target, the fingers lock on to the last one (target6_mc) and whenever they are droped over the other targets, they just locks on to target6 again. any suggestions? Excuse the noobness

Code:
package
{

[code].....

View 3 Replies

ActionScript 3.0 :: Assigning Same Name To Multiple Targets?

Feb 3, 2009

I tried the drag and drop demo at [URL]. It works well allowing me to drag an item and have it register when it is dropped on the correct target. I want to modify it so that I can drag an item to multiple locations... not just one. My desired application is the ability to drag pendents or charms onto a bracelet or chain and have them "snap" to the chain. With the above demo, I can see how 90% of it would work, but I cannot figure out how to have multiple targets named the same. The bulk of the code is attached.

The line I believe needs to changed is this one:
if (event.target.dropTarget != null &&
event.target.dropTarget.parent == myTarget){
I need this part :event.target.dropTarget.parent == myTarget
to read something to the affect of:
if item being dropped is over object A OR object B OR object
C OR object D than ... rest of my code

View 7 Replies

ActionScript 3.0 :: Drop Mc On Multiple Targets?

Mar 18, 2010

I want to create a drag and drop app that will allow the user to drop mc onto either one of two correct targets.I gave the targets the same instance name but that doesn't work.The program only recognizes the first target mc created as correct.How can I make either target the correct one?

function dropIt(event:MouseEvent):void [code]....

View 8 Replies

ActionScript 3.0 :: Drag And Drop Onto Targets?

Jul 3, 2009

I was wondering if anyone could help with a problem i'm having with flash. I have been given a flash file to edit - creating a drag and drop feature. I've 10 move clips that have to be draged onto the right target. I've given instance names to both the targets and movie clips that have to be dragged. I've used flash for quite a while now, about 4yrs but still get muddled up with actionscript. I've added the following code to one of the movie clips to be dragged and the error below is displayed - The class or interface 'MouseEvent' could not be loaded function drag(event:MouseEvent):void{

[Code]...

View 1 Replies

ActionScript 2.0 :: Multi HitTest Targets?

Jul 24, 2009

I am currently making a game involving matchsticks. i have the dragging of the matchsticks working. But now i would like to know how to check if 2 (or more or less depending on what level) of the possible matchsticks are dropped on the target. When the right matchsticks are drop in the right places i will put in an action like "gotoNextFrame" or make the continue menu visible.

View 9 Replies

ActionScript 3.0 :: Way To Have The Ball Hit Multiple Targets?

Jul 27, 2009

I'm running a hitTestObject for when ball hits target1 - The working code works great below.

Is there a way to have the ball hit multiple targets? Instead of hitting just target1 can it return when it hits target1, target2, target3..etc.

[Code]...

View 2 Replies

ActionScript 3.0 :: Link A Scrollbar To Two Targets?

Oct 19, 2009

Is it possible to link a scrollbar to two targets?

In other words, I want one scrollbar to scroll two textboxes at the same time.

If I do it with the component inspector window I cannot get it to work. Is it possible to do this in code?

I know I have the option of using a scrollpane but I am trying to avoid this because the way the code is already set up.

View 0 Replies

ActionScript 2.0 :: Drag And Drop To Targets?

Oct 21, 2009

I am presently working on a project that has a map of a country and it needs to be assembled (like in a puzzle game). And an action(like an appreciation) has to appear when the correct piece is placed in correct slot/target....if the wrong piece is placed--the piece has to move to the Previous position.

View 1 Replies

ActionScript 3.0 :: HitTestObject With Multiple Targets?

Nov 16, 2011

simply set: I do have a dragable movieclip (mcMagniDisplay) which is generated on the fly while initializing all my variables ... and I do have 4 circles (mc_boxXHitCircle) which are already placed at the bottom in the stage in advance.All I need to do is check, wheter the mcMagniDisplay is hovering one of the circles or not.

********************** code snippet ***********************
var mcMagniDisplay:MovieClip = new MovieClip();
stage.addEventListener(Event.ENTER_FRAME, hitTest);

[code]......

View 5 Replies

ActionScript 2.0 :: Drag And Drop Targets?

Aug 4, 2003

here is the code i have,

on (press) {
startDrag (this, true);
}

[code]......

View 4 Replies

IDE :: Drop Targets Not Working After Mc Put Into Container?

Feb 25, 2010

I have produced a Flash movieclip, containing a fair few layers, including masked layers, actionscript etc. One of the things it does is allows the user to click and drag a number of movieclips and drop them anywhere within the mc, but if they drop them on specific drop targets then some actionscript kicks in, stops the drag object from being draggable again and advances through its frames to basically 'enlarge' the drag object and play a sound to show the user they've hit the right mark.

This all works perfectly on its own, or in a browser window etc.

The problem I have is when I try to insert the Flash movie into an Adobe Captivate 4 e-learning package. Things work ok apart from when you drop the dragged object onto a drop target, nothing happens. The actionscript doesn't execute.

Would the fact that the movieclip is (probably) sitting within a container (the Captivate e-learning package)? If so, how do I get around this issue?

View 1 Replies

Use Photos Of Family Members Instead Of Paper Targets

Feb 3, 2011

i am trying to create a game for my family website, it will look the picture below but instead of paper targets i want to use photos of family members. I have no real flash experience, could somebody give me a good starting point.

View 1 Replies

ActionScript 3.0 :: Drag And Drop To Multiple Targets?

Oct 5, 2011

I have created a simple drag and drop game with 4 signs to be dragged onto 4 targets. As two of the answers are the same I need to be able to have the possibility of both signs to be dragged onto either target.

Quote:

stop();
// Second Level Quit button
// loads second.swf in again
quit_mc.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_2);

[Code]....

View 1 Replies

Professional :: Drag And Drop To Multiple Targets?

May 11, 2010

Im trying to create a simple drag and drop app where you can drap a movieclip into multiple areas.This is the code i have so far (taken from a tutorial i found) thats works perfectly for 1 target but not for multiples. I initially tried giving the targets the same instance name but that didnt work.
 
stop();var startX:Number;var startY:Number;
square_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);square_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt);
function pickUp(event:MouseEvent):void { square_mc.gotoAndStop (2); event.target.startDrag(true);

[code]....

View 6 Replies

ActionScript 3.0 :: Drag And Drop With Multiple Targets

Sep 17, 2010

I'm having a problem find a solution to my drag and drop problem. Here is what this flash piece is basically supposed to do: 9 dragable items on the stage5 targets, numbers 1 - 5, where the items can be placed5 of the 9 dragable items are the correct answer and the user needs to drag them to the correct target, and have to be in order from 1-5. (eg. let's say the instructions are: Please place the, in the correct order, the 5 steps to getting ready in the morning.
Drag items Targets
Brush teeth 1.
Change oil in car  2.
Wash Face 3.
Put pants on 4.
Shower 5.
Get out of bed
Do tax's

So far I have it so if you drop the correct answer into its correct target it snaps to it and disable it's eventListeners. If you drop the drag item on the other targets they snap to it and disable it as well. They only problem is if the user accidentally drops the item anywheres else on the stage it locks it in place. Instead I want it to return to the original x and y position.

Here is my code
DragDrop.as
package{ import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.filters.DropShadowFilter;
public class DragDrop extends MovieClip {
public var _targetPiece:*;
public function DragDrop() {
[Code] .....

View 5 Replies

AS3 :: Getting The Mouse Targets Children One Level Deep?

Jan 24, 2011

I want to find only the first level of children. Right now I'm using e.target.name but this is also catching those targets children. How would I prevent this?

View 2 Replies

ActionScript 2.0 :: Drag And Drop Multiple Targets?

Sep 9, 2011

I'm using the script "drag & drop multiple targets", with the swapDepth enabled, making the last clicked item to come in front of all the clips on the board.So far, so good. But I have some of the draggers made up by small circles, stacked/glued together vertically (7 in a row) which make these new draggers taller than the majority. The problem is that when I try to drag and snap them, the bottom circle doesn't center into the middle of the dropping zone like the others. These new draggers center themselves with their vertical center into the center of the dragging zones.

I really need to have all these taller draggers centered themselves with the bottom cercle into the middle of the dropping targets, like the simple draggers made up by a single circle.Is there a way to work around, applying a rule to the chosen individual objects without specifically applying to the main script? I mean when you drop the item, forcing it to snap a little bit higher in relation with Y coordinate of the dropping zones.

ActionScript Code:
function dragSetup(clip, targArray) {
clip.onPress = function() {
startDrag(this); this.swapDepths(_root.getNextHighestDepth());

[code]....

View 1 Replies







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