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
Similar Posts:
Feb 27, 2005
How would i make it so that i can make something move at an x/y coordinate and have it move there with ease?
View 1 Replies
Feb 27, 2005
How would i make it so that i can make something move at an x/y coordinate and have it move there with ease?
View 1 Replies
Mar 31, 2010
I have 3 square. smallest square s3 is inside s2. s2 is in side s1. each is 10px larger [code]how can I find the coordinate of child in its parent's coordinate system?
View 1 Replies
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
Jan 23, 2010
I am working on a AS3 file called Main using Flash CS3.When testing the movieclip, the compiler showed an error on the line:import flash.display.MovieClip;The exact message is this:1046: Type was not found or was not a compile-time constant: TextField.import flash.display.MovieClip;The code I used is rather short. It is shown below:
ActionScript Code:
package
{
[code].......
View 2 Replies
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
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
Jul 13, 2011
I have a movieclip with a drag function, and after each drag I want it to trace the x position. I tried the following code but it always outputs 0.
ActionScript Code:
sliderMC.addEventListener(MouseEvent.MOUSE_DOWN, fl_ClickToPosition);
function fl_ClickToPosition(event:MouseEvent):void
[Code].....
View 5 Replies
May 16, 2011
It all works fine, unless I tab through the fields before-hand. Then it seems to find new elements and I am not sure what they areand why they suddenly exist. You will note I have also excluded "_searchKey". Another element that I don't know how it came to exist.Elements are:
focus_mc
_childCounter
depthChild0
[code]........
View 9 Replies
May 11, 2010
I am currently in the process of creating a scroller that would take in movieclips comprised of images and video. It will continually scroll to the left, and the animations and video will play at a certain point on the stage.
The problem I am encountering right now is how to place the movieclips on the scroller. my first thought was place them in the actual movieclip, but then you can't access them on stage.
My second thought was to assign their x coordinate to a certain part of the scroller and just increment the x coordinate with the same system to make it look like it was attached. The only problem with that is I would need to track the scroller's x coordinate so I would know when it gets to the middle of the stage (so I could play the video inside of the smaller movieclip at that location.)
track a movieclip's x coordinate like that? could I run through it and trace, and then act on that trace? I'm so confused.
Will my first attempt at this work? Is it somehow possible to access movieclips within a bigger movieclip and treat them as if they were on stage?
View 1 Replies
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
Feb 3, 2012
I have a series of dots on a world map that depending on certain criteria move from one country to another. At the moment they move to a random point around the country's (mc) centre, as calculated by addind half the width to the x or y coordinate etc. This pressents certain problems such as the centre of the US is actually outside the boundries of the countries borders because of Alaska. Other countries such as the UK have dots floating just off the coast. The dots also cluster coveringing each other up.
Is it posible to generate a random x and y coordinate that is inside the boundries of an irregular shaped mc such as a country. I know that Flash must have these values because of colision detection and mouse overs. I just don't know how you go about accessing them.
View 3 Replies
Jan 27, 2009
Is there a code that will flip a MovieClip horizontally (e.g mirror image) when the mouse moves over a certain x-coordinate.For example, we'll say the movieclip is called "man" .When the mouse is on the left side of the man, the man faces right. However when the mouse is on the right side of the man, he now faces left. Of more simply, he 'flips over' when the mouse changes sides.Is there an actionscript code to tell the movieclip to do this or do i have to manyally free transform the movieclip?
View 7 Replies
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
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
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
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
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
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
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
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
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
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
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
Jun 21, 2006
For some reason I can't get it to populate my text box when I press the corresponding movieclip. Can someone take a look and help me out a bit?
View 1 Replies
Apr 17, 2009
when i press TAB, the selection goes to another movieclip, instead of the next text field.i read a lot of threads, but could't fix this bug,
so far (after lots), i got this code:
[AS]
var textAR:Array = ["nome_txt", "contacto_txt", "email_txt", "morada_txt", "pais_txt"]
var textCounter:Number = 0
Selection.setFocus(textAR[textCounter]])
[Code]...
View 1 Replies
Jan 30, 2009
excuse the lazy question but I'm tired of google I have been trying to learn about repositioning movieclips on the click of a button. So basically, the movie clip will move to a location on the screen in accordance to the browser size and relevant to the button pressed.
I have seen a few tutorials that move an object say, 100 pixels. But what I want is for it to move into the top left, or top right, or bottom middle of the screen regardless of the browser size.
View 5 Replies
Apr 28, 2010
I'm working in Flash CS4 and I would try to do it in AS3 but my teacher isn't very familiar with it, so I've decided to do it AS2. But so far he hasn't been able to, that is why I AM DESPERATELY coming to you.
I want to be able to PRESS A and play the movie clip that goes with it.
I want to do this with the whole alphabet.
Press A play movie clip APage
Press B play movie clip BPage - and so on....
View 2 Replies
Jan 22, 2008
I have attached my fla. I want rotate the mc by Mouse drag. But its get some of the jerk.
View 1 Replies