ActionScript 2.0 :: Buttons In A Draggable Movieclip?
May 24, 2008I 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 RepliesI 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 RepliesI 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 RepliesI have 4 buttons which i have to make them draggable. The problem is that i have 3 conditions
condition #1. Only 1 button/mclip is draggable in its axis [done].
condition #2 .The 4 button/mclip must be dragabble at the same time, that is, when i drag one, the others should drag at the same time in their own axis.
[Code]...
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]....
Somebody knows if is possible to control an draggable MC with a radio button option?
I want a static movie clip turns draggable only when I set on a radio button.
I have looked around for solutions to this problem and have come accross sombe but it still wont work.
Flash CS4 File: [URL]
square_mc is the draggable clip with the buttons inside, it is constrained to only move horizontally.
ActionScript Code:
buffer = 0 - square_mc._width + Stage.width;
square_mc.onPress = function()
{
startpos = this._x;
[Code].....
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]....
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 have a movie clip on the main timeline in frame 1 that I named moveablekey. What it is supposed to be is a key for a map that you can move around on the map. When you scroll over/off the key it will hide/unhide the actual key. The key has some buttons that I want to allow to go to a different link when clicked. When I test the key without the code below it will work on the link and take me to the link, but when I put the code into the main timeline it stops the link from working. Here is what I think is happening: The code seems to make it so wherever I click on the movie clip it is doing the start/stop drag code and won't recognize the buttons within the movie clip. So is there a way that I can make just the header of the key to be clickable to start/stop the drag, but still move the entire key, and allow for the buttons to be clicked?
Code:
stop();
moveablekey.onPress = function(){
startDrag(this);
Mouse.hide();[code]..........
Basically I have button contained in a movie clip (scroller), I want to be able to drag the button up and down and get this to move some dynamic text. If you want to have a look at the fla: [URL].
Code:
on(press){
_root.nFlag = true
}on(release){
_root.nFlag = false
}
And this code for the mc:
onClipEvent(enterFrame){
if(_root.nFlag){
if(_root._ymouse <= 400 && _root._ymouse >= 0){
this._y = _root._ymouse
}}}
My problem is that this only moves the button up and down, and doesn't move the dynamic text. Plus when the mc is named scroller it seems to conflict with code and moving the button doesn't work.
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 RepliesI'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 RepliesI 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]...
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 RepliesFor 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].....
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 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 RepliesI 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 RepliesMy 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 Repliesi 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
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 creating a menu bar that is a movieclip and inside the movieclip consists of the buttons.Now the menu bar is twice as WIDE as what is visible on the stage.The only part you can see is the text 'menu' on a bar.Then when the mouse hits the bar, it flies across the screen to the otherside of the bar where the menu buttons are.Now the menu bar does its animation over 20 frames - the last frame being the frame where the menu buttons are now visible.
On the last frame i have the 'stop;' code
On the first frame I have this code:
Code:
stop();
this.onEnterFrame = function(){
if(rewind == true){
[code]....
Originally, the client wanted to control "hero_mc" using the keyboard but now they would like to control him with buttons only. Here is the original code on the "hero_mc" which works as expected:
[Code]...
There are 2 buttons to animate the movieclip on moving right or left and making it appearing and disappearing. However, the button react after a few second the animation finish. Does anyone know how to make the button work faster? this is the script for those buttons
one of the button
on (press) {
if (tt == false) {
import mx.transitions.Tween;
[code]....
How could one set up a movie clip that has usable buttons in it? If i understand correctly, the movieclips actions will override all the button actions...?
For the purposes of my project, I need a MC that ive set up to loop across the screen with my buttons on it.
I've created a movieclip of a trashcan, which falls over and 6 items fall out of it. I want each of these items to become a button, which will jump to a different point on the timeline.
The movieclip is all working fine, and the buttons appear to be fine. The problem is when I publish the flash, the movieclip resets each time I hover over one of the buttons, so i get an endless loop of this trashcan falling over and the items falling out.
scene 1 has a movieclip in the top left on the stage (called poster_mc) ... the image on the screen is of a museum enterance. double click on the movieclip to go into the movieclip; the first frame has the museum enterance and the second frame has a gallery.I created a button called door_mc which when clicked, allows the user to go 'inside' the museum into the gallery. this is the code i used:
poster_mc.stop();
poster_mc.door_btn.addEventListener(MouseEvent.MOU SE_UP, nextPicture);
function nextPicture(e:MouseEvent):void
[code].....
I'm putting together a site, that has 3 pages and I'd like the content to move into position when the menu button is clicked. So, 3 buttons etc, 'Home, Portfolio, contact" and one movie clip that contains the info. I'm not really a programmer [URL].
View 1 RepliesI have a movie clip with hit zones over buttons. It looks like a cam corder and when you roll over them a thumb moves to that button and when you click. The thumb presses on the button. That all works great. I want to put buttons in the main scene over top of these that will change things on the screen when you click it. And get urls of the videos that I have on my website. But when I put the hitzones over other hitzones the ones in back dont work. Is there a way to make them both work or am I going to have to make everything contained in the movie clip? So in short can I have two buttons on top of each other that do two different things?
View 8 RepliesI have 5 movieClip buttons. I want the GALLERY button to stay on the stage at all times, "which it does" but i want when the user clicks on 1 of the other 4 buttons for the remaining 3 to disappear. Example...when the user clicks on the KIDS button, the COUPLES, PORTRAITS AND BELLIES buttons disappear, or when the user clicks on COUPLES, for the KIDS, PORTRAITS AND BELLIES buttons to disappear, and so on.
Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
[code]......