ActionScript 1/2 :: Draggable Movieclip Within The X And Y Axis Of Another Movieclip?

Aug 2, 2011

I know that startDrag function allow a movieclip to be draggable on the stage. But what I'm trying to achieve here is that I want that certain movieclip to be draggable on a limited space. I attach a screenshot for further information.Above is a screeshot of the flash movie. The white area is the stage and the green square is the draggable movieclip while the gray rectangle is its draggable limit.

View 3 Replies


Similar Posts:


ActionScript 1/2 :: Multiple Draggable Movieclip Within The X And Y Axis Of Another Movieclip

Mar 19, 2012

I have this four draggable movieclips. I have able to drag the green bar within the gray bar and the dynamic percentage text increase/decrease accordingly.

The program should make the second draggable determine the percentage of the first (100 - current value) and make it the basis for the other 3 draggable.

Example:
 
if the 1st draggable will be 75%. the other 25% will be divided by the other 3 draggables.

The 3rd draggable determine the 2nd percentage (100 - current value) and make it the basis for the other 2 draggable and so on.
 
When I drag the 1st draggable the other 3 is drag & animated accordingly but I cannot drag the 2nd, 3rd and 4th draggable.

View 1 Replies

ActionScript 3.0 :: Draggable Movieclip With Loop In Y-axis?

Sep 17, 2009

For the last couple of days I've been trying to find an example of a draggable movieclip (with mouse) in Y-axis which also can loop. This movieclip will load several different dynamic SWF-files from a XML file, but they are all the same width and height.I want this movieclip draggable in Y-axis only, and it should loop when you reach the end. But I can't figure it out tbh.What I want to achieve is similar to this: But in a vertical direction and when you grab something all 3 images that are visible should follow the mouse movement.Here is a code that I've written, you can drag the "container"-movieclip, but I can't figure out how to loop it and everytime I press and drag it again, the movieclip pops back to Y:0 at the mouse-pointer, hard to explain

import caurina.transitions.*;
import flash.display.Sprite;
import flash.events.Event;

[code].....

View 2 Replies

ActionScript 2.0 :: OnRelease For MovieClip Inside Draggable MovieClip [Flash Pro 8]?

Dec 3, 2006

I have a movie clip, circle_mc, and in it is embed another movie clip, point_mc. I made the circle draggable with this:

