ActionScript 3.0 :: Play A Movie When Something Was Dragged And Dropped In The Right Place?

Aug 14, 2011

I am working on an interactive banner and I came to a problem I can't resolve. It's a kind of drag and drop little game. I need to play a movie clip after something is dropped in the right place. I think I need to add Event Listener to a movieclip and create a function with a conditional, but I'm getting it wrong.

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Animated Net To Play When The Basketball Is Dragged & Dropped Into The Net?

Feb 25, 2009

I am using the AS from this tutorial on a bouncing ball that you can drag & drop http:[url]....I have added a basketball net mc that is stopped on frame1 that is a frame by frame animation of the net expanding. I am trying to figure out how to realistically cause the animated net to play when the basketball is dragged & dropped into the net.

Code:
on(press) {
this._freefall = false;
this._momentumY = 0;[code].....

View 5 Replies

Movie Clip Used In One Fla Be Dragged And Dropped Into Another?

Apr 21, 2010

Can i create a custom text animation or something. Ofcourse without involving variables. And can i use this Movie clip in various projects. What am i supposed to do, save it and keep it as a .fla or can the movie clip alone be saved and imported into various projects ?

View 5 Replies

Dragged And Dropped Into An Area(suitcase)

Nov 28, 2009

I have set up some objects so that they can be dragged and dropped into an area(suitcase). This works fine but the thing is that when I move to another part of the timeline the object is put back in the same position it was in before being dropped in the suitcase. I need to be pointed in the right direction with this:

a) If an item is dropped into the suitcase then a message is displayed saying for example "you packed the socks"( I think I can handle this).

b) The object should stay in the case and be displayed there until the interaction moves on(I need this to happen).

c) The user must pack all objects before moving, so I need a way of recognising all objects are packed so that the user can move on..(I need this to happen).

View 3 Replies

ActionScript 3.0 :: Get Rid Of The Dragged Object That Isn't Dropped When The Time Is Over?

Jan 21, 2010

I'm using AS3. I have a timeline with 12 labeled frames (page 1...page12). On frames 1 to 10, I have 3 objects that users can drag and drop onto matching places. There is a timer (60 seconds) and a counter. Users should match 15 objects correctly. If so, they go to frame 12 (congratulations!). If not, they go to frame 11 (Sorry, try again), which returns them to frame 1 (page 1).

ISSUE When users drag an object (mouseDown) and don't release it when time is over, the dragged object remains on the screen. When users go to frame 11 and game starts over, the object remains throughout the entire game.

How can I get rid of the dragged object that isn't dropped when the time is over?

ActionScript Code:
//
// TIMER
var time1:int=60;
var myTimer1:Timer = new Timer(1000, time1);

[code]....

View 1 Replies

ActionScript 3.0 :: MovieClip Continues To Be Dragged And Not Dropped?

May 11, 2010

ActionScript Code:
public function Inventory(arrayOfItems:Array, stageRef, invSprite)
{

[code]......

View 1 Replies

ActionScript 2.0 :: Copy Dragged-n-dropped Objects' Names Together

Nov 21, 2010

I'd like to create an ability to drag-n-drop ~10 max. objects onto target and to get a list or a line of names 'associated' with them, separated by commas or smth. Then, to be able to copy that list into clipboard.

View 9 Replies

ActionScript 1/2 :: Add A Code So Drag And Drop Movie Clip Will Not Stick  Once It Is Dragged To Final Place?

Apr 18, 2011

I have to use the old drag and drop code on my movie clips, but the problem is when I drag the movieclip to the area on my .swf file once i release it, it sticks to the hand mover.I am encloseing the action script I am using could someone or kglad tell me what is missing from the code so that once it is released it will not stick, see code belowcircle.onPress = function(){ startDrag(this);}circle.onRelease = function(){ stopDrag();}

View 3 Replies

ActionScript 2.0 :: F5 - "If The Variable Is Correct AND If It Is Dropped On The Target (g_target) THEN Play The Movie?

Nov 7, 2002

I have an if like this:

on (release) {
stopDrag ();
if (_root.go_blue._droptarget == "/g_target")[code]...

This works. I need to add "if (test = "one")", another drop sets this variable and the drop above should test for it. But I can't get the basics right! I'm a programmer who is new to Actionscript. What I want is:

"If the variable is correct AND if it is dropped on the target (g_target) THEN play the movie, ELSE go back to _x=130, _y=300."

The variable is being assigned correctly, I tested it with a Dynamic text box. The movie isn't running with my code!

View 1 Replies

Flash :: Drag And Drop Application Where Mc Is Dragged Out Of One Parent Mc And Dropped Into Another Parent Mc?

Nov 13, 2010

Simple drag and drop application where mc is dragged out of one parent mc and dropped into another parent mc.All works OK until I added 2 text boxes to the mc's -- one is a non-selectable dynamic text box (a label) which is set by the code, the other is selectable input text that the user can amend.

Finger cursor disappears when user hovers over the section of the mc that contains the text fields (even non-selectable text??) When the user trys to drag the mc by inadvertantly click-dragging anywhere within both text areas it causes this error: TypeError: Error #1034: Type Coercion failed: cannot convert flash.text::TextField@2374a381 to flash.display. MovieClip (same error appears for both text boxes)

The input text box may confuse the user - how do they sometimes click to drag and sometimes click to amend? I need to create an overlay area within the mc that is click-detected for the drag? Here's the relevant bits of code:

var itemArray:Array = [
{iname:"police",ititle:"POLICE OFFICER"},
{iname:"insurance_assessor",ititle:"INSURANCE ASSESSOR"},[code].............

View 1 Replies

ActionScript 2.0 :: Need Movieclip To Lock Into Place Once Dragged?

Aug 20, 2009

what I have are pieces of a truck and the user needs to be able to drag and drop the pieces to the correct locations. I can get the pieces to drag, but I need help locking them into place once they get within a certain area. So for example if they drag and drop the wheels of the truck towards the back, but not in the exact location, then the movieclip will move and lock into place and then the movieclip becomes disabled.

var dragMC = finalMC.graphicMC;
///////////////////////////////////////
onMouseMove = function () {
updateAfterEvent();

[code]....

View 1 Replies

Hide Drag And Drop Items Once They Have Been Dragged Into Place?

Mar 31, 2012

I have made a flash application and in this flash application I have included a jigsaw puzzle. The application is wrote on one timeline and certain frames are used as different pages within the application.

The problem is once the jigsaw drag and drop are moved the pieces are displayed on all frames instead of just the one jigsaw puzzle frame I created.

How can I make these drag and drop items not be shown on the other frames?[code]...

View 1 Replies

ActionScript 2.0 :: Getting MC To Play Once Dropped Correctly?

Jun 7, 2011

I have made a drag and drop quiz, which can allow one drag_mc to be dropped to one of three target_mc's. I would like it that when the drag_mc hits any one of the target_mc's that it goes to and plays the drag_mc's frame 2.

Here is my code so far

stop();
//Import tween classes
import mx.transitions.Tween;
import mx.transitions.easing.*;

[Code]....

View 3 Replies

ActionScript 3.0 :: Making A Drag And Drop Jukebox That Will Play An Xml Playlist When An Icon Is Dropped Onto It's Target?

Mar 8, 2011

i am making a drag and drop jukebox that will play an xml playlist when an icon is dropped onto it's target.i have one xml playlist working, but i need to make a button that will reset all the movie clips to their original position when a playlist has been played.

View 3 Replies

ActionScript 2.0 :: Duplicate A Movie Clip And Then Place It On A Certain Place On The Stage Set _x And _y?

Apr 8, 2005

how can i duplicate a movie clip and then place it on a certain place on the stage

View 5 Replies

ActionScript 1/2 :: Level For A Movie Clip - That Is Dragged To The Stage

Dec 30, 2010

Is there any way to set the depth level for a movie clip that is dragged to the stage, rather than created in Action Script.

View 10 Replies

ActionScript 3.0 :: Detect Haven't Dragged The Movie Clip?

Mar 24, 2009

I have the standard drag and drop functionality setup with the MOUSE_DOWN / MOUSE_UP commands. However, if I just click on the item and decide not to drag, it still executes the commands like it was dragged. Is there any code I can put in so that if they decide not to drag the movie clip, the function doesn't fire?

View 3 Replies

ActionScript 3.0 :: Constrain A Dragged Movie Clip To The Stage?

Jul 1, 2011

I have a movie clip (pano_mc) that I can click and drag left and right. When I drag it to the right, it stops dragging when the left edge of the clip reaches the left edge of the stage. This is great!
 
When I drag the image to the left, the right side edge if the clip does not stop at the right edge of the stage, but continues to click and drag until it reaches the left edge of the stage.
 
I need the left edge of the clip to stop at the left edge of the  stage and the right edge of the clip to stop at the right edge of the  stage.
  
Here is the code I have so far
 
The pano_mc is registered to the top right corner and is 7024px in length. I know it is a bit large. The axis_mc is anchored to the upper left.

[Code]....

View 5 Replies

ActionScript 2.0 :: Graphic To Be Hidden Once A Movie Clip Has Been Dragged Over It?

Mar 14, 2007

I need a few answers and pointers for my game [URL] First off, is it possible for a graphic to be hidden once a movie clip has been dragged over it? The plan is for the grid to be covered in question marks, until the users drags the small smiley over the same large smiley at which point the question mark will be hidden revealing the large smiley. The user then gets a 2nd chance to match up the other remaining smiley, if they fail to get the right smiley is it possible for the question mark image to appear back over the top of the smileys?

View 5 Replies

ActionScript 2.0 :: DropTest - Check And See If The Dragged Movie Clip Is Completely Within The Bounds Of Another Movie Clip

Jan 11, 2010

I'm creating a small drag & drop activity, and I want to be able to check and see if the dragged movie clip is completely within the bounds of another movie clip (or at least in the bounds of a certain x/y zone on the main stage. I can't use dropTest because it returns true if any tiny bit of the movie clip overlaps with the dropTest movie clip.

I also thought of something that just checks the x/y coordinates of the dragged movie clip, but I'd need this to reflect a range of values rather than one coordinate. For instance, I'd want to return true if the movie clip's x is between 50-60 AND the y is between 50-60. I'm attaching a small graphic to illustrate in case my explanation isn't clear enough [URL]

View 3 Replies

ActionScript 2.0 :: Drag-swap Movie - Dragged On The X Coordinate On Click

May 14, 2004

I have a movie that I want to be dragged on the x coordinate on click, and if you drag it to the left it should play a different movie then when you drag it to the right. here is what I tried so far and of course it does not work.

[Code]....

View 1 Replies

Create A Movie Clip And Place Other Movie Clips Inside Of It?

Oct 6, 2009

[URL]
 
At step four, it says to
 
4- Inside another Movie Clip named "Limits" place "Pads" and "Wall". Pads' instance name should be "Pads" and Wall's instance named "Border". We put the Wall and Pads inside the same Movie Clip, to use it to know when the ball collided. And we couldn't put everything together because the ball behaves different if hits the Wall instead of the Pads.
 
How do I create this movie clip and put the other movie clips "inside it"? Also, if anyone can find out, where do I put this movie clip? Do i put it at the same spot as the wall?

View 7 Replies

ActionScript 3.0 :: Place SWF Movies Into A Site And Have Them Play In The Same Window Start Them In

Jan 31, 2010

how to place SWF Movies into a site and have them play in the same window you start them in. I am interest in having it be similar to the way [URL] has there videos, even though those aren't swfs. I'd like there to be a simply play button and when it is done the play button comes up again.

View 0 Replies

ActionScript 2.0 :: Load 3 External Swf Files Into One Place And Make It Play?

Apr 2, 2009

How to write a simple script to load 3 external swf into one place and make it play one by one continuously?

View 6 Replies

Place Movie Clip On Clicked?

Feb 23, 2010

How could you place a movie clip on a click in the same position you click?

View 11 Replies

ActionScript 2.0 :: Place Something Above A Flash Movie?

Aug 26, 2008

If I have an HTML page with a Flash movie. Is there any way to place something in front of the Flash movie? For example, using CSS, to place an image in front of the Flash movie?

View 3 Replies

ActionScript 2.0 :: Bitmap Data - Place Smoke Effect At Specific Place

Feb 1, 2011

How to make this smoke effect work without mouse input. I am trying to have it spill from the end of a cannon, & my attempts to modify the position have resulted in all my bitmaps shifting. I changed this
doTrail(_root, _xmouse, _ymouse, currentBitmap);
To this
doTrail(_root, _x=80, _y=100, currentBitmap);
[Code] .....

View 0 Replies

ActionScript 3.0 :: Where Do Place The Code If I Make A New Fla Movie?

Apr 12, 2010

if i make a new fla movie, and place this code on the first frame

Actionscript Code:var txtFile:String = "http://localhost/php/Portfolio/home.txt";        var urlRequest:URLRequest = new URLRequest (txtFile);        var loader:URLLoader = new URLLoader();        loader.addEventListener(Event.COMPLETE, loadHandler);        loader.load(urlRequest);                function loadHandler(e:Event):void [code]....

View 1 Replies

ActionScript 2.0 :: Easing A Movie Clip Into A Place?

Feb 18, 2004

I've only ever used tweening to move an object on the stage which always looks choppy. Say I have a movie clip that is just off the stage and I want to bring it to the center of the stage nice and smoothly starting slowly, getting faster and the slowing down,what actionscript would I have to use. In fact to make it easier, here's a FLA which uses traditional tweening to move the object, what must I do with it to get rid of the tweening and replace it with a nice smooth actionscript?

View 6 Replies

ActionScript 2.0 :: Place An External .swf Into Main Movie?

Sep 15, 2007

I am trying to place an external .swf into my main movie.

I created a container movie for the .swf in the main .fla:

Code:
this.createEmptyMovieClip("mapcontainer",this.getNextHighestDepth );
mapcontainer._x = 163;
mapcontainer._y = 101;

[Code]....

I imagine that the solution lies in readjusting _root for the fact that the external .swf is now placed inside a parent, but I don't know how to do that.

n.b. my final movie is meant to run offline.

View 2 Replies







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