Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Dragging A Movieclip With An Independent Time Line



I am currently trying to make a VOLUME SLIDER that is a 101 frame animation. The animation represents a slide button in perspective view while it is moved from one end of the slide to the other side of the slide.

How can I script the animation to drag and show the next frame or previous frame in the animation and control the sound simultaneously?

Is this possible????



FlashKit > Flash Help > Flash General Help
Posted on: 06-18-2004, 01:49 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Dragging A Movieclip With An Independent Time Line
I am currently trying to make a VOLUME SLIDER that is a 101 frame animation. The animation represents a slide button in perspective view while it is moved from one end of the slide to the other side of the slide.

How can I script the animation to drag and show the next frame or previous frame in the animation and control the sound simultaneously?

Time Line Of A MovieClip
i want to point to the time line of a movieClip that is located in another movieClip wen releasing a button.i use following script and it doesnt work,...


Code:
on(release){
_root.movieClip2.movieClip1.gotoAndPlay(5);
}
wat script should i write ???

Time Line Of A MovieClip
i want to point to the time line of a movieClip that is located inside another movieClip.i use following scripts bit it doesnt work:

Code:
on(release){
_root.movieClip2.movieClip1.gotoAndPlay(5);
}
wat script shall i write ?

Playing A MovieClip From A Frame On A Time Line
I have a movieClip of 10 frames.
in the first frame i put stop();
i want when i enter frame 2 on the main timeline
to tell the movieClip to start playing!
i tried to do on an empty layer this code :
stop();
tellTarget("myMC") {
gotoAndPlay(2);
}
but it's not working!
what to do?
thanks in advance
peleg

Time Independent Layer....please Help
Is it possible to make a quasi "time-independent" layer in flash (for drop dpwn buttons, etc)? when i make the drop downs, the play head keeps jumping to the frame with the appropriate submenus, but then everything else is changing (with the playhead). Is their any technique you can use to maybe make the drop down buttons time independent, so that by activating their script, the playhead doesn't jump to another part of the movie so that everything else vhanges as well?

thanks!

Creating Independent Keypress Actions To Work At Same Time
Just for kicks I was writing a pong game which is easy. But I ran accross a problem I didn't think I would.
I have paddle1 paddle2 and ball.
I have coded instructions for the paddle control through on(keypress"<>") commands.
when i press and hold one key to move one paddle, the other paddle controls wont work.
I am sure it is listeners but dont know much about them.
Can anyone please write me a script where 2 keys can be pressed and held at the same time and both paddles function?
Thank you, MindWire

Dragging A Movieclip But When Not Dragging Click To Run Function
basically I have a bunch of boxes on the stage. what I'm trying to accomplish is that when a clip is clicked and held it can be dragged. when you release naturally it should stop dragging.

here is the part that stumping me. if you click it without dragging I want it to call a function.

like I said I'm quite stumped at this point any help or suggestions would be great.

cheers

drew

Button Acting On Independent Movieclip
is there an actionscript code for a button to start or play a movieclip that it is not a part of?

Dragging Over A Line
is it possible to drag an object over a line

Line Tool And Dragging Instances Problem
I rencently installed Flash 4 on my computer. I had bought it in 2000 and I had it desinstalled. I just installed it back and I did all the lessons to get back into Flash, but there is a problem now. Suppose I want to do a line with the line tool. I click on the stage, move my cursor. But there is no "preview" of the line. If I release the button the line appear. There is another problem similar to this one. If I want to move an instance of any symbol, I dont see the line showing where the instance will be located.

I am desesperate, since I have desinstalled/installed Flash twice. I also installed Flash MX, and the same problem occurs.

I need help so answer this fast please.

Differnt Points In The Same Time Line Running At Same Time
Hi guys,

I have a wierd one here and I'm really hoping someone can help because I am totally stuck. Pls bear with me as this is quite difficult to explain

This is the background.
My app is a quiz game, it pulls questions from an ASP page, once the questions are pulled the quiz begins.
The main movie lasts 30 seconds and all the main movie does is pull the questions, then display the number of seconds left in the game as its timeline moves along.

The questions and answers are all handled by a submovie.
The submovie will display a question, the user has 10 seconds to answer. The answer is processed on an answer Frame, which is 10 seconds into the question timeline. After 10 seconds if the user hasn't answered then the answer Frame will display anyway and mark the answer as wrong. If the user selects an answer then the timeline will jump to the answer Frame, and skip the remaining number of seconds left. The answer frame is the last frame in the sub movie, after this frame the sub movie repeats and asks the next question.

My problem is that, say for instance, the user selects an answer in the submovie after 5 seconds then the submovie jumps to the answer frame, the answer is processed and that works fine and the next question is loaded. HOWEVER after a further 5 seconds (when the question would have naturally come to the answer frame on the timeline) the same answer is re-processed. I have lots of trac() commands s in my script which suggest that this is whats happening, but I have no idea why, or how to stop it.

In summary it seems to me that differnet points in the same time line are running at the same time. Is this possible?

Any help is much appreciated :-)

Api Line, ? Reset Drag And Drop Swf, AND How To Pivot Mc By Dragging
Hello,

I think I'm getting in over my head! I've created a training page for a surgical class. Students drag the api line where the bone fracture is, then drag the surgical pieces to the appropriate location to set the injury.

http://www.cvm.uiuc.edu/work/test/line2bone.html

1. I would like to create more than one api line to represent multiple breaks (the red line in the left corner of the movie). How would I go about that?

2. Once I move the drag and drop images around on the screen I would like to have a reset button that would refresh the page to look like it did originally.

3. Last question: Is it possible to make draggable movie clips pivot? The rods in my movie need to pivot 15 to 30 degrees. Is that possible?

I appreicate any help!!
Thank you,
Nancy

Api Line, ? Reset Drag And Drop Swf, AND How To Pivot Mc By Dragging
Hello,

I think I'm getting in over my head! I've created a training page for a surgical class. Students drag the api line where the bone fracture is, then drag the surgical pieces to the appropriate location to set the injury.

http://www.cvm.uiuc.edu/work/test/line2bone.html

1. I would like to create more than one api line to represent multiple breaks (the red line in the left corner of the movie). How would I go about that?

2. Once I move the drag and drop images around on the screen I would like to have a reset button that would refresh the page to look like it did originally.

3. Last question: Is it possible to make draggable movie clips pivot? The rods in my movie need to pivot 15 to 30 degrees. Is that possible?

I appreicate any help!!
Thank you,
Nancy

Dragging More Than One Object At The Same Time?
hi there,

as the headline says, i have a problem with dragging objects.
code:
mouse.hide();
_root.point.startDrag(1);
_root.xline.startDrag(1);
_root.yline.startDrag(1);


if i put this code, only "yline" is being dragged (guess, because it stands at the end of the script), not the other two objects. is it possible to drag more objects at the same time?

bAeR

Dragging Two Objects At One Time
I have two images one of a sun and the other is a flower.I have the actionscript so that i can drag the sun from one spot to another but what im trying to do is have it so that the other image will follow it at the same time.
Any help would be great.Thanks.

[F8] Dragging Two Objects At One Time
I have two images one of a sun and the other is a flower.I have the actionscript so that i can drag the sun from one spot to another but what im trying to do is have it so that the other image will follow it at the same time.
Any help would be great.Thanks.

Scrolling And Dragging At The Same Time
How can I effectivly drag an object and scroll the movieclip its in at the same time?

Basically I have these boxes that I can drag that are contained with in another movieclip. This other movieclip is one that contains all my content and I have coded so that I can scroll through via mouse wheel.

Now when i start dragging one of the boxes and then proceed to scroll with the mousewheel, it doesn't update the y position. I tried adding another listener for the mousewheel, one that would detect it and then realign the position of the box to the mouse pointer. Although this worked, it is quite jumpy and breaks when I scroll fast. By break I mean that it will not be in the position of underneath the mouse cursor but instead somewhere else.

Here is the code I am using.



Code:

var mouseListener2:Object = new Object(this);
mouseListener2.onMouseWheel = function(wheelNum2:Number){
this._y = _parent._ymouse);
}
Mouse.addListener(mouseListener2);




"this" = the box im dragging

Make Line Movieclip Turn To Dotted Line
hey Everyone

Just wanting to know how to use actionscript to make a line dotted. I want to have a movieclip (a solid line) and when u click on it it will become a dotted line, then be able to switch it back to solid with another click.

Cheers

Dragging Multiple Clips At Same Time ?
Question:

Im trying to drag 2 seperate clips at the same time. 1 clip is a handle clip which exists in a container clip called "handles container", the other is a shape clip which exists in a container clip called "shapes container. I want to make it so that when the shape is pressed the handle appears on the center of the shape and when the handle is dragged the shape is dragged with it. Makse sense?

Please help !

Dragging Seperate Objects At The Same Time
How would i script an object so that when i am dragging that object a object on a different layer drags with it?

Looking For A Script To Remember Where A Mc Was The Last Time You Stopped Dragging It
I'm not new to flash, but this is my first attempt at building a flash game. My first snag that I couldn't find in the tutorials is this.

The game is similar to chess in that certain pieces can move along a grid in certain ways.

The snag is, how can I get the position of a chess piece before I drag it, then, If I drag this piece and drop it into a space that it isnt ment to go to, it will snap back to the position I dragged it from.

Hope that made sense, I've been problem solving this whole "board game conversion to flash thing" for 6 hours straight now. Thanks in advance.

Dragging From A Movieclip?
Hi,

I have built a movie where a user can drag clips onto a grid where they snap into place. I would like to introduce a menu, so the user can drag clips from another movieclip, onto the grid.
Does anyone know of an example of dragging clips from one movie clip onto the main timeline/stage?
There is a .fla of my movie so far here http://www.geocities.com/timowest/menuclipdrag.fla if this helps.

Thanks for your time
Best wishes

Tim

Dragging A Movieclip
ok, so i've got a movieclip called "scroll_mc". i want "scroll_mc" to be draggable-and it is- however i want it to move as a whole. i told "scroll_mc" to be draggable and i would think everything inside would drag as well.

i've got 3 other movieclips inside of "scroll_mc" BUT all 3 move seperatly from one another. if i click and drag any part of "scroll_mc" i want ALL of its children to move as well relative to one another (remain the same space from one another etc.)

the 3 movieclips inside "scroll_mc" dynamically resize depending on how much text is in a text field.

i told "scroll_mc" to be draggable.....its dragging....but the movieclips inside aren't dragging at the same time. WTF??

thanks!

Dragging Movieclip Problem
i have a movieclip that contains a button placed on the main stage.
the button within the MC has th following:

on (press) {
drag = true;
}
on (release) {
drag = false;
}

the MC then has the following attached:

onClipEvent (enterFrame) {
if (drag) {
this._x = _root._xmouse;
this._y = _root._ymouse;
}
}

my problem is that i don't want the MC dragged past a certain point on the stage. how can i have the MC stop dragging past this point?

i am stuck for ideas!!

Dragging A Movieclip Vertically Only
Hi! I want to restrain a movieclip to only be dragable vertically within an 800 x 600 size flash document. How do I do this? )Please don't tell me to use the "restrain to rectangle" function, I wouldn't know where to begin... help me from scratch?

Dragging Button Within A Movieclip
Okey,

Im trying to move a button within, my movieclip also I would like to move a movieclip outside my button which is located with in my movieclip. I know this probably sounds confusing but anyways you can just look at my fla to see what I am talking about.

Here is the link to the fla:
[url]http://www.creativemindz.biz/AS_Tour.zip


(Please have a solution I would definately apreciate it!)


Thank you!

Abel Gudino(Creativemindz.biz)

Dragging Button Within A Movieclip
Okey,

Im trying to move a button within, my movieclip also I would like to move a movieclip outside my button which is located with in my movieclip. I know this probably sounds confusing but anyways you can just look at my fla to see what I am talking about.

Here is the link for my fla:

http://www.creativemindz.biz/AS_Tour.zip

(Please have a solution I would definately apreciate it!)


Thank you!

Abel Gudino(Creativemindz.biz)

Dragging Button Within A Movieclip
Okey,

Im trying to move a button within, my movieclip also I would like to move a movieclip outside my button which is located with in my movieclip. I know this probably sounds confusing but anyways you can just look at my fla to see what I am talking about.

Here is the link to the fla:
[url]http://www.creativemindz.biz/AS_Tour.zip


(Please have a solution I would definately apreciate it!)


Thank you!

Abel Gudino(Creativemindz.biz)

[F8] MovieClip Dragging Prob..Pls Help
Hello,

I am having some major issues trying to create a map that is draggable and scalable... my example is here: http://www.voicemax.com/map.html

Ideally, I would like to have it zoom in to the spot centered on the screen at any given time, but I can't figure out how to do this....

Also, there are times when the map is enlarged all the way, and when you go to unzoom it, it shows the empty stage behind it which I do not want.... if you zoom all the way in to "Charlottetown" on the east coast, and then leave it in place and zoom out you will see what I am talking about.

Can anyone please offer any advice as to how to make this perfectly functional?

Thanks for any advice...

Easing A Dragging Movieclip?
I'm trying to add some easing to my draggable movieclip. Any idea on how to do this using the mx transitions? This is what I have so far:


PHP Code:



_global.followMouse = function (target_mc,mc_direction,mouseSpeed){
    
/*
constructor for Tween class

obj: reference - the object which the Tween targets
prop: string - name of the property (in obj) that will be affected
begin: number - the starting value of prop
duration: number - the length of time of the motion; set to infinity if negative or omitted
useSeconds: boolean - a flag specifying whether to use seconds instead of frames

function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
    //
}

*/
    
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    
    /*var ball_tween:Object = new Tween(ball_mc, "_y", Regular.easeIn, ball_mc._x, _root._xmouse, 1, true);
    
    ball_tween.onMotionFinished = function() {
        ball_tween.continueTo(_root._xmouse, 1);
    };*/
        
    
    eval(target_mc).onEnterFrame = function() {
        
        var containerBounds:Object = container_mc.getBounds(_root);
            
        var differenceX = (target_mc._width)/2;
        var differenceY = (target_mc._height - container_mc._height)/2;
            
        //trace("differenceX " + differenceX);
        //trace("differenceY " + differenceY);
            
        var left = containerBounds.xMin + differenceX;
        var top = containerBounds.yMin + differenceY;
        var right = containerBounds.xMax - differenceX;
        var bottom = containerBounds.yMax - differenceY;
    
        
        if (container_mc.hitTest(_xmouse, _ymouse, true)) {
            
            var ball_tween:Object = new Tween(eval(target_mc), "_y", Regular.easeIn, ball_mc._x, _root._xmouse, 1, true);
            ball_tween.onMotionFinished = function() {
                    ball_tween.continueTo(_root._xmouse, 1);
            };
            trace("run");
        
            //target_mc.startDrag(true, left, top, right, bottom);
        
        }  else if (!container_mc.hitTest(_xmouse, _ymouse, true)) {
            
            //target_mc.stopDrag();
        }
    
    }
}


_global.followMouse(ball_mc,"vertical",200); 





Any direction would be greatly appreciated... please

Why My MovieClip Get Back To Its Old Pos, After Dragging.
Hello!

I’ve got a movieclip entering the stage the stage from a random position that animates itself to a random position. To do so, I use the following code:


ActionScript Code:
onClipEvent(load){
//
stageWidth = Stage.width;
stageHeight = Stage.height;
    _x = random(stageWidth);
    _y= random(stageHeight);
//
    endX = 500 - random (200);
    endY = 200 - random (100);
}


onClipEvent (enterFrame){
dist = endX - _x;
_x += dist / 10;
dist2 =endY-_y;
_y+=dist2/10;
}

When the movieclip has stopped at it’s final destination, I want it to be drag able (the user can put the mc at another position). After dragging, (the user releases his mouse) the movieclip gets back to the position it has been dragged from. I guess it has to do with the “enterFrame-event” which is still working. Can anyone tell me how to stop this event, so the user can drag the movie clip to a position where it stays.

Thanks!

Dragging Movieclip On X Axis
Hello all,

I am making a 360 gallery and i have an image that was stitched together and is 200 X 1807 and my stage is 265 X 200. I want the user to be able to click and drag the image to slide it around and I am having some problems... first problem is i cant figure out how to make it drag on the X axis only, then i need it to put a new instance down when you get to the end beginning of the image so it seems like it is seamless... right now i have the image setup as a movieclip with a button on top with the following actions (that do not work): please help! Thanks!

on(rollOver) {
this.updateAfterEvent();
}
on(rollOut, dragOut ) {
this.stopDrag();
}
on (press, dragOver) {
var whereUserClicked:Number=_root._xmouse;
this.onEnterFrame=function(){
this._x=_root._xmouse-whereUserClicked;
if (this._x == 0){
duplicateMovieClip(this,"new360",200);
new360._x= 0 -new360._width;
}
}

}
on (release, dragOut) {
this.stopDrag();
}

Dragging Movieclip Symbol
Hi all,

I refer to some source code available online and so far got to this stage and the problem exist. Currently at work so cant provide the detail AS but roughly the problem is this.

I had the stage with other items. The flash made box is suppose to appear after a user click on a button symbol. there are 2 symbol buttons which will be clicked and show the 2 flash made box one at a time.

I made a symbol movieclip that covers the entire stage with alpha set to 0. A transparent movieclip. went into the movieclip and created the 1st flash made window with 3 frames on each layer on a total of 6 layers which are bg, headers, header, upbtn, dwnbtn, dynamic textfield. 1st frame of each layer is empty frames. 2nd frame of each layer contains the above mentioned stuff.

the 2nd flash made window is the same order as above but they reside on 3rd frame of each layer instead of 2nd frame. so therefore, 1st to 2nd frame on this 2nd flash made window is empty. that means that these 2 flash made windows reside in the same movieclip but at different layers and different frames.

Hopefully all can get the picture that I am trying to paint here.

After publishing, I click on the btn symbol, ONLY the dynamic textfield came out. the rest of the upbtn, dwonbtn, headers, header, bg are all invisible. BUT, when i placed my cursor on the position where the above items are suppose to be, the items work. I can drag it, close it, scroll the textfield up and down using the btns. It happen for the other btn symbol as well.

How is it that they are invisible? I try to place the layer of the transparent movieclip symbol on the bottom of the folder, it still does not work. If the problem lies with the transparent movieclip, then why does the textfield appear? i shifted the textfield to the bottom layer in the movieclip while the rest of the layers such as bg, headers, header, upbtn, downbtn are on top of it. but it still doesn't work.

I don't think is the code issue but more on the layers and frames issue as the dragging and closing works. so does the scrolling of the dynamic textfield using the upbtn and downbtn.

Please help me. Thanks in advance.





























Edited: 11/04/2007 at 11:23:51 PM by xfiles_wolvie

Dragging A Movieclip With Easing
Hey all.

A friend of mine is building a site and wants to be able to drag across an oversized movieclip, similar to the dragging effect at

http://www.conceptm.nl/

I've tried several scripts and can't get it right. I'm trying to get the dragging to ease like it does on that site, but haven't had any luck.

Any ideas?
Thanks!

Thomas

Dragging An Attached MovieClip And Getting TopDepth
So I've got this movie clip named "card" that I'm attaching to the stage dynamically. The amount of these cards will vary since I'm using xml and a loop. I'm trying to make these "cards" dragable on stage and move to whatever spot I drag them to and have some friction on the release of the "card" movie clip. so basically like picking up a card and dropping it down on a table so it will slide a bit before it stops. This is what I have attached to my card movie clip...

this.onPress = function() {
this.swapDepths(_root.topDepth);
++_root.topDepth;
this.startDrag(true);
this.onMouseMove = function() {
updateAfterEvent();
};
};
// handle onRelease event
this.onRelease = this.onReleaseOutside=function () {
this.stopDrag(false);
this.onMouseMove = undefined;
};


This tries to pull the card from it's current location and place it at it's new, but it keeps jumping back and forth between locations and always reverts to it's first location. What am I doing wrong? Thanks!

[CS3] Losing Tween When Dragging A Movieclip
I'm pretty new to flash and I'm having a problem with a movieclip..

I'm using actionscript3 to drag a moviecllip around which has individual frames of animation inside and then a motion tween on it's layer to fade it out at the end using it's alpha.

The problem is that when when viewed the animation loops and then fades happily until you drag it and at which point it doesn't seem to recognise the motion tween and vanishes abruptly rather than smoothly fading out.

Any suggestions as to what's going on??

Thanks

How To Resize Movieclip By Dragging From All Sides?
Hello,

i am facing a problem in flash.

i want to resize a movie on mouse drag and drop(Just like in windows).

i have written the code but it resize window from right and bottom only, even if i dragging a window from left, it resize it in right , same case with top, it resize in bottom

the code is

resize = function () {
_root.movieclip_mc._width = _x;
_root.movieclip_mc._height = _y;
};
resize_int = setInterval(resize, 5);

plz tell me how to implement resizing from left and top. corrently resize works fine if i drag and drop from right and bottom side.

but it i drag from left or top, the code resize window from right and bottom only

Stop Duplicating Movieclip While Dragging
i trying to stop duplicating my movieclip after my dragging. How can i stop it?









Attach Code