Code:
circle_mc.onPress = function() {
startDrag(this);

[code]....

View 3 Replies

ActionScript 1/2 :: Movieclip In ButtonMode - Draggable To Different Movieclip Target?

Jan 8, 2010

I'm doing a project that makes a movieclip draggable in different droptarget movieclip. When it is dragged in the 1st target an animation is triggered and so as the rest of the droptargets.Here's my initial code that does'nt work:
 
btn1.buttonMode = true;
b1OrigX = btn1._x;b1OrigY = btn1._y;
//btn1btn1.onPress = function(){    startDrag(this);}//droptarget = box1btn1.onRelease = function(){    stopDrag();       //droptarge1t

[code]....

View 2 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 :: Buttons In A Draggable Movieclip?

May 24, 2008

I have a MovieClip that has startDrag(). Inside the MC I have buttons, but when I click the buttons it wants to drag. How do I make the buttons clickable?

View 3 Replies

ActionScript 2.0 :: Draggable Movieclip Won't Work

Aug 29, 2002

I have a movie with a draggable movieclip. It works, when I preview the movie, and save it as an swf file itself. But when I load it through another .swf file for some reason the movie clip isn't draggable. Here's the code that I'm using now.

[Code]...

View 12 Replies

ActionScript 3.0 :: How To Create Duplicate Draggable MovieClip

Jun 13, 2011

I have a mc that is added to the stage. It extends a dragdrop class. How can I duplicate it so the orig stays where it is and the duplicate is draggable.

View 9 Replies

ActionScript 2.0 :: Draggable Objects - Both Button And MovieClip

Oct 25, 2004

Why is it that when I have button in a movie clip and that movieclip is a draggable object the button becomes inactive? How can I have both the button and the movieclip draggable and the button continue to function. Below is the script I have for the draggable movieclip, which has the button contained within that:

Code:
on (press) {
startDrag(_root.dragObject);
} on (release) {
stopDrag();
}
Attached is my file

View 6 Replies

ActionScript 3.0 :: Making A Draggable Item That Can Only Drag On An Axis?

Oct 5, 2010

What I want to create is a movie clip, that I can drag, but only on axis, such as up and down, but not left to right. For example, only on an X axis, but not on a Y axis.The code i'm currently using to make the items draggable is:
 
pc.onPress=function(){
startDrag("pc",true,50,50,550,350);
removeMovieClip("cnt");

[code]....
 
"pc" is the instance name of the movie clip I want to drag. "cnt" is a line that I've got drawn between the various draggable points I've created.

View 3 Replies

ActionScript 2.0 :: Creating Vertical Menu Draggable On Y Axis

Sep 3, 2010

I am building a vertical menu that is draggable on the Y axis.
1.How do I add easing? Can I use fuse?
2.If the button that is being dragged reaches a point on the y axis it would trigger a function. If it is let go before reaching that point the button would snap back to the original position. I guess a simple (if statement) would work - but not working for me
3.Last thing. It is a vertical menu, so when a button is being dragged everything above it would drag with it. Cannot seem to get that to happen

View 1 Replies

ActionScript 1/2 :: Can't Click On Any Buttons Inside Draggable Movieclip

Dec 13, 2010

I have a draggable movieclip, mc_PI on stage in which I have another movieclip, mc_PIcontainer into which I load an image.I then place a few buttons, btn_Ant1, btn_Ant2, etc. inside mc_PI.mc_PI drags just fine within the bounds I specify, but I cannot click on any of the buttons that are located inside mc_PI.I need the buttons to be inside mc_PI, because I need them to drag along with the image located in mc_PI.mcPIcontainer.[code]

View 11 Replies

ActionScript 3.0 :: Close Button Inside Draggable MovieClip

Jun 25, 2011

I wanna have my dragable movie clips able to close themselves just like you get in your operating system folder windows, but I cant seem to get a button inside the movie clip remove to remove itself.

View 9 Replies

Flash :: Clamp MovieClip To Only Be Draggable Inside Stage?

Mar 19, 2010

I have a MovieClip that I want the user to be able to drag inside the stage, but I don't want it to be able to move outside the stage. Currently I'm using this._parent.startDrag(); to allow the MC to be dragged, but I don't know how to stop it from being dragged outside the frame.

View 1 Replies

ActionScript 2.0 :: Coded Draggable Rotating Movieclip Effect?

Mar 18, 2010

My client has a simple shape that they want the user to be able to animate, i.e. it looks like a single square on the stage, but when you grab it and drag, a load of squares appear and fan out from the corner of the first. I was thinking, I can easily achieve the first part of this by attaching, say 20 movieclips of my square to the stage, but I'm not sure how to approach the back/forth draggable aspect of this.

View 1 Replies

ActionScript 2.0 :: Draggable - When Press The Movieclip Goes To Strange Coordinate

Aug 15, 2007

i have an issue with some startDrag objects. I am using this code:

[Code]...

problem is:

1 - Sometimes i just cant target it, no idea why (i imported the Ai files and then just hit F8 and make it a movieclip)

2 - Sometimes, when i press the movieclip goes to strange coordinate

View 1 Replies

ActionScript 3.0 :: Bound MovieClip Not Draggable Outside Visible Stage Area

Jul 31, 2009

I have some movieClips on stage which are draggable and I don't want them to be draggable outside of a visible stage area. Problem is these movieClips are inside a sprite which is panable and then for whatever reason this bounds doesn't work anymore as I intend it to. How do I fix this bounds?

Code:
var arr:Array = [m1,m2,m3,m4,m5,m6,m7,m8,m9,m10];
var thumbSprite:Sprite = new Sprite();
addChild(thumbSprite);
for each (var item in arr) {
item.addEventListener(MouseEvent.MOUSE_DOWN, startDragCard, false, 0, true);
[Code] .....

View 3 Replies

ActionScript 2.0 :: Drag Movieclip On Y-axis

Apr 26, 2010

Is it possible to drag a movie clip named "xxxx" along the y axis when you click and drag? if so what is the as2 code?

View 1 Replies

ActionScript 3.0 :: Repeat MovieClip Along X Axis

Feb 17, 2011

I'm new to flash. and action script.. I'm trying to repeat my Movieclip 'wave' using TimeLineMax from com.greensock Package. I'm able to repeat it in the correct way... with the following..

var tl:TimeLineMax=new TimeLineMax({repeat:20,yoyo:false,repeatDelay:1.5,ease:Elastic.easeIn Out});
tl.append(TweenMax.to(wave,1,{x:"2200"}));

But, I want my mc to start back from the starting of the stage, when it cross the stage. i.e. the part that cross the stage should again start from the 0 of x and follow......

View 4 Replies

ActionScript 2.0 :: Repeat A Movieclip Across Y Axis?

Dec 22, 2004

Im trying to repeat a movieclip across y axis soo it takes Stage.height and divdes the height of movieclip and finds out how many times to duplicate movieclip soo it covers entier swf. Stage..here instance back is the movieclip to be repeated along y axis. and back_repeat is the variable that contains value of how many times the back movieclip should be repeated

Code:
back_repeat = Stage.height/back._height;
back_repeat = Math.round(back_repeat);
i=0;
while(i<back_repeat) {

[Code]...

View 1 Replies

ActionScript 2.0 :: Moving The X Axis Of A Movieclip?

Dec 7, 2003

how to move the x axis of a movieclip.

I am almost finished with a site and I have five main buttons at the top- Home - About - Services - Portfolio - Contact. Then I have placed a movieclip in the center of the stage with an image inside that has a width of 3740. This leaves 747 for each section. I need it to move over 747 for each section plus or minus and I know that from Home to Contact it will have to move 2992 but I think I can figure all that out as soon as I just figure out how to get it to move and set a speed.

View 2 Replies

ActionScript 3.0 :: Movieclip Move On Menu X Axis?

Jun 16, 2009

I'm making a Website, where the the menu will have a luminous movieclip which follows the menu items X axis around and stays there.I wan't to confine the movement to the menu only. Once it leaves the area, the bar stops moving.This is what I have so far:

stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
function mouseMove(event:MouseEvent) {
menubar_mc.x = mouseX;
}

View 1 Replies

ActionScript 2.0 :: Making Movieclip Look At Cursor On The X Axis

Jan 15, 2010

I have been trying in vain to make my movieclip look at my cursor on the X axis. The problem I have is that, when it's negative scale. it's keeps looping the 2 directions.

[Code]....

View 0 Replies

ActionScript 2.0 :: [Flash8] Scaling A Movieclip From 100%-70%-100% Using The X-axis

Aug 22, 2007

I am building a flash piece in which I need an object to move across the stage from right to left and scale from 100% just off the right side of the stage, to 70% in the middle of the stage and then 100% again just off the left side of the stage. Giving the illusion that it is moving in a circular pattern around the viewer. My goal is to get the scaling to be relative to the MC's x position on the stage. Moving it across the stage is the easy part, and I can scale the MC from 100% on the right to 0% on the left using an onEnterFrame function containing:

MC._xscale = MC._yscale = Math.round((MC._x/Stage.width)*100);

but I can't seem to figure the 100-70-100 deal out. I thought there might be a math function like sin, cos or tan that would really help out, but I can't seem to find anything out there

View 3 Replies

Actionscript 3 :: Rotate Movieclip On Different Axis On Mouse Position?

Mar 27, 2011

I am looking for direction to this old UFC effect - [URL] that appears on the main page. It is movieclips rotating on different axis based on the mouse position. So far I have found this script:

stage.addEventListener(MouseEvent.MOUSE_MOVE,EnterFrame);
function EnterFrame(e:Event)
{
mc.rotation = (180*Math.atan2(mouseY-mc.y,mouseX-mc.x))/Math.PI + 90;
}

But this only rotates on x and y. What's a way to approach this effect?

View 1 Replies

ActionScript 2.0 :: MovieClip Movement - Image Panning On X And Y Axis

Nov 6, 2006

I've mastered the way of image panning on an x asis for menus and so forth, but I am trying to get it working with an x and y asis. I mean like the main navigation in this example [URL].

View 4 Replies

ActionScript 3.0 :: Custom Class Registration - Rotating At 0 - 0 Axis And Not At The Centre Of The MovieClip

Apr 3, 2009

I posted a question regarding how to make a ladybug move around the screen and I managed to make a class that loaded a ladybug png then using a timer moves the bug around the screen...
but I have a huge problem...this has been bugging me all day and cannot find a solution...
The ladybug moves around the screen but rotates towards the moving direction before moving. The problem is that the ladybug is rotating at 0,0 axis and not at the centre of the movieClip. Is there a way to offset the registration point so that the ladybug rotates centred?

[Code]...

View 1 Replies

ActionScript 2.0 :: Making A MovieClip Move Side To Side Along The Horizontal Axis?

Dec 22, 2008

Im in need of a simple code which makes a MovieClip move side to side horizontally preferably using the attachMovie function.The MovieClip must not go off the screen so the movement will have to be limited within the stage size.

View 11 Replies

ActionScript 2.0 :: Movieclip To Move Along The X-axis To A Certain Point And Then Back To The Starting Point Again?

Apr 12, 2007

It's been a long time since I've done any work with actionscript, and alas I've forgotten nearly everything. I've tried to look for a tutorial that would explain basic animation with actionscript, but the one that I found on Kirupa was no longer there.

Basically I'd like to do this:On the stage I have a movieclip and I'd like the movieclip to move along the x-axis to a certain point and then back to the starting point again. The moving speed of the movieclip should also be adjustable.

View 8 Replies







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