ActionScript 2.0 :: Drag A Movie Clip That Is Larger Than The Flash Document?
Sep 10, 2006
how to drag a movie clip that is larger than the flash document and have it stop dragging at the edges of the movie clip? I have an 300x300 (just for example) flash movie. i have an image that is 500x650 placed a x/y of 0. i want people to be able to drag the large image so they can see the whole image, even though its larger than the movie dimensions. but i dont want it to keep dragging so say they drag it left 600 pixels, you see past the edges of the images to the background. i guess if you do the math, say at x/y = 0, they can only max drag it left 250 pixels but not farther left so you wont see past the edge of the image's right side. i have some diagrams to illustrate.
View 6 Replies
Similar Posts:
May 20, 2011
Im trying to do a drag and drop system where the user can drag a movie clip into an area. Although i would like to make it snap to a target instead of just sitting wherever it lands in the area. Problem Two:
The next thing i am trying to do is when the user has a movie clip on a target already, and trys to put another movie clip in that target area, it will replace the one thats in there and go back to its current position. Here is the script of what i have done so far:
[Code]...
View 14 Replies
Mar 23, 2010
I have some movie clips. i want to drag all clips when i drag single movie clip. Ex. I have movie clips "A1", "A2", "A3", "A4", "A5" . Randomly visible some of them. Suppose "A1", "A3", "A4" has visible. When i will drag "A1" movie clip all these "A3", "A4" also move with "A1".
View 6 Replies
Oct 25, 2010
how can use and display data from an XML document in my flash movie clip
View 9 Replies
Dec 14, 2008
I am trying to find a way to make a movie clip resize larger on mouse release, then resize back to the original size on a second mouse release. I have tried many ways to do this but seem to be unable to come up with a solution. I have been using mc Tween.
[Code]...
View 2 Replies
Feb 12, 2010
how to attach a movie clip to another movie clip after drag and drop .I mean to say that is it possible to make a new movie clip with the target movie clip and dropped movie clip.
View 2 Replies
Nov 17, 2011
i want a button in a mvie clip which moves the main movie clip to certain frames. THIS I CAN DO.
However when i add drag and drop code to the main movie clip (of which this button is inside) the button no loger moves to the frames but the drag and dropworks.
i want to drag and drop a movie clip with a button inside this which changes the main movie clip. what do i need to add?
View 4 Replies
Apr 5, 2010
I am looking to drag a movie clip onto another movie clip. Both movie clips are within a movie clip. I have tried the following and the drag part works but it doesn't stay on the target:
[Code]....
View 13 Replies
Jan 29, 2010
how to duplicate movie clips which allow me to drag every movie clip duplicated.
View 4 Replies
Feb 3, 2010
1. When I place all movie clips on the same main stage, the xml file can be read perfectly. BUT not reading properly inside nested movie clip. Is it possible to read XML object in nested movie clip in the first place???
2. Is it better to load xml document just once in main timeline, and then read the XML object from movieclips OR read the XML document for each movie clip? Which way is better???
[CODE].....
View 1 Replies
Mar 30, 2011
Anyway, I have a 2037px wide flash movie that I purposely made that wide so that it would take up just about any screen.
What I'm trying to do is simply center it and basically hide the overflow on smaller screens when the movie appears on the end user's monitor. I can't get it to center, however, as it always just wants to align to the left. I don't want to use the 100% feature because that distorts the movie.
I've tried using the "overflow: hidden; text-align: center;" CSS feature, to no avail. Is there a way in CSS to make this work? Do I need to use javascript or something? If so, which script do I use?
View 3 Replies
Oct 7, 2009
I shuffle the movie clips and set startDrag for each movie clip, but it is not able to drag, The movie clip only move slightly and return to it location, what is/are the reasons ?
View 2 Replies
Oct 12, 2010
When my main movie starts, the firsts thing it does is load swf for the user to enter their user name and password. I want this movie (and subsequent such movies) to be able to be dragged around the stage. There are some excellent tutorials & examples on the web but none seems to address my situation. The code:
this.createEmptyMovieClip("lh", this.getNextHighestDepth());
lh._x = 200;
lh._y = 200;
[code]......
View 1 Replies
Jul 22, 2010
i know this may seem kind of dumb, but how does one access the document class from a child movie clip on the stage?
i have a property in my class. Just a string for testing:
Code:
public var s:String = 'can you see me';
it traces on the root time line, but it errors out if tracing it from a movieclip on the root time line.
View 1 Replies
Jul 5, 2009
script that would allow the user to clikc and drag mulitple symbols- similar to this:
on (press) { startDrag (this._parent, false);}
on (release) { stopDrag ()}Only that instead of using "this", it drags the following symbols on mouse click:
background (a movie clip)[code]..............
View 2 Replies
May 17, 2010
If I wanted to make a type of ecard, whereby the user can drag and drop a text field wherever they like, and then type into this, is this possible? I know about drag and drop on movie clips, but can it be performed on items like text fields?
View 4 Replies
Mar 9, 2009
I have a button which, when a user drags it onto a movieclip is supposed to cause that movie clip to advance to frame 2. What I've used so far is this:
Code:
on (press) {
startDrag(this);[code]..........
The button drags fine, but when released over the movieclip nothing happens. I've tried using "_parent.slide1_mc.gotoAndStop(2);" instead to no avail.
View 1 Replies
Jul 19, 2010
so was just testing the Dragging and Dropping of objects in AS3....... for multiple movie clip using the same function.......however it's not working....and doesn't even show an error.........
Code:
package
{
[code]....
View 1 Replies
Oct 27, 2009
ex : i have a rectangle and it is movieClip.. . 1. how do i drag each corner of the rectangle ? (like in photoshop tool (direct selection tool) ... )
View 1 Replies
Feb 13, 2009
I just read a thread on how to duplicate a movie clip and drag and drop it with AS2. However, I keep getting a syntax error on line 3. Attached is the file.
View 1 Replies
Sep 3, 2010
I've got a movie clip that I want to be able to drag and drop on stage, I've added this code to do this:
correct1_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickUp1);
correct1_mc.addEventListener(MouseEvent.MOUSE_UP, dropIt1);
function pickUp1(event:MouseEvent):void {
[Code]....
But the button still does what its supposed to do...but I fear I shouldn't have these errors coming up anyway as (knowing me) I'll run into trouble later on because of it... I would of thought as long as the button is within the movie clip there wouldn't be a problem dragging it about and such...
View 3 Replies
Apr 30, 2010
I need to make movieclip carbondot and its actions automatically duplicate into a new instance after being dragged, but my current coding for carbondot isn't working:
ActionScript Code:
onClipEvent (load) {
this.onPress = function() {
[code]....
View 1 Replies
Aug 30, 2010
is it possible to drag a child from one movie clip and drop it in another.
View 1 Replies
Jan 19, 2005
We all know how to drag a movie clip:
my_mc.startDrag(target,[lock, left, top, right, bottom])
But does anyone know how to drag/restrict a movie clip to a 45 degree angle?
View 5 Replies
Feb 7, 2007
var mySelection = "";
var totalmc = 0;
var depth = 40;
[code].....
View 9 Replies
Nov 23, 2008
I am trying to use startDrag to drag my square movie clip and while i drag it up the square should rototate right and when I drag down it should rotate left, everything works except of the rotation part
View 1 Replies
Apr 13, 2009
I have a draggable movie clip that contains a button inside to hold my code. The target area is in the root and is a movie clip. I need to be able to drag and drop on the target. When it does drop on the target it needs to play a different keyframe from the root which holds a movie clip. Below is the code I have in my button within the draggable movie:
[Code]...
it starts dragging, but for some reason the drop target isn't working or the stopDrag, because it won't stop dragging.
View 3 Replies
Aug 10, 2004
i have been trying to get this to work forever. What im doing here is making a flash site thats like a real time strategy game. You have to build stuff in order to unlock new sections of the site. check out this: [URL] click on build, then drag the Main button and release somewhere above. Notice that when you release it sticks to the cursor and doesnt stop dragging. Now, hit cancel and notice that the main clip is still loaded and works correctly if you drag and drop it.
[Code]...
View 5 Replies
Sep 18, 2008
I have written the drag and drop function for a movie clip this movie clip has a animation inside of it, this is on a seperate layer. When i play the swf, the animation and the movie clip it was inside become individual objects. How do I make these two objects into one entity?
View 1 Replies
May 4, 2011
Here is what I am looking to do. Currently I have a drag and drop built in AS 3 that works perfectly fine, but I'm looking to add one more functionality. What I want to happen is when I drop the correct drag item on it's correct target piece (which is a movie clip) I want my target movie clip to go a head one frame.
So as an example I'm dragging a piece of paper onto a movie clip of of a waste basket. When I drop the piece of paper on it the waste basket, the waste basket movie clip moves a head one frame which shows a crumpled up piece of paper in it. Here is my current code for my drop eventlistener:
function dropMe(event:MouseEvent):void{ event.currentTarget.stopDrag(); if(event.currentTarget.hitTestObject(event.currentTarget._targetPiece )) { event.currentTarget.x = 950; event.currentTarget.y = 100; event.currentTarget.removeEventListener(MouseEvent.MOUSE_DOWN, dragMe); event.currentTarget.buttonMode = false; } else { event.currentTarget.x = event.currentTarget._origX; event.currentTarget.y = event.currentTarget._origY; }}
View 1 Replies