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








Dragging Browserwindow Problem


hello, i load a movie to the center of the stage and everything is ok. but when i drag the sides of my browser window the text of that movie that is loaded follows a bit later then the rest of the movie (backgrounds etc.) why is this ? !!!!

when looking at the same movie in the .swf file everything looks perfect !

this is my as:

Stage.scaleMode = "noScale";
Stage.align = "TL";
function centerClip(clip) {
clip._x = (Stage.width/2)-(clip._width/2);
clip._y = (Stage.height/2)-(clip._height/2);
clip._x = Math.round((Stage.width/2)-(clip._width/2));
}
myListener = new Object();
myListener.onResize = function() {
centerClip(_level0.container);
};
Stage.addListener(myListener);
loadMovie("content.swf", "container");

movie can be found here:

http://www.colbys.be/test2.html




FlashKit > Flash Help > Flash General Help
Posted on: 10-11-2005, 08:54 AM


View Complete Forum Thread with Replies

Sponsored Links:

Help With Browserwindow
hi! think ill post this question here

im currently workin on a website in flash and gettin some problems with not havin enough space for the graphical stuff so i was wondering how do you make flash fill the whole browserwindow so it just scales up and down with the browserwindow if a user wiew the site with a smal resulution??? am i makin any sense here

its like on this website http://www.mystvgame.com/uk

small problem but i would appreciate if anybody could help me here thanks...

View Replies !    View Related
Open New Browserwindow
How do I lauch a new browserwindow, without a white window that lauch the window I want?

I tried a couple of times but I couldn´t solve it...

Please?

View Replies !    View Related
Browserwindow = Moviesize?
Hi there,

I recently saw a flashmovie that's had exactly the same size as my browser window. Also when I changed the size of my window the size of the movie automaticly changed so that the movie fitted precialy in my browserwindow...
Can anybody explain to me how such thing can be done?

Thx
Joost

btw. my emailaddress is changed: joost.verbiest@home.nl... duh

View Replies !    View Related
SWF Centered In Browserwindow
hi,

i have a problem.
how can i center my swf movie (non-scale 100%)
in any browserwindow?
in a table, so that the swf is always centered even if the user resizes his browserwindow?!

i have a code attached index.txt
can somebody tell me how to modifie this file?

...in internet explorer there is a frame/box around the swf...
(and it says something like: click here to activate...)
how can i disable that??

thanks!


-------------------------------------------------------------------------

// -->
</script>
</head>
<body bgcolor="#2d2d2d">
<!--url's used in the movie-->
<a href="http://www.fraas.com/index2.htm"></a>
<!--text used in the movie-->
<script language="JavaScript" type="text/javascript">
<!--
var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
if(hasRightVersion) { // if we've detected an acceptable version
var oeTags = '<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"'
+ 'width="901" height="580"'
+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
+ '<param name="movie" value="fraas_stage.swf" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="bgcolor" value="#2d2d2d" />'
+ '<embed src="fraas_stage.swf" menu="false" quality="high" scale="noscale" bgcolor="#2d2d2d" '
+ 'width="901" height="580" name="fraas_stage" align="middle"'
+ 'play="true"'
+ 'loop="false"'
+ 'quality="high"'
+ 'allowScriptAccess="sameDomain"'
+ 'type="application/x-shockwave-flash"'
+ 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
+ '</embed>'
+ '</object>';
document.write(oeTags); // embed the flash movie
} else { // flash is too old or we can't detect the plugin
var alternateContent = 'Alternate HTML content should be placed here.'
+ 'This content requires the Macromedia Flash Player.'
+ '<a href=http://www.macromedia.com/go/getflash/>Get Flash</a>';
document.write(alternateContent); // insert non-flash content
}
// -->
</script>
<noscript>
// Provide alternate content for browsers that do not support scripting
// or for those that have scripting disabled.
Alternate HTML content should be placed here. This content requires the Macromedia Flash Player.
<a href="http://www.macromedia.com/go/getflash/">Get Flash</a>
</noscript>
</body>
</html>

View Replies !    View Related
External Swf Launches In New Browserwindow ?
I use the following script to load some external swf into my movie. The problem is that they open in a new browserwindow, and not inside my movie. I want them to be placed in an empty moviclip with the instancename "imageholder".

The script:

on (release) {
for (i=0; i<hand.length; i++) {
loadMovieNum(hand1[i]+".swf", "imageholder"+i);
}
}


If I use "loadmovie" instead I can't get it to work at all.
Does anybody know what's wrong ??

Culto

View Replies !    View Related
Call A .mov From MX, WITHOUT Opening Browserwindow
how do i open a x.mov (quicktime VR) without opening a browserwindow, but only opening the quicktime player?

i just about tried everything by now;(

(NOT for standalone/projector use)

peace

View Replies !    View Related
Opening Sized Browserwindow The Fast Way?
hi
can anyone help me on getting the title done....

Have to open a brwsr window opened on a mouseclick but i cant get this done the way i want, (whitout using javascript) it seems i cant set the size and the proppertys like no menu,statusbar, and if i do nothing happens..

is there anyone tat can help me out here....

View Replies !    View Related
Can I Make A Cgi Mailform Not Opening A New Browserwindow?
Hi
I'm having some trouble getting my cgi mail form to work like I want it to!
The cgi-script opens a new browser window, when I have submitted my flash mailform! I do not want this HTML browser window, but my own flash 'Thank You!'
Can anyone help on this one?
I have posted the cgi script I'm using here:
http://www.larsliin.dk/cgiscript.htm

Thanks
Lars

View Replies !    View Related
Flash-javascript-browserwindow Thing...
Hi,
I want to define a certain browser window as target for the server reply after a loadVars.send() operation.
The intended browser window is opened before as popup by using a javascript function (see below).
Popping up that window and closing that same window from within flash both works fine (so I know it exists and I can address it by its name), but when I try to specify this window as target in the loadVars.send command it is ignored and a new browser window is opened to display the server reply.
I also tried "javascript:replyWindow" and "javascript:replyWindow();", but to no avail...!
What´s the correct syntax or command to do this?
Thanks for your help,
Toby.


***

Script within the html containing my flash main movie:

<script language="JavaScript">
<!--

//popup new window for server replies function

function popup(url) {
replyWindow = window.open(url,"replyWindow","toolbar=no,width=20 0,height=100,status=no,scrollbars=yes,resize=no,me nubar=no");
}

//-->
</script>

***

Script on my submit button movieclip in my flash movie:

//open popup window
getURL("javascript:popup('deeband/Content/Guestbook/reply_void.htm');");

//send variables to server side script
_parent.varSender.send("http://www.mydomain.com/cgi-bin/guestbook.cgi", "replyWindow", "POST");

***

Script on keyframe shortly after sending the variables:

getURL("javascript:replyWindow.close();");

***

View Replies !    View Related
Best Way To Make Swf Occupy All Space In Browserwindow
I've seen flash websites that occupy all the space in a browser window, without scaling the swf. How exactly is that done? I can most likely figure out the css/xhtml to make it appear full screen in my browser, but I don't know how to script this in flash.

View Replies !    View Related
How To Always Center Flash Movie In Browserwindow?
Hey,

First of all i wanna say this site has been a great help so far on some technical issues in flash MX. Thx!
Still i can't seem to find the answer to this little problem: I've made a website in flash MX, so i've used the publish option in flash but when i open the .html doc in my browser my flash movie is aligned on the left side of my browserwindow, it's not centered. I made my movie on 1024x768 pixels, there's no background, only white. My screen resolution is 1280x1024 pixels. So my question is; if there's a way to always keep my movie centered when its viewed on any type of screen or resolution. I know its something to do with the html code but i'm not so familiar with html. Anybody can help me with this. I would be very grateful.

Greetings
Rels

View Replies !    View Related
Question About Maximized Browserwindow Animation
Hi, I got my flash movie maximized to full browser window. What I want to do though is have a simple animation thats starts as soon as the browserwindow has maximized to the users screen (right after the preloader). I just want the background of the full window to fade from grey to white. I tried to do this, but the bg-fill that I tween in flash only has the size of the stage, which is 1000 x 700, so beyond that, in my browser window its just white... I dont know how to make that animation full browser, so that it scales to the size of the users screen setting, while at the same time keeping the rest of the movie centered and at 100 % scale, no matter the screen setting. Can someone help me out with this, please?

thanks!

View Replies !    View Related
Can _blank Trigger Actions In Browserwindow?
If I load a popup window from a browserwindow. Can I put a action in the popup that trigger actions in the mainbrowserwindow?


I'll like to have the browser window to be a background for my popup and at a point the popup is changeing color and I'll like the mainbrowser window to change color aswell.

sound crasy?

View Replies !    View Related
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

View Replies !    View Related
Dragging Of 2 MC
Hi, I know the basic ways of dragging two movie clip. But my problem is whenever I start drag on the first mc, the second MC will shift down before it starts following the mouse. hmmm...a bit confusing right.

Erm, my objective is to drag the second mc but I don't want it to be locked to the center of the mouse. Here's my coding. See if you can find any error.

onClipEvent (mouseMove) {
if (_root.drag == true) {
this._x = _root._xmouse + x;
this._y = _root._ymouse + y;
}
}
onClipEvent(load){
x = this._x;
y = this._y;
}

View Replies !    View Related
Dragging Of 2 MC
Hi, I know the basic ways of dragging two movie clip. But my problem is whenever I start drag on the first mc, the second MC will shift down before it starts following the mouse. hmmm...a bit confusing right.

Erm, my objective is to drag the second mc but I don't want it to be locked to the center of the mouse. Here's my coding. See if you can find any error.

onClipEvent (mouseMove) {
if (_root.drag == true) {
this._x = _root._xmouse + x;
this._y = _root._ymouse + y;
}
}
onClipEvent(load){
x = this._x;
y = this._y;
}

View Replies !    View Related
../:dragging ?
why do people put /:variable or ../variable
why do they put the slash and the dots? this may be a dumb question, but i was just wondering about that
thx for your time

View Replies !    View Related
Help On Dragging PLZ
on (press) {
startDrag ("draghome", false, 200, 200, 200, 200);
}
on (release) {
stopDrag ();
}
--------------------------------------------------
can someone plz tell me whats wrong with this? I keep getting an error and it wont work! PLZ Help! TIA

View Replies !    View Related
Dragging Help
ok i have a dragable window and i want to use the 'constrain to rectangle' thing..like they do in this site:
http://www.globeshoes.com/resources/skatehm.html
(drag the menu around, see how you cant drag it off the movie?)

i know how to do this but i dont know what to set the L,R,T,B to..i want to make the drag area 15 pixels inward from the movie boarder (movie dimensions: 650 X 450)

so if u can help id appreciate it, thanx.

View Replies !    View Related
Dragging
I can set a movie clip to drag when the mouse is clicked, but how do I set it to drag only if the mouse is clicked on the movie clip I want to drag?

Thnaks!

View Replies !    View Related
Dragging
How would you make it so when you dragged an object it snapped every "x" squares?

View Replies !    View Related
Dragging Something
how do i drag something with the mouse.

i know how to do the "startDrag", but that drags the object all of the time, and i only want it to be dragged when i click on it.

View Replies !    View Related
Dragging
how do i have a button drag and when i am dragging it text appears and does NOT drag with it and when the button is released and is not dragged anymore the text dissapeares?

View Replies !    View Related
DRAGGING
If I want to drag a movie clip around but only horizontally how would I do that. I tried dragging it and setting the y coordinate to 0 but that didnt work.

Please help. Thanks.

View Replies !    View Related
Dragging Help,
hi, wats the code to tell MC "char" to drag, and if u try drag it onto the mc "wall" it wont drag over it,

u know like bounderies,

thx

View Replies !    View Related
I Need Some Dragging Help
I am trying to achieve something and I'm sure (being a newbie) that I'm doing it all wrong.

http://www3.sympatico.ca/stylusprodu...ideything.html

What I want, is for the menu of images (movieclips) to be draggable (with easing) left or right. I don't want to see any drag button if that's possible.

The dragging needs to be limited to the edges (for either end) so that the menu doesn't drag off into nowhere.

The turorial is killing me. Can anyone help me out? Maybe simplify things?

Any help would be very much appreciated,

georgia

View Replies !    View Related
Dragging :( :(
I cant make anything draggable!! Im not trying to do anything complicated! All I want to do is make a circle be able to drag around. why cant i do it?! the actionscript i copy and paste NEVER works! It always posts up with this notepad screen saying stuff is wrong! im soooooo lost! can somebody please help me? from the beggining, i have a circle button, what now??? step by step i need because im doing SOMETHING wrong and i cant figure it out thanks in advance

View Replies !    View Related
Dragging
HI,
can anyone help with this file?
At the moment its just an animation, but I'd like the user to be able to click on the ball and drag it around the circle, displaying the different options,
any help would be fantastic
cheers
Matt

View Replies !    View Related
Dragging Only On X
HOw can i make a clip drag only on the x, so it goes accross and not up and down.

View Replies !    View Related
Dragging :(
ok.... i am gonna post this in here too.. cause it is proberbly too simple for the action scripty section....

"OK... i am a newbie to flash ... i am currently trying to create a dragable navigation system for the interface of my site ... i know how to do this a half a dozen different ways using director... and i am positive this is doable in flash... i just do not understand what i am doing wrong. with in my file i have a movie called "knob"... Knob contains the code that allows the "red button" button to be dragged along a specific path, and when it reaches the specific drag target, it should either move to a new scene, or move to the next frame of the root timeline. however.... it only moves to the second frame of knob... despite attempting to specify "nextScene();", "gotoAndPlay("Scene 2", 1); etc...... sorry if i am not making my self clear
Why OH why is my feeble code not working
i am positive this is something stupid i have neglected to do... any help would be seriously appreciated... "

flash file of doom

View Replies !    View Related
Dragging Mcs'
I'm looking for a simple dragging script. Anybody know where I can find one or does anyone have an example I can look at and adapt for my own use?

Regards.

Had a thought once I had posted this thread, would the following script work?
code:
on (press) {
startDrag ("drag", true);
}
on (release) {
stopDrag ();
}

View Replies !    View Related
Dragging
I recently read a tutorial on the site concerning draging objects, it works fine, except for one thing, when the item is dragged to it's target, it just goes back to the first scene. When I test just the scene it goes to the proper frame.

Here is the code:
onClipEvent (load) {
startX = this._x;
startY = this._y;
}
onClipEvent (mouseDown) {
if (_root.drag.hitTest(_root._xmouse, _root._ymouse)) {
_root.draggedDrag = true;
}
}
onClipEvent (enterFrame) {
if (_root.draggedDrag) {
_root.drag._x = _root._xmouse;
_root.drag._y = _root._ymouse;
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root.hit)) {
_root.draggedDrag = true;
gotoAndPlay (8);
_root.drag._x = startX;
_root.drag._y = startY;
} else {
_root.drag._x = startX;
_root.drag._y = startY;
_root.draggedDrag = false;
}
}

Can anybody tell me why this happens?

View Replies !    View Related
Help W/ Dragging An MC
Hi,
I have a bunch of MCs that load from my library via this code on the button:

on (press) {
this.attachMovie("mypop7mc", "window", 0);
window._x = 290;
window._y = 180;
}

I’m trying to make the MCs in the library draggable within the confines of my flash doc (1024 X 400).
Is there a way to add AS to MCs that are pulled from the library.
Thanks much

View Replies !    View Related
Dragging
I have the following:

onClipEvent (enterFrame) {
t = this.hitTest(_root._xmouse, _root._ymouse, 0);

_alpha -= (20*!t*(_alpha>0)-20*(t)*(_alpha<100));

}

What happens is that the MC this is set to will fade to 100% alpha when the mouse hovers over and back to 0% when it leaves.

I want it so that it doesn't fade out even if it leaves as long as the mouse is held down, and only fades back to 0% if the user lets go.

Sort of so if the user drags the mouse away, it will still stay the same alpha until they let go.

Thanks

--iMat

View Replies !    View Related
Dragging MC
I need script like this:

If clicking on MC it starts dragging(not holding down a thing) and when clicking again, it sets property _x _y

At the moment i have script like this(here i must hold down a mouse button)


PHP Code:



on (press)
{
    nuga_invX = getProperty(_root.nuga_inv, _x);
    nuga_invY = getProperty(_root.nuga_inv, _y);
    startDrag(this, true);
}
on (release, releaseOutside)
{
    if (this.hitTest(_root.karp))
    {
        setProperty(this, _x, nuga_invX);
        setProperty(this, _y, nuga_invY);
        _root.karp.gotoAndStop(2);
        stopDrag();
    }
    else
    {
        setProperty(this, _x, nuga_invX);
        setProperty(this, _y, nuga_invY);
        stopDrag();
    } // end if
}





Hope this fits to newbies forum and i get help
Thx in advance

View Replies !    View Related
Dragging A MC
hi does anyone know the code to drag a moviclip inside the WITH statement:

with(mc){
onPress.stratDrag(this)
}

View Replies !    View Related
.dragging
anyone heard of .dragging?

this doesn't get a blue font when typed the panel, but does seem to work...

like in :

function checkPlayback():Void {
if(!csldProgress.dragging) {
csldProgress.value = sndAudio.position;
}
}


any other unknown properties??

View Replies !    View Related
Please Can Someone Help Me.dragging
i know how to make a game where you can drag things about but please can someone tell me how to make it so when i drag something into a wall for example how to make it react with like a mark on the wall

View Replies !    View Related
3D Dragging Help
Hello,

I have some code I found on the net that created a 3D Rotation illusion in Flash. I was able to edit it to get the objects I wanted where I wanted them, but I need to figure out how to use a drag command instead of it detecting the mouse position to determine movement. Here is the code:


Code:
this.createEmptyMovieClip("coreValues", 0);
coreValues._x = 262.5;
coreValues._y = 262.5;
focalLength = 175;
make3DPoint = function(x,y,z){
var point = new Object();
point.x = x;
point.y = y;
point.z = z;
return point;
};
make2DPoint = function(x, y, depth, scaleRatio){
var point = new Object();
point.x = x;
point.y = y;
point.depth = depth;
point.scaleRatio = scaleRatio;
return point;
};
Transform3DPointsTo2DPoints = function(points, axisRotations){
var TransformedPointsArray = [];
var sx = Math.sin(axisRotations.x);
var cx = Math.cos(axisRotations.x);
var sy = Math.sin(axisRotations.y);
var cy = Math.cos(axisRotations.y);
var sz = Math.sin(axisRotations.z);
var cz = Math.cos(axisRotations.z);
var x,y,z, xy,xz, yx,yz, zx,zy, scaleRatio;
var i = points.length;
while (i--){
x = points[i].x;
y = points[i].y;
z = points[i].z;
xy = cx*y - sx*z;
xz = sx*y + cx*z;
yz = cy*xz - sy*x;
yx = sy*xz + cy*x;
zx = cz*yx - sz*xy;
zy = sz*yx + cz*xy;
scaleRatio = focalLength/(focalLength + yz);
x = zx*scaleRatio;
y = zy*scaleRatio;
z = yz;
TransformedPointsArray[i] = make2DPoint(x, y, -z, scaleRatio);
}
return TransformedPointsArray;
};
pointsArray = [
make3DPoint(0,0,0),
make3DPoint(90,50,100),
make3DPoint(80,80,-50),
make3DPoint(80,20,-40),
make3DPoint(80,-40,-70),
make3DPoint(60,70,70),
make3DPoint(60,-80,-60),
make3DPoint(50,-50,90),
make3DPoint(30,60,-90),
make3DPoint(10,100,-10),
make3DPoint(0,-80,-60),
make3DPoint(-10,90,30),
make3DPoint(-10,-100,-20),
make3DPoint(-40,70,70),
make3DPoint(-40,-70,80),
make3DPoint(-70,80,-50),
make3DPoint(-80,-10,10),
make3DPoint(-80,-90,40),
make3DPoint(-90,-50,90),
make3DPoint(-100,40,-80)
];
for (i=0; i<pointsArray.length; i++){
attachedObj = coreValues.attachMovie("mc_element"+i, "mc_element"+i, i);
}
cubeAxisRotations = make3DPoint(0,0,0);
rotateCube = function(){
cubeAxisRotations.y -= this._xmouse/25000;
cubeAxisRotations.x += this._ymouse/25000;
var screenPoints = Transform3DPointsTo2DPoints(pointsArray, cubeAxisRotations);
for (i=0; i<pointsArray.length; i++){
currBalloon = this["mc_element"+i];
currBalloon._x = screenPoints[i].x;
currBalloon._y = screenPoints[i].y;
currBalloon._xscale = currBalloon._yscale = 100 * screenPoints[i].scaleRatio;
currBalloon.swapDepths(screenPoints[i].depth);
}
};
coreValues.onEnterFrame = rotateCube;
Here is an example of what I'm trying to accomplish:

http://www.firstbornmultimedia.com/flashLarge.htm

1. Click "Our Portfolio/By Client/M" and choose "Madonna Official Website"
2. Click "Click->To Launch Demo" at the bottom.

In the pop-up, choose one of the numbers which is her track listing. There are lyrics printed and displayed in kind of a "The Price is Right" wheel. Play around with that, and you'll get the idea of what I'm going for.

How do I edit the above code to do what we can do with the lyrics? Thank you!

David
The Linnium Project

View Replies !    View Related
Dragging
Hello All, I am trying to create small zoom box that is draggable and its x and y position determine the position of a bigger image. I have 2 images, both images are the same image 1 is very small, image 2 is very large. The zoom Box is on the small image. When you drag the zoom box I need the big image to move as well.

As of now I have the zoom box draggle along with some boundaries for it. Does anyone have any sugguestions on how to make the big image move to correspond with the position of the zoom box on the small image.

Here is what I have so far:

ActionScript Code:
var xMin:Number = 512;
var xMax:Number = 559;
var yMin:Number = 56;
var yMax:Number = 91;
var distance:Number = 4;
//
zoomBox.onPress = function() {
    zoomBox.startDrag(lockCenter, xMin, yMin, xMax, yMax);
    zoomBox.onMouseMove = function () {
        if (zoomBox._x < zoomBox._x + 1) {
            trace("Moving Left");
        }
    }
};
//
zoomBox.onRelease = function() {
    zoomBox.stopDrag();
    delete zoomBox.onMouseMove;
};
//
zoomBox.onReleaseOutside = function() {
    zoomBox.stopDrag();
    delete zoomBox.onMouseMove;
};

Thanks Everyone!

Dan

View Replies !    View Related
Dragging Out A Box
I need the user to be able to drag out a rectangle on the stage in my Flex application. I have seen a million tutorials on standard drag and drop features, but I can't find anything that covers this.

I basically don't know how to detect and handle the event of the user clicking on the stage, holding the mouse down, and then dragging it around which draws and redraws a rectangle as they move.

i.e. Imagine it's a drawing application and you want to draw a rectangle. Once you let go it finally attaches the finished rectangle.

View Replies !    View Related
Dragging Only One
Coding one of those click on this and drag out a copy of it.
the problem is...its only dragging one of the same copy.

or it is dragging all of the copies......

ActionScript Code:
i= 0
rapture.onPress = function() {
    i++
    var magic = attachMovie("1","1"+i,getNextHighestDepth());
    magic.onMouseDown = Coolies;
    magic.onMouseUp = Coolies2;
    magic.onPress = Docodie;
}

function Coolies () {
    startDrag(this,true);
}
function Coolies2 () {
    stopDrag();
    this.onMouseMove = null;
}

function Docodie() {
    startDrag(this,true)
}

-edit-
i just had to add


ActionScript Code:
rapture.onPress = function() {
    i++
    var magic = attachMovie("1","1"+i,getNextHighestDepth());
    startDrag(magic,true)//<-THIS and take out the onMouseDown
    magic.onMouseUp = Coolies2;
    magic.onPress = Docodie;
}

View Replies !    View Related
Dragging
Okay I have for example 25 mclips... with instance names mc1-mc25. All mcs have same properties and are draggable.
When you drag an mc over the top of any of the other mc's part of the mc being dragged over will become visible and then when rolledoff will dissapear again.

The following code is on all of the m.c.

roTarget.onPress=function(){
this._parent.startDrag();
this._parent.swapDepths(_parent._parent.thumsIndex++);
this.onEnterFrame=function(){
for (p=0;p<=25;p++){
if (hitTarget.hitTest(_parent['mc'+p].hitTargetBottom)) {
_parent['mc'+p].hitTargetBottom._visible=true;}else{
_parent['mc'+p].hitTargetBottom._visible=false;}}}
}

roTarget.onRelease(){
delete this.onEnterFrame();}



Problem. This works fine the first time you pick up an mc. However if the next m.c. you pick up has a higher instance name... eg... if i drag mc3 first and then try and drag mc5 next it wont work.
I assume this is some sort of timing issue... but I dont see why. The function that makes it work is an onEneter frame, but this should be being created every time an mc is pressed.
Any ideas? thanks J.

Please note that if i replace in the code the dissapearing and appearing of the mc's with a trace statement it workd fine, so it is something to do with the way in which I am trying to get the m.c's to appear and dissapear. thanks.

View Replies !    View Related
Dragging
Try to visualize this as I describe it. I created a movie clip that is to be dragged. The only reason for dragging this movie clip is so that I can get the ._y value and round it off using the int code. I set this "y" value as the keyframe number of my animation on my stage. As the mouse moves up and down, the animation jumps to the corresponging keyframe thus creating the effect that if your mouse moves down, the animation plays, if it moves back up, it plays the animation backwards. I'm sure this makes sense. What I want to do next is limit where the movie clip can be dragged. The reason for this is simple, if the viewer is not over my menu, I dont want the animation to play. However, when I try to limit where the movie clip can be dragged, I encountered a couple problems. The movie clip isn't dragged to the right of the screen, but the animation still plays when the mouse moves up and down, even when it's outside the parameters!!! the he heck!

.swf
.fla

View Replies !    View Related
Dragging
So I wonder if this is possible:

2 MCs. When you click one of them it drags the one that wasn't clicked, but it follows it a little slower, like easing so that it is following where you drag the other MC but is a little behind it..

Any suggestions?

thx in advance

View Replies !    View Related
Dragging
Hey, i'm trying to get a box to drag (it's a button within a movieclip), but my code just ends up dragging the whole stage, and i don't know what i'm doing wrong. :-

The code is:

on (press) {
startDrag ("");
}
on (release) {
stopDrag ();
}

I tried putting the name of the button instance in the "", but that just makes the code do nothing.

View Replies !    View Related
Help With Dragging
Hi guys! Hope you can help me out with a small problem here.

Attached is the .fla. Im actually trying to make this small educational app that helps children learn to find the area of triangles (1/2 x length x height).

Right now I need to make 3 draggable anchor points so the teacher is able to drag the points to create different shaped triangles.

I have a grid on one of the layers.

Currently, my 3 anchors are given instance names (n1,n2,n3) and are given the following button actions


Code:
on (press) {
startDrag("_root.n1",true);
}

on (release) {
stopDrag();
}
The dragging works fine but I want the anchors to snap to the grid I created. How would I go about doing that?

I was thinking of make little small MCs on the grid points and using dropTarget to snap the anchors to them, but that would require many many small MCs on the grid points. Is there any easier and more effective way?

Thanks a lot dudes

View Replies !    View Related
Something To Do With Dragging Perhaps? ^_^;
I've got a couple of things that I want to do with my menu, but I can't
find a tutorial to help with one such thing.

I want the user to be able to actually drag down the menu until it hits
a point in which a sound will activate and it will hold it's place...
kind of like a pull chain on a lamp. I also want it so that they can
pull it again and it'll pull itself back up towards the top (back into
it's original position).

I can't find a tutorial that talks about how to do that.

View Replies !    View Related
Dragging
I'm curious as to how to drag a move clip but only change the x value, so dragging left and right. Obviously the startDrag() allows you to drag all over. I had tried

map_mc.onPress = function(){
this.startDrag()
this.onEnterFrame = function(){
this._y = 0
}
}
map_mc.onRelease = function(){
delete this.onEnterFrame
stopDrag()
}

which "kinda" works but is far far from perfect. This is more or less makes the movieclip slide from side to side, but like i said, its not perfect. Any ideas?

View Replies !    View Related
Help With Dragging.
please help. I'm trying to make a draggable menu in a jukebox. I did it the same as in the draggable menu tut. the difference is, that the whole menu is inside of a clip with masking and such. the problem is I don't get any errors when I test it but the dragger clip just disappears when I click it. anyone encountered this before?

View Replies !    View Related
Dragging
Try to visualize this as I describe it. I created a movie clip that is to be dragged. The only reason for dragging this movie clip is so that I can get the ._y value and round it off using the int code. I set this "y" value as the keyframe number of my animation on my stage. As the mouse moves up and down, the animation jumps to the corresponging keyframe thus creating the effect that if your mouse moves down, the animation plays, if it moves back up, it plays the animation backwards. I'm sure this makes sense. What I want to do next is limit where the movie clip can be dragged. The reason for this is simple, if the viewer is not over my menu, I dont want the animation to play. However, when I try to limit where the movie clip can be dragged, I encountered a couple problems. The movie clip isn't dragged to the right of the screen, but the animation still plays when the mouse moves up and down, even when it's outside the parameters!!! the he heck!

.swf
.fla

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved