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.
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:
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.
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.
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.
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?
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.
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
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
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]
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.
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.
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.
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] .....
I'm making my website at the moment. I made a little mill which goes around, in there I made a movieclip which has two frames, one with links and one without. I made it so that if you are staying on it (rollover) it stops and you can click the links but the links don't work. this is the fla file:
Im trying to use a Flv video effect like a movie clip in As3...I want this Flv effect to work like my background on my WebSite... i already imported the flv and convert it to a movieclip... but i dont dont the code to make it work like my background always in loop.. and when i enter a certain frame...how to put the video playing when i enter Home Frame.
I have a button and movieclip on the same stage. I try to use for loop for running every buttons and assign an action for movieclip with rollover function this is script I am doing. btn1 is a button and btn01 is a movieclip ,which are on the same stage . It seems not working.[code]
I have 3 movieclips, and I want them to work like buttons. It's for a website, so they need to redirect the user to a URL.
The entire flash file has 7 layers, and one of these layers is called "AS3", and is ment for all my actionscript. So, i figured if I gave the MC's an instance name, then I could write the AS3 in the "AS3"-layer. But I can't seem to get any code to work.
I have an animated image collage with 10+ images. It is brought in into the main stage as a united mc. Each image has to act as a button which links to a labeled section in the flash file. I understand that I can not write AS3 on the main stage as I am unable to specify the instance name for each button since they all are brought as a united mc and only that mc is available as an instance.So I go inside the mc to the level where I can select each button, give the button an instance name and then put the following code on the AS3 layer inside the mc level where all the images/buttons are assembled as a collage:[code]I started with just one parent and kept on adding them up to see if it will change the result, but unfortunately all the same "Error #1009: Cannot access a property or method of a null object reference."It is still under the development and will take a min to load then wait for the image collage to appear. Those images are the ones which i would like to make into buttons.
I'm making a click and point game. I have a code here in frame 1 timeline.
[Code]...
My goal is to make these work in other frames when a player click on a movieclip which takes him to another frame with the same instances. The only one that works is the McCard which is draggable. How can I make them work the same as frame 1? I don't have to repeat the same code over and over again for each frame for them to work right?
I'm making a flash CS4 presentation and I just made a navbar movieclip (grey rectangle) and put 6 buttons on each layer inside of it. I put this movieclip (navbar) on the main movie timeline in a layer. I keep getting this error (1120 access of undefined property) and the buttons simply don't respond to the main timeline. It used to work fine when the buttons were on the main timeline. Should I make a parent child reference ?
For example, this code for the pause button won't work: pause_btn.addEventListener (MouseEvent.CLICK, stopButtonClick); function stopButtonClick (e:MouseEvent):void { this.stop(); }
I am using loadVariables to send the form variables to a php file. I use the same method in a test environment but it is not nested like this is and it needs to be nested. It is 2 movieclips deep and it will just not work. Is there something funny with using loadVariables to php in nested movie clips? I have also tried this method with LoadVars and getting the same results.
i made a movieclip button and everything works fine except that when i press the button it's supposed to send me to the next scene, but it doesn't, nothing happens. here's the script i did in the frame 1 of the scene: