ActionScript 1/2 :: HitTest And Draggable MCs?

Aug 16, 2009

These codes are in the draggable MC: fish1_drag this is my code:
 
onClipEvent (enterFrame) {    this.onPress = function() {        startDrag(this);    };
_root.UI1_mc.UI1_mc2.inv_mc.ISpace1.onEnterFrame = function() {        if (this.hitTest(fish1_drag)) {            stopDrag();        } else {        }    };}
 
I keep jumbling it up so that one thing works but the other doesnt. But basicly I need it so that when I drag fish1_drag (instance name) over ISpace1 (which is within many MCs : _root.UI1_mc.UI1_mc2.inv_mc.ISpace1 but opens up so you can drag it over it) for it the drop on the ISpace1.
 
I have another MC in the library and il get that the attach to the ISpace1 but what im finding difficult is just being able to drag the fish1_drag over the ISpace1 and releasing.
 
Here is some other reandom code that I have in a comment on my AC panel:
 
/*
this.onRelease = function() {                stopDrag();                _root.UI1_mc.UI1_mc2.inv_mc.ISpace1.attachMovie("fish1_mc","attached1 ",this.getNextHighestDepth());                _root.invCount += 1;                updateAfterEvent();  // I probly dont need this updateAfterEvent. but its there anyway.            };
*/

View 3 Replies


Similar Posts:


ActionScript 2.0 :: Create An "hitTest" Script Inside A Movieclip That Is Actually Part Of That HitTest Code?

Jan 15, 2009

i just would like to know how to create an "hitTest" script inside a movieclip that is actually part of that hitTest code?I mean... I have mc A, and mc B. and the current hitTest code im using (that is on the timeline) makes mc A, destroy mc B when collide with it... but there are many mc B on the stage (with the same instance name) so, when mc A collide with one mc B, it destroys ALL mc's B... but i want it to destroy only the mc B that he collides, not all the others... maybe an hitTest script inside a movieclip B would work (somethig like "if MC A hitTest ME = i die" (not all the others)).

View 1 Replies

ActionScript 3.0 :: Do Something After Hittest " Remove Hittest After First Collsion"?

Feb 8, 2010

i am controlling a tractor mc with right and left keyboard keys and let the user move the tractor till it reach a certain point where it touch a mc i want to go to a certain frame and stop the keyboard event listener and also the hit test listenerso finally the tractor is moved by user till it touches the mc then we will jump to a certain framethis certain frame will not have both of the tractor and the mcPHP Code:

import fl.transitions.Tween;
import fl.transitions.easing.*;
import flash.display.MovieClip;

[code].....

View 1 Replies

How To Make Draggable Items

Aug 29, 2004

I only started yesterday with no knowledge at all.How do you make draggable items? I looked around and I saw things about actionscript and all that but what do you do?

View 5 Replies

Buttons Which To Make Them Draggable?

Apr 16, 2009

I have 4 buttons which i have to make them draggable. The problem is that i have 3 conditions

condition #1. Only 1 button/mclip is draggable in its axis [done].

condition #2 .The 4 button/mclip must be dragabble at the same time, that is, when i drag one, the others should drag at the same time in their own axis.

[Code]...

View 2 Replies

Create A Draggable Interactive Map Using CS3?

Mar 8, 2010

create a draggable interactive map using CS3 and using actionscript 2.1. We are creating an application for a touch screen device and we must provide a draggable map which contains 'hotspots' which when clicked provide additional information (text and pictures).

I need clickable buttons that stay in the same relative position over the map so that when it is dragged the buttons move with the map. (sorry if that sounds confusing) At present I can only get a static button working which stays in the same position and the map moves independently.

View 6 Replies

ActionScript 2.0 :: Draggable Circles With RGB Mix Add

Nov 29, 2010

I got to create an app with 3 draggable circles. (Red,Green,Blue). At the centre overlay the RGB needs to display the mixed RGB. I.e if red and blue, overlay display magenta. If green and red overlay display yellow. If red, blue and green overlay display white, etc.

View 1 Replies

ActionScript 3.0 :: Button In Draggable MC?

Mar 31, 2010

I'm working on a project where I have cards that need to be moved around and flipped. The cards themselves are on individual movie clips. I originally intended for a double-click to flip the card, and a click-and-drag to movem them around. That just wouldn't work; for some reason the double click wouldn't work even thogh I had doubleClickEnabled set to true. So what I'm currently trying is to have a button that flips the cards within the card movie clip; however that is also not working. Somehow, the button stays in place instead of being moved with the rest of the MC.

View 3 Replies

ActionScript 1/2 :: Draggable Progress Bar For Swf?

Oct 12, 2011

I need to add a progress bar/playback controls for a presentation built in AS 2.0 which has such length voice over in it we've decided we need to give the user the ability to see where they are in the timeline and scrub through sections of the presentation. I'm familiar with stop and pause button code in situations like this, but it's the first time I've needed this kind of functionality. Presently, the first part of my project is set up with several scenes and is completely linear. The second section is interactive with swfs loaded into empty movieclips.
 
I've found a number of references to progress bars online, but they're all for loading content, not for navigating once content is downloaded.

View 1 Replies

ActionScript 2.0 :: Big Map - Zoom In And Out And Draggable?

Mar 8, 2005

So I have a Big map that i can zoom in and out and draggable too.But I want on a corner a smaller version of the map and a square to show me where i am on the big map.

View 3 Replies

ActionScript 2.0 :: How To Do A Draggable Zoom

Jun 12, 2007

there was a tutorial that was here where it showed how to do a draggable zoom thingie. and i cant find it. and ive looked for it a billion times and i cant find it!so here is what i want to happen.ok, so the normal view, when you click on the magnifying glass, you can move it around, and showing a zoomed view of the picture. now i know that you have to have two pictures, one big and one small. and a mask. and, dragging. and thats about it.

View 1 Replies

ActionScript 2.0 :: Draggable Map With Popups?

Mar 17, 2009

I'm working on a project that requires a draggable map that has buttons that popup onrollover. Inside the popup will be a brief discription and and link that should carry you to another part of the move. Problem is, I don't know how to deal with the fact that buttons/rollover have become "inactive" because their in my draggable map. I am using startDrag for the map.

View 1 Replies

IDE :: Generate A Draggable Mc From A Button?

Dec 7, 2009

I have a text input box with a submit button. When the submit button is clicked, I'd like a draggable MC to be created on the stage that contains the input text.

View 4 Replies

ActionScript 3.0 :: Draggable Toolbar's Transparency?

Aug 31, 2007

Is there a way to turn off the transparent appearance of the toolbars when you drag them in Flash CS3. For example, when I drag the actionscript toolbar, it turns transparent and it's really lagging on my system

View 2 Replies

Make A Draggable Pull Down Button?

Feb 23, 2010

I just started making some simple banners for web sites. I got a new one to do this morning, and I was asked to make a button that says drag/pull here. as you drag/pull down, it reveals the layer below it. Also, as the button reaches halfway, it needs to go all the way automatically as well, so the users don't have to drag all the way down themselves. Is that something I need to do in actionscript

View 3 Replies

CS3 Draggable Map For Touch Screen Device?

Mar 5, 2010

We are using CS3 and using actionscript 2.1. We are creating an application for a touch screen device and we must provide a draggable map. I have a map that is much larger than the screen size and I wish to be able to drag the map.Additionally the map needs to contain 'hotspots' which the user can click on and it shows additional information

View 1 Replies

ActionScript 3.0 :: Draggable MCs With Lines Connecting Them?

Feb 5, 2009

I want to create a movie that allows boxes to be dragged around, and for lines to be connecting each box, wherever they are dragged. I have made the boxes draggable with the attached code.

what I mean, here is an example FLA: boxes.fla

I have no idea where to start on this, because searching for things like AS3 draggable movie clip with lines attaching, etc isn't very helpful.

View 6 Replies

ActionScript 3.0 :: Add Text To A Draggable Mask?

Apr 5, 2010

I want to add a line of text to a small mask - the mask reveals a portion of an image underneath - the user drags the mask around the stage

2 movie clips

1. an image that fills the 900x700 stage

2. a 200x200 rect with blur that acts as a "window" to the image

The code below works fine (almost - see comment) but how do I add text to the mask?
 
