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.
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:
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".
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.
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.
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?
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:
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???
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?
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 ?
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:
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]..............
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?
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.
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.........
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.
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...
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:
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
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.
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.
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?
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: