Draging Or Moving A Swf
Here is an example of what I'm looking to do: LINKY
I need to create a way to move a swf around on the stage dynamically with some simple arrows you could press like in the example abaove. I've never done anything like that before. Is there a tutorial around on this subject? I haven't been able to find one. Please let me know.
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 03-22-2005, 01:04 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Draging Or Moving A Swf
Here is an example of what I'm looking to do: LINKY
I need to create a way to move a swf around on the stage dynamically with some simple arrows you could press like in the example abaove. I've never done anything like that before. Is there a tutorial around on this subject? I haven't been able to find one. Please let me know.
Draging
I've put a gangsters picture
and upon it a masked picture of sessemy street celebrities
now,I've made a sight(of a gun) and attached it to the mouse(which I've made to disappear)
I wanted to have a circle in the mask the same size as the
sight that will "reveal" the true faces of the gangsters but you can't attach 2 MC's to the mouse!!
what should I do?
Draging
Hi,
How do I make the bottom drawing stay put when I drag the top
Thanks!
About Draging
Hi, I want to drag a couple of components together(a movie clip, a couple of buttons, a couple of text boxes) I want when a mouse button is pressed they to start drag together, I don't want they to be in a same movie they are separated components so I'll be very thankful if somoeone can help me :)
Question About Draging
how to make a movieClip dragable at beginning and after it is druged to some special postion , it can not be draged any more, just stay at the position it was draged to. Thanks!
Draging Objects
I was wondering if anyone has any idea as to how I can make a clip where the viewer can grab an object(lets say its a square) in the movie and drag it to another area to load a picture. Then repeat that function over and over and back and forth.
I dont even know if this is even possible and therefore, have absolutly no idea where to start.
Draging Movie
i want to make it possible so i can drag the whole movie.
i used
on (press) {
startDrag("");
}
on (release) {
stopDrag();
}
this didn't work for me... it only draged the object not the movie.. please help!
Draging Stuff
Hi,
What I want to do is have a key which drags when you click it, and you need to drag to the lock which will open when the key is in that area.
I know the drag actions but I don't really know how to do the other part. Something with hitTest I guess but I can't figure it out.
Thanks
Draging MC Question
I made a MC "dragablepopup" and put it on my scene1 .
I have a invisible button on the top of MC"dragablepopup" in scene1.
this is the script on invisible button:
on (press){
startDrag("dragablepopup");
}
on (release){
tellTarget("/dragablepopup"){
stopDrag();
}
}
I can drag it MC move around at scene1, but I can not stop it.
Please let me know how I can stop it.
Thanks
silky
Draging A Object
I have a button thath loads a certin image in to the file.
Wath code do I neead to aply to make the image drag or if this is to complex how do i maket load in a certin point becouse it loads at x=0 y=0.
can any one help me becouse I am stuck???
[F8] Draging More Than 1 Object?
Hi how is it possible to drag more then 1 object using startDrag([name]);? I need to drag 2-4 objects onMouseDown. When startDrag() is used you are able to drag an object but if you try and drag to objects by using
startDrag(object1);
startDrag(object2);
it will cancel the first object1's drag. Is it possible to drag 2 or more objects with this method? If not how can i do it another way relative to _xmouse and _ymouse ?
Rollover While Draging ?
Hi All,
I want to be able to drag a MC for a drag and drop task, but while draging I need the various dropTargets to change their rollover state.
I can do this fine when the mouse moves over the dropTargets, but as soon as the mouse is draging a MC to drop on the object, the rollover stops working.
I'm using on(RollOver) and on(DragOver) for the dropTargets but this seems to be over ridden by startDrag of the other MC ?
Any ideas would be greatly apreciated
TIA
Dave
Loading And Draging
I am loading a swf into my movie like this:
on Button 1
Code:
on (press) {createEmptyMovieClip ("lks1",5);
lks1.loadMovie ("Videolks1.swf");
lks1._x = 100;
lks1._y = 100;
}
on Button 2
Code:
on (press) {createEmptyMovieClip ("lks2",6);
lks2.loadMovie ("Videolks2.swf");
lks2._x = 110;
lks2._y = 110;
}
on Button 3.......
and I have a simple script to drag the swf;
Code:
_root.onMouseDown = function () {startDrag ("lks1",false) ;}
_root.onMouseUp = function () {stopDrag () ;}
But when I add this
Code:
_root.onMouseDown = function () {startDrag ("lks2",false) ;}
to the script above the drag function does not work on anyof the loaded swf's
What can I do to be able to drag any loaded swf, that I want?
Duplicating And Draging
Hi,
I'm having a problem when i duplicate a mc and drag it, when i dragit after a few seconds it desapears i attached the swf so you can see
http://www.geocities.com/cardjorg/duplicating.swf
or
http://www.geocities.com/cardjorg/duplicating.html
[AIR] Draging Files
I have a code:
ActionScript Code:
import flash.desktop.TransferableData import flash.events.NativeDragEvent;function suruklendiginde(event:NativeDragEvent):void { var trData:TransferableData = event.transferable; if (trData.hasFormat(TransferableFormats.FILE_LIST_FORMAT)) { var d:Array = trData.dataForFormat(TransferableFormats.FILE_LIST_FORMAT, TransferableTransferMode.ORIGINAL_PREFERRED) as Array; for (var i:int=0; i<d.length; i++) { if (d[i].extension == "mp3") { DragManager.acceptDragDrop(this); } } }}function birakildiginda(event:NativeDragEvent):void { var trData:TransferableData = event.transferable; if (trData.hasFormat(TransferableFormats.FILE_LIST_FORMAT)) { var d:Array = trData.dataForFormat(TransferableFormats.FILE_LIST_FORMAT, TransferableTransferMode.ORIGINAL_PREFERRED) as Array; trace(d); }}this.addEventListener(NativeDragEvent.NATIVE_DRAG_ENTER, suruklendiginde);this.addEventListener(NativeDragEvent.NATIVE_DRAG_DROP, birakildiginda);
It doesn't work.I think the problem is version... My AIR version is Beta 2... But the codes from Beta 1.In Adobe Labs:
http://livedocs.adobe.com/labs/flex/3/langref/
The codes look same... So where is the problem?
Thanks...
Duplicating And Draging
Hi,
I'm having a problem when i duplicate a mc and drag it, when i dragit after a few seconds it desapears i attached the swf so you can see
http://www.geocities.com/cardjorg/duplicating.swf
or
http://www.geocities.com/cardjorg/duplicating.html
Draging My Object...
hi everyone,
erm ive got a problem that i cant think how to work out. i have a box which is an mc. there is a 'drag' button on this box that when you press you will be able to drag. i would like to have this button do it only. but then how do i get everthing in that box to move with it?
does anyone know the way.
please help.
thanks tristan
Draging 2 Opposite Objects
does anyone know how to communicate with 2 object. and make one follow the opposite motion of the one that you're dragging?
Draging Multiple Levels
Hi Guys N Gals
ive been trying and cant work it out but is it possible to drag multiple levels ie
i want to drag from _level1 swf
both _level1 and _level2 swfs?????
on (press) {
startDrag (""); /////////////this is to drag _level1
startDrag ("_level2");
}
on (release, releaseOutside) {
stopDrag ();
}
this only drags _level1
PLEASE HELP!!!!
Draging Specific Objects
well last time i asked for help it was on draging objects. now i seek help with moving single objects.
i have 1 layer with a symbol of a person
another with a symbol of a squiggle
and my code on the squiggle is as follows
on (press) {
startDrag("");
}
on (release) {
stopDrag();
}
how can i limit this drag effect to only one object (the squiggle)
locking the person layer didnt help
and moving the squiggle to a different layer didnt help.
Stop Draging One Mc In A Dragable Mc... ()
www.monstermouse.net
i made a dragable menu including small thumbs of logos. these can be draged out of the menu and placed on a work field -but the truth is they stay in the menu mc, meaning they still get dragged with the menu. i can't place them outside because of the scripted animation when draging them from the menubar...
is there any possibilety to fix their position allthough nested in a dragable mc?
if not -can i somehow move them against the drag of the menu so they seem to stay in place?
any other ideas??
thanks for any help, greetings -daniel.
Stand Alone Presentation Draging
I have a presentation built in flash mx that is really dragging down the processor. It has video, a 60 sec sound track and alot of frame by frame animation. I pretty much know that it isn't just one aspect of the movie that is slowing it down but thought I would post to see if anyone had some tricks and tweaks I should look at. Here is what I have done so far:
1. I have a 4.5MB video and a 2.5MB video imported into the movie. I am stretching one of the videos to fit the canvas....maybe I need to take this into Premier and make it the correct size. I imported them in at 48 fps...my movie is at 36 fps...and 60% quality.
2. I have a 13MB wav file in the movie set to stream. Maybe I should have imported this in as a MP3? I have Acid Style so I can convert it.
3. I have a ton of jpg images that I use as frame by frame effects, show pieces, etc.
4. I have a few tweens with Alpha and I realize this hurts the processor a bit but a few areas it was unavoidable.
I am very eager to here your thoughts.
Thank you.
Question About Re-sizing While Draging
hello!
i have a kind of a complicated question.... I have a slider
and i would like for it to be dragable to a spot in my screen
that is bigger then the thumbnail that i have... so this
thumbnail has to increase the size before it gets to the
the spot... i thought that this thumbnail has to have a
little bit of a friction to the spot, so people wont be able
to drag the thumbnail all over the place...
please help!!
thanks
MovieClip Draging Problems
Hi guys, I made kind of learning object drag and drop. But my problem is that I'm not able to drag the buttons easly.Sometimes i have to click more than one time to drag the button to the target area. I have an attachment file here that u guys can take a look at. (If you click several times fast on the button, you can't drag it. It stocks for some reason.)
Can anyone help here please?
Draging MovieClip With Perspective
I need a snippet of code that will make the dragable movie clip small when it's dragged up and bigger when it's dragged down.
I can't get the damn thing to work right. Thanks!
Menu Draging (CoNfUsEd)
Hello I am making a movable menu for my flash project. I pretty much want the user to be able to click on top of the menu and drag all six or so links where ever he/she wants, pretty simple. The buttons are like small movies that grow as you hover on them, pretty simple. Heres pretty much what I have on each of the buttons:
on(rollOver)
with (_root.instancename)
gotoandplay(frame# of instance name)
on(rollOut)
with (_root.instancename)
gotoandplay(frame# of instance name)
can you tell me what type of code needs to be in the "drag here" button? what do i have to do with all of the other movies to make them drag with the "drag here" button.
Thank You.
Map Zoom & Scroll By Draging
Hi there,
I am working on a map panel.
I want to have 8 zoom levels on my map.
zoom level will be set by using the mouse wheel when the pointer on the map.
Also I want the map can be scrolled by holding the mouse wheel down and draging in any direction. In addition, using the arrow keys.
Thanks
Draging Objects With The Mouse
Ok i am using flash mx .Have you ever seen the example of an eggplant in flash 5 where you could click on his eyes,nose,hat.. and drag the parts onto his body.
Well i'm tryin to do one of that,But the problem is when i add more objects to the scene if i click and drag one object all of them moves? How can i fix my script so when i click and drag one object only that one moves.
Normally i use this to move the objects
on (press) {
startDrag("");
}
on (release) {
stopDrag();
}
Look i attached an example of what i'm talkin about.....
Draging On A Specific Line
Hey, this is my first post so bear with me. I am trying to make a flash that has two graphs on it and when i move a button on one graph it should draw the line for the other graph so users can get the feel for how different points on one graph correspond to another. I have everything set but i cant seem to find how to make the drag work for the line, and how to make it draw on the other one. Please help if you can.
Thank you
Draging, Rotating And Updating
I'm creating a shoutbox that you can move around.
I've been stuck on the past week on how to keep it anchored.
I'm trying to update the handle when I move the context. But I'm having a hard part with it. Anyone with better experience with math and events could help me out? I'm pulling my hair out trying to get it to work.
ActionScript Code:
package
{
import fl.controls.Slider;
import fl.controls.Label;
import flash.display.MovieClip;
import flash.text.TextField;
import flash.events.Event;
import fl.events.SliderEvent;
public class CaptionEditor extends MovieClip
{
public var vv;
public var aa = 'rwarawrwa';
public var drop_shape;
public var slider;
public function CaptionEditor()
{
this.drop_shape = new DropShape(stage);
addChild(this.drop_shape);
this.drop_shape.x = 100;
this.drop_shape.y = 100;
this.create_slide();
this.vv = new TextField();
addChild(vv);
this.vv.x = 10
this.vv.y = 10
this.vv.width = 60;
this.vv.height = 30;
//var menu = new Menu(stage);
//addChild(menu);
//menu.x = 10;
//menu.y = 325;
addEventListener(Event.ENTER_FRAME, show_info);
}//constructor
function show_info(e:Event)
{
this.vv.text = stage.mouseX + ',' + stage.mouseY;
}
function create_slide()
{
var slider_label = new Label();
slider_label.width = 90;
slider_label.text = "Handle Thickness";
slider_label.move(stage.stageWidth - 120, 340);
this.slider = new Slider();
this.slider.width = 100;
this.slider.snapInterval = 1;
this.slider.tickInterval = 1;
this.slider.maximum = 50;
this.slider.value = 25;
this.slider.move(stage.stageWidth - 120, 330);
addChild(slider_label);
addChild(this.slider);
this.slider.addEventListener(SliderEvent.CHANGE, changeHandler);
}//create_slide
function changeHandler(e:SliderEvent):void
{
this.drop_shape.handle.change_width(e.value);
}
}//class
}//package
ActionScript Code:
package
{
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.events.Event;
import flash.filters.DropShadowFilter;
public class DropShape extends Sprite
{
public var moveX;
public var moveY;
public var rwar = 'rwaarwarw';
public var context;
public var handle;
var drop_shadow;
public function DropShape(stage)
{
this.drop_shadow = new DropShadowFilter();
this.filters = new Array(drop_shadow);
this.context = new Context(this);
this.context.intialize(200,80,12,0,0);
this.handle = new Handle(this);
this.handle.intialize(25, 200, this.context.width/2, this.context.height/2);
stage.addEventListener(MouseEvent.MOUSE_UP, stop_drag);
}//constructor
function stop_drag(e:MouseEvent):void
{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, this.context.move_context);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, this.handle.move_handle);
}//stopMove
}//class
}//package
ActionScript Code:
package
{
import flash.display.Sprite;
import flash.display.DisplayObjectContainer
import flash.events.Event
import flash.events.MouseEvent
public class Context extends Sprite
{
var base_width;
var base_height;
var rnd;
var move_x;
var move_y;
var tip_x;
var tip_y;
public function Context(parent)
{
parent.addChild(this);
}//Context
function intialize(base_width,base_height,rnd,x,y)
{
this.base_width = base_width;
this.base_height = base_height;
this.rnd = rnd;
this.x = x;
this.y = y;
this.draw();
this.addEventListener(MouseEvent.MOUSE_DOWN, drag);
}//intialize
public function draw()
{
with(this.graphics)
{
clear();
//lineStyle(0,0x000);
beginFill(0xFFFFFF,1);
drawRoundRect(this.x,this.y,this.base_width,this.base_height,this.rnd,this.rnd);
}
}//draw
public function drag(e:MouseEvent):void
{
this.move_x = this.mouseX;
this.move_y = this.mouseY;
var drop_shape = parent as DropShape;
var handle_tip = drop_shape.handle.changed_points[1] as Array;
this.tip_x = drop_shape.x + drop_shape.handle.x + handle_tip[0];
this.tip_y = drop_shape.y + drop_shape.handle.y + handle_tip[1];
stage.addEventListener(MouseEvent.MOUSE_MOVE, move_context);
}//drag_handle
function move_context(e:MouseEvent):void
{
var drop_shape = parent as DropShape;
drop_shape.x = stage.mouseX - this.move_x;
drop_shape.y = stage.mouseY - this.move_y;
var dx = drop_shape.x + drop_shape.handle.x - this.tip_x;
var dy = drop_shape.y + drop_shape.handle.y - this.tip_y;
drop_shape.handle.angle = Math.atan2(dy, dx);
drop_shape.handle.distance = Math.sqrt(dx * dx + dy * dy);
drop_shape.handle.update();
e.updateAfterEvent();
}//pointMove
}//class
}//package
ActionScript Code:
package
{
import flash.display.Sprite;
import flash.events.Event
import flash.events.MouseEvent
public class Handle extends Sprite
{
var points;
public var changed_points;
var edit_point;
public var angle;
public var distance;
public function Handle(parent)
{
parent.addChild(this);
}//constructor
function intialize(width,height,x,y)
{
this.x = x;
this.y = y;
this.angle = 0;
this.parent.x += 200;
this.points = new Array();
this.points[0] = [0,-1]
this.points[1] = [1,0]
this.points[2] = [0,1]
this.changed_points = new Array();
this.changed_points[0] = [0,-1]
this.changed_points[1] = [1,0]
this.changed_points[2] = [0,1]
this.edit_point = new Sprite;
addChild(this.edit_point);
this.change_width(width);
this.change_height(height);
addEventListener(Event.ENTER_FRAME, step_frame);
}//intialize
public function step_frame(e:Event):void
{
this.edit();
this.draw(this.angle);
}//step_frame
public function mouse_angle(x,y)
{
var dx = stage.mouseX - x;
var dy = stage.mouseY - y;
return Math.atan2(dy, dx); //returns value in radians
}//mouse_angle
public function distance_from_mouse(x,y)
{
var dx = stage.mouseX - x;
var dy = stage.mouseY - y;
return Math.sqrt(dx * dx + dy * dy);
}
public function draw(radians)
{
for (var i = 0; i != 3; i++)
{
this.changed_points[i][0] = Math.cos(radians) * this.points[i][0] - Math.sin(radians) * this.points[i][1];
this.changed_points[i][1] = Math.cos(radians) * this.points[i][1] + Math.sin(radians) * this.points[i][0];
}
with(this.graphics)
{
clear();
//lineStyle(0,0x000);
beginFill(0xFFFFFF,1);
moveTo(this.changed_points[2][0],this.changed_points[2][1]);
lineTo(this.changed_points[0][0],this.changed_points[0][1]);
lineTo(this.changed_points[1][0],this.changed_points[1][1]);
lineTo(this.changed_points[2][0],this.changed_points[2][1]);
}
}//draw
public function change_width(width:Number)
{
this.points[0][1] = -width;
this.points[2][1] = width;
}
public function change_height(height)
{
this.points[1][0] = height;
this.distance = height;
}
public function edit()
{
var x2 = changed_points[1][0];
var y2 = changed_points[1][1];
var dx = parent.y + this.x + x2 - stage.mouseX;
var dy = parent.x + this.y + y2 - stage.mouseY;
var dist = Math.sqrt(dx * dx + dy * dy);
if (dist < 10)
{
this.edit_point.graphics.clear();
this.edit_point.graphics.beginFill(0x00FF00);
this.edit_point.graphics.drawRect(x2 - 5, y2 -5, 10, 10);
}
else if(dist < 80)
{
this.edit_point.graphics.clear();
this.edit_point.graphics.beginFill(0x000,.5);
this.edit_point.graphics.drawRect(x2- 5, y2 -5, 10, 10);
this.edit_point.addEventListener(MouseEvent.MOUSE_DOWN, drag);
}
else { this.edit_point.graphics.clear(); }
}//edit_tip
public function drag(e:MouseEvent):void
{
stage.addEventListener(MouseEvent.MOUSE_MOVE, move_handle);
}//drag_handle
public function move_handle(e:MouseEvent):void
{
this.distance = distance_from_mouse(parent.x + this.x, parent.y + this.y);
this.angle = mouse_angle(parent.x + this.x, parent.y + this.y);
this.update();
this.edit_point.graphics.clear();
this.edit_point.graphics.beginFill(0x00FF00);
this.edit_point.graphics.drawRect(this.changed_points[1][0] - 5, this.changed_points[1][1] -5, 10, 10);
e.updateAfterEvent();
}
function update()
{
this.change_height(this.distance);
this.draw(this.angle);
}
//
//public function follow_mouse(e:Event):void
//{
// var dx = stage.mouseX - this.x
// var dy = stage.mouseY - this.y
// var radians = Math.atan2(dy, dx);
// rotate(radians);
//}
//
//public function rotate(radians)
//{
// for each(var p in this.points)
// {
// p[0] = Math.cos(radians) * p[0] - Math.sin(radians) * p[1];
// p[1] = Math.cos(radians) * p[1] + Math.sin(radians) * p[0];
// }
// this.draw();
//}
//
//public function draw()
//{
// this.graphics.clear();
// this.graphics.lineStyle(2,0x000);
// for each(var p in this.points)
// {
// this.graphics.lineTo(p[0],p[1]);
// }
// this.graphics.lineTo(points[1][0],points[1][1]);
//}//draw
}//class
}//package
Draging Button Problem
I'm using this crank to scroll thru images (that part works greatttt!!!)
when you hold down the left mouse button and drag, the crank rotates . . .
but you can move the mouse all around (and off the knob) and still rotate.
How can i get the crank to stop when the mouse pointer is off of the knob?
Thanks!
How To Determine Draging Area?
This prolly a silly question, but how do you guys determine the drag parameters when setting up a dragable item in flash mx? Not sure if im using correct terminolgy but what if refering to is the ' constrain to rectangle ' and ' lock to center parameters ' on the startDrag cmd. Right now I am just plugging in numbers until I get the results I want -- must be a better way .
Thanks!
Draging A Movie Clip As A Mask
Well im new to flash and I need some hep. First off I'd like to thank all in advance for any help you can give. Now down the good stuff.
Okay I know how to take a movie clip and have it follow the mouse around by using the startdrag action. However whenever i try do this in a mask layer so that as you move the movie clip around it will reveal different parts of the scean it no longer follows the cursor. Anyone know how to get around this? Thanks again
-Blackcap
Draging Button, Hidden Mouse.
ok, i have a button that i have made with an animation in the down stage etc.
i want to use it as the mouse...
so i do a hide mouse and a start drag on the button... it works great in terms of
making the button look like it is the mouse...
problem is... since the mouse is constantly dragging a button, i can't click on anything else...
is there anyway to do this and still be able to click other buttons and movie clips???
Draging One Object On Another To Start Movie
Hi everyone, im just trying to make a game where when a movie clip (a watering can) is draged over another movie clip (a seed) the second movie clip would start playing (making the seed grow).
i've written this action script, but the second movie won't start.
my first movie (the watering can) is called drag.
My second movie (the seed) is called seed.
The seed movie has a stop on frame1 and starts on frame2.
onClipEvent (enterFrame) {
if (drag.hitTest(seed)){
this._parent.seed.gotoAndPlay(2);
}
else
{}
}
Theis no script errors so im stuck, can anyone help please?
john
Getting A Draging Movieclip's Previous Location
I'm wondering if there's an easy way to get the PREVIOUS x and y of a movieclip that's being dragged by the user. That is to say, the x and y the mc had before flash moved it with the mouse handler.
Draging A Scale Needle To One Side Or Another
Hi all, I need to do a Flash movie of a scale with the needle in the middle. The user needs to have the ability to drag the needle left or right. Any suggestions? I tried _rotate but I can't get that to work with a mouse down dragging action.
Thanks.
How To Write Actionsript Or Html For A Draging Event
Im trying to find out how you write actionsript or html for a draging event (i think thats what its called). There is a good example at : http://www.google.co.uk/
If you rollover the google logo and press down and then drag outside you get a O with a line / through it. Anyone Know how to do this?
As always any help is appreciated.
Image Movie Clip Fails On Draging
Unable to drag the Movie clip which consist of images, but the other clip which was drawn dinamically works on draging,
simple I want to drag the Image which was loaded at run time.
Regards
Suresh
// Creating first Movie Clip
var square_mc:MovieClip = createEmptyMovieClip("square_mc", 150);
square_mc.lineStyle(1, 0x000000, 0);
square_mc.beginFill(0xFF0000, 100);
square_mc.moveTo(100, 100);
square_mc.lineTo(200, 100);
square_mc.lineTo(200, 200);
square_mc.lineTo(100, 200);
square_mc.lineTo(100, 100);
square_mc.endFill();
// Creating second Movie Clip
var containerBG:MovieClip = createEmptyMovieClip("containerBG", 100);
var mcLoaderBG:MovieClipLoader = new MovieClipLoader();
mcLoaderBG.addListener(this);
//Give any image file name instead of 1.gif
mcLoaderBG.loadClip("1.gif", containerBG);
//Draging works for this clip
square_mc.onPress = function() {
this.startDrag();
};
//Draging works for this clip
square_mc.onRelease = function() {
this.stopDrag();
};
//Draging is not working for this clip
containerBG.onPress = function() {
this.startDrag();
};
//Draging is not working for this clip
containerBG.onRelease = function() {
this.stopDrag();
};
Button Inside Movie Clip And Draging ...
Hi..
I have created a movie clip that can be draged by mouse...
Now this movie clip has a map inside it.. and it also contains buttons..
But when I place the button inside the movieclip the button stops its functionality..
But if i remove the drag code the buttons starts functioning..
I just can't understand why it is.. The reason to place button inside that movie clip is to drag button also when ever that movie clip is dragged..so by doing this i can click on map locations and view some text by the help of buttons aswell as drag the map movie click..
but its not happening..
this is the code for drag..
Code:
_mc.onPress = function ()
{
startDrag(this, false, 280, -450, 590, 900);
}
_mc.onRelease = function ()
{
stopDrag();
}
Please suggest me what should i do here...
Won't Stop Draging After The Movie Is Loaded Second Time.
Hi,
First off, this website is awesome and has helped me quite a bit with my flash projects.
I built a interface that loads 3 other flash movies inside of it.
One of this flash movies has a round button that you click and drag it around to select your options. Everything works fine until I click on go "back" to interface and load the same movie again.
On the second load when I click on the round button (to drag) it starts dragging but it won't stop anymore.
The button as the onReleaseOutside action to it.
Any ideas?
Draging A Loaded Swf File On A Main Swf File
I got the onDrag functionality working, but somehow it disable the close btn and the scrolling functions. Can some one help me or point me to the right direction?
Here is the action:
this.createEmptyMovieClip("upcoming1", 1);
upcoming1.onPress = function() {
this.startDrag();
};
upcoming1.onRelease = function() {
this.stopDrag();
};
stop();
Moving Vertical Bar Which Holds Moving Thumbnail Images When Mouse Is Over
Hi!
im not completely new to Flash MX - have utilised all basic animation tween/morphing /buttons
and very simple action script- movie controls - stop , back ,forward etc
however i need a moving bar feature, e.g. a moving news reel or a vertical bar which holds a number of images i.e.10 and
when the mouse is over - i want it to move downwards and when is not over the feature i want it to stop moving
(or even instaed of the feature to automatically scroll images i could also use a button to press to move through the images)
then: the thumbnail images from the moving feature i need to be selectable which then produces a larger version of the image on
another section of the page.
i dont no if i put this thread in the right forum!
if any one knows of any tutorials or has any suggestions to help implement this feature
i would appreaciate any help!
- dont really know where to start with it!
thanks
(i have looked at the flash kit tutorials but havent found what im looking for
dont even no if this is more of an animation or action script questions)
Slowly Moving Smoothly - Moving Photos And Pixel Smoothing
So, I'm slowly....very slowly moving a small thumbnail across my stage. The problem is that when the pic moves over a pixel it looks choppy, I want it to look smooth. The border of it looks especially choppy, it's distracting from the site.
Is there a pixel-smoothing option for the stage? or some equivalent?
Does my question even make sense?
Please help.
Thanks
Moving Running Forward But Elements Moving Off Stage
I'm positive I've done it by the book. All symbols on the stage - one by one dragged them off the stage creating timelines - about 6 layers. Play the movie and all the elements start on the stage and move off. Just the way I wanted it but in reverse. Simple vertical and horizontal motions. My mistake must have been in the beginning somewhere - but where ?
Drag A Mask, With Out Draging The MC Under That I Want To Mask Over?
Hello,
I have a mask and MC button which I am draging. I works fine other the fact the the whole MC movies even the MC inwhich I want to mask over: "BigYears" .
I have tryed to use:
onClipEvent (enterFrame) {
setProperty (this.BigYears, _x, -this._x);
setProperty (this.BigYears, _y, -this._y);
}
Then "BigYears" is not viewable under the mask.
|