img_mc.mask = mask_mc;mask_mc.buttonMode = true;img_mc.cacheAsBitmap = true; // for the blur
mask_mc.addEventListener(MouseEvent.MOUSE_DOWN, dF);
mask_mc.addEventListener(MouseEvent.MOUSE_UP,

[Code].....

View 8 Replies

ActionScript 3.0 :: Boundaries For Draggable Objects?

Jul 24, 2010

How can I make draggable objects not go off screen?

View 5 Replies

Flex :: How To Make Panel Draggable

Jan 17, 2011

I give my users the ability to create items. The Create item dialogs such as:

<s:Panel id="postitNoteCreatePanel"
horizontalCenter="0" verticalCenter="0"
...

How can I make panel draggable so that users can move it around the page so it doesn't block other items

View 5 Replies

ActionScript 3.0 :: How To Make MovieClip Draggable

Nov 4, 2007

I'm just trying to simply make a movie clip draggable (it was all oh so easy in AS2!) I'm getting "1120- access of undefined property "waves_mc"). Yes, I have the clip named waves_mc.

View 9 Replies

ActionScript 2.0 :: Resetting X And Y On Draggable Movieclips

Feb 3, 2009

I've got 6 draggable movie clips that snap to a target - which works fine. If they don't hit the target area they snap back to their starting point- which also works fine.

My problem is that they can all be dragged to the target one after another, but I only want one movieclip to be at the target at any one time.

So,when I start dragging a new clip toward the target I want the movieclip thats already on the target to reset itself to it's starting position, thus being replaced by the incoming clip.

I want this to happen for all the draggable clips.

function dragSetup(clip, targ) {
clip.onPress = function() {
startDrag(this);
this.beingDragged=true;

[Code].....

View 3 Replies

ActionScript 2.0 :: Draggable Xml Video Playlist

Feb 2, 2010

I am working on a video player with a selectable xml video playlist. I have successfully made the playlist draggable but can't seem to figure out how to allow the list (previously accessible outside the draggable movie clip) to be selectable. drag_mc is the movie clip which I have made draggable. Here is the part of code I am dealing with:

[CODE]...

View 0 Replies

ActionScript 3.0 :: Draggable From Top Rope Or Pendulum

Jun 18, 2010

i am searching for a rope that has something attached at the bottom and i can swing it around by dragging the rope from the top(not from the object attached). it might be a rope(more flexible) or just a rigid line, like a draggable from top pendulum.

i came across the box2d physics engines and erik hagreis' site made with menus that are suspended with ropes. but im still stuck, i dont know how to make the ropes draggable from the top(instead of from the bottom, as in erik's site). if anyone has a hint or an alternative solution to using physics engines, let me know. im out of searches, i searched the whole net...

View 1 Replies

ActionScript 3.0 :: Snap One Draggable Mc To Another When Overlap?

Oct 28, 2010

i have two draggable mclips on stage and need one of them two snap to the other whenever it passes over it. I tried with f(hitTestObject){ mc1.x = mc2.x; and mc1.y = mc2.y}, but it doesn�t work very nice.

View 1 Replies

ActionScript 3.0 :: Making A Text Box Draggable?

May 10, 2011

ive got a text box a user can enter some information, an add_btn whcih will place the text onto an image inside a UILoader.i keep getting this error :

Quote:

TypeError: Error #1010: A term is undefined and has no properties.
at DLS_fla::MainTimeline/onClickadd_btn()

when i hit the add_btn... why has it got no properties

ActionScript Code:
function onClickadd_btn(evt:MouseEvent):void{
//and the work around for removing the old text when new confession is added.
if(newTextBox!=null){

[code]....

View 9 Replies

ActionScript 2.0 :: Have Some Objects On The Root Which Are Draggable?

Jan 23, 2004

i'm trying to think through a little multi user game...how can i have some objects on the root, which are draggable, be shown to have movement when someone on a different computer is clicking them? i'd like to have the users mouse be visible to everyone... when you click and move an object... i can see your mouse moving, clicking, and moving the object.

View 2 Replies

ActionScript 2.0 :: (flash) Draggable Mc With Boundary?

Mar 17, 2004

I have a menu that i need to be able to drag, but the menu is only allowed to be dragged to a certain constraint. (i.e. before the menu can no longer be visible within the .swf) I have the basic drag ac:

on (press) {
startDrag ("");
}
on (release) {
stopDrag ();
}

How would i go about adding constraints to this mc?

View 6 Replies

ActionScript 2.0 :: Draggable Input Textfield?

Dec 21, 2005

okay here I just pick up tje code from this forum ..somewhere i forgot..ok it's work great...the problem is I try using button to create the draggable textfield it's appear but can't be drag anymore..so what's wrong with the code..and one more thing..what I want is that I can create many textfield just by pressing the btn..is it possibile...in different coordinate..this is the code

Code:
function createtxt(){
this.createEmptyMovieClip('but_mc', 2);

[code]....

View 12 Replies

ActionScript 2.0 :: Add Draggable Scrollbar To Thumbnails?

May 26, 2007

adding a scroll bar, like one that would be used for text, to the bottom of the thumbnail gallery to slide the thumbs? [URL]

View 1 Replies







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