on (press) {
//Duplicate Movieclip Behavior
//Requires Flash Player 7 or later
var newdepth = this._parent.getNextHighestDepth();

var newname = "copy" + newdepth;
var prevname = "copy" + (newdepth-1);
if (this._parent[prevname] == undefined) this._parent[prevname] = this;
this.duplicateMovieClip(newname,newdepth);
this._parent[newname]._x = this._parent[prevname]._x + 50;
this._parent[newname]._y = this._parent[prevname]._y + 10;
//End Behavior

//Start Dragging Movieclip Behavior
startDrag(this);
//End Behavior

}
on (release) {

//Stop Dragging Movieclip Behavior
stopDrag();
//End Behavior

}

Dragging A Movieclip With Elastic Easing
Hello all, I was wondering if anyone can point me in the right direction on how to drag a moiveclip with elastic easing similar to the cloverfield site (http://www.1-18-08.com/).

After seaching the web for hours I was able to find this post

http://www.actionscript.org/forums/s....php3?t=165260

In is is this script:

var easing:Number = 0.15;

//var targetX:Number = 0;
//var targetY:Number = 0;

// Function to create mouse movement function on pressing of the box

mc_box.onPress = function()
{ mc_box.onMouseMove = function()
{

// update target values
targetX = _root._xmouse;
targetY = _root._ymouse;
}}

// Function to delete mouse function on release of box

mc_box.onRelease = mc_box.onReleaseOutside = function() {
delete mc_box.onMouseMove; }

// Enterframe to update movement of box

mc_box.onEnterFrame = function() {

// update incrementation values
incX = (targetX - mc_box._x) * easing;
incY = (targetY - mc_box._y) * easing;

// increment box X value if not equal to targetX

if(mc_box._x != targetX) { mc_box._x += incX; }


// increment box Y value if not equal to targetY

if(mc_box._y != targetY) { mc_box._y += incY; } }



This script works really well, but on drag the movieclip always locks to the registration point from the ._xmouse and ._ymouse.

I need to be able drag the movieclip from any point without it snapping back to the registration point, similar to how you can drag the pictures on the cloverfield site.

Any help would be GREATLY appreciated!

How To Get The Position Of The Movieclip After Dragging By Mouse
I have code like
on (press) {
startDrag(screen);
}

on (release) {
stopDrag();
x_value1=_root.screen._x;
y_value1=_root.screen._y;
trace(x_value1);
trace(y_value1);

}

But I found after dragging, x_value1 and y_value1 are always the initial value. So what is the right way to record the position then? thanks in advance !

Dragging Movieclip And Working Buttons On It.
This one is quite easy, but I just can't get it to work.

Here's the swf;
http://kerin.cxc.pl/mapka/

And here's the fla;
http://kerin.cxc.pl/mapka/index.fla


I Use this script to scroll the map around

on (press) {
this.startDrag(false, -550,-400,0,0);
}
on (release) {
this.stopDrag();
}

I want to create a 'button' that will work and is also moving around with the draggable movieclip. I created one on a layer on top of my movieclip and it just does not want to work!

And help i greatly appreciated...

Changing The Height Of The Movieclip On Dragging - Urgent
how can i change the size i.e height of a movie clip by dragging it. ie resizing the movielcip.

I tried doing this and it works for on clipEvent mousedown and mouse up. but i want it to work for a specific mc and it should resize only on start drag and retain the new height on stop drag.

help

Urgent Help Please.. Restrict Movieclip X/y While Panning/dragging?
I am in the process of making a flash map. i have completed all, except have the problem with panning and dragging.

pan and drag will only work when the map is zoomed in (scaled)
and i want the pan/drag to stop at the bounds of the movie clip on stage. ie, if i pan left, i want it to stop on the righthand side of the stage at the edge of the map (movieclip) not allowing it to continue panning left off the stage and out of view.

how do i do this, also taking into account the scale that the movieclip is at. i suspect i need something in the moveimage() function.

the complete map is contained inside a movieclip with instance name i_map

to see what i have currently http://www.regionmap.cghub.co.nz.
i hope that is plenty of info, thank you
Steve

*****************

stop();
// record original map coordinates and physical size
reset_x = _root.i_map._x;
reset_y = _root.i_map._y;
map_width = _root.i_map._width;
map_height= _root.i_map._height


//define the function that will execute when a connection is made from nav.swf to map.swf
//these functions are called from the nav.swf. nav.swf is a seperate swf file in another html document in another frame.

incoming_nav2map_lc.methodToExecute = function (param) {
if (param == "pan_up") {
moveimage(0, -50);
}
if (param == "pan_down") {
moveimage(0, +50);
}
if (param == "pan_left") {
moveimage(-50,0);
}
if (param == "pan_right") {
moveimage(50,0)
}
if (param == "zoom_in") {
if (_root.i_map._xscale <= 340) {
_root.i_map._xscale += 10;
_root.i_map._yscale += 10;
}
}
if (param == "zoom_out") {
if (_root.i_map._xscale > 100) {
_root.i_map._xscale -= 10;
_root.i_map._yscale -= 10;
}
}
if (param == "show_all") {
_root.i_map._yscale=100;
_root.i_map._xscale=100;
_root.i_map._x=reset_x;
_root.i_map._y=reset_y;
}

}
incoming_nav2map_lc.connect("lc_nav2map");

i_map.onMouseDown = function(){
drag_map(0);
}
i_map.onMouseUp = function(){
drag_map(1);
}

function moveimage (movex, movey) {
_root.i_map._x += movex;
_root.i_map._y += movey;
}

function drag_map(start_drag){
if (start_drag == 0){
_root.i_map.startDrag();
}
else{
_root.i_map.stopDrag();
}
}

Dragging A Movieclip Attached To The Root Timeline
Can anyone help? I used _root.attachMovie to attach a movie clip to the root timeline, but I can't seem to get the attached movie clip to be draggable. Here's what I did (the movieclip - called myMC - has a linkage identifier called "myMC"):

_root.attachMovie("myMC", "myMCattached",getNextHighestDepth());

myMCattached.onPress = function(){
this.startDrag();
}
myMCattached.onRelease = function(){
this.stopDrag();
}

It doesn't work. Any help is much appreciated!

Michael

Drag Movieclip And Press Buttons While Dragging
Hi There,

I am pretty new to actionscript and therefor I already encountered a problem that i cannot solve by myselve.

I have a movieclip called menu. In this movieclip I have buttons called Home, etc.. Ok, no problem sofar. This movieclip is functioning. Now comes the tricky part.

I want this movieclip in my mainline to be dragged. The menu is a bar of 500px height and 100px width. The mainstage is 800width and 500 height.

With this : startDrag(this,true,0,0,800,0); I am able to make the movieclip dragable, only horizontal for 800px. The problem is that my buttons do not work. I have tried a lot of things, for example to assign action to the buttons (on rollover or rollout).

Please help me out, Why do the buttons not work when dragging this movieclip.? see att. file.

Time Line
I'm new to scripting.. please help

I wrote functions on the first frame but I want to call them one after another, how can I do this?

i.e. i can call buildMenu() and buildButtons() separately, but how can I delay buildButtons() until buildMenu() is all done?

appreciate your help

Time Line Help
This is probably a fairly basic question...

I created 2 movie clips. One scrolling text clip and then a slide show clip. I put the scrolling text into frame 1 then the slide show clip in frame 2. I thought that once the movie clip in frame 1 was done it would automatically move onto frame 2 and play my slide show. Is this not the case. Do I have to have action scripting to tell it to play the next frame? HELP....

Time Line
Hello folks

I discovered flash a week ago and I haven't been able to keep my hands off it for a week now... I've already experienced many things but I have two things that I cannot do so if you could help...

First of all... when you import graphics from photoshop, under what extension should you save it in order to be able to modify your graphics using Flash tools? I drew a star with a nice photoshop brush but I would like to be able to break it apart and modify it with photo shop graphic tools... is that possible?

Secondly... I'd love to be able to realize a timeline like the one on this site, I really think it is the best one I've seen... http://www.pearljam.com/

I read on this site how to work with a mask, how to draw the cursor, but I can't yet understand how to combine all these elements to make it work... Could someone give me the steps to create such a timeline... I don't know where to start and how to link things....

Thanx guys really

Mc Controling The Time Line
okay this is thee problem i am having. i got a website
2 scenes (preloader, scene1). in scene1 i got a dropdown menu (its a movie clip) i would likee one of the menu items (which are all buttons) to make my main timeline go to another speecified frame. the problem arises in that when i give it the "_root" action it goes all the way to my preloader again. how do i make it just jump frames in the "scene1" timeline?

Copyright 2005-08 www.BigResource.com, All rights reserved