Lock To Mouse
How do you lock a mask to the mouse?
FlashKit > Flash Help > Flash ActionScript
Posted on: 09-27-2001, 08:51 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Mouse Lock To Object Help
Ok I have flash 2004 pro, I am trying to figure out how to get the mouse to lock to the object i am draging. I am use to being able to just click the lock to mouse box but 2004 does not have it. I am tired typeing it in like in the older versions of flash but it wont take it keeps saying its not ture. plese help here is my script. I just need to know how to code it in to make the object warp to my mouse when I click the button.
on (release) {
//Start Dragging Movieclip Behavior
startDrag("lamp");
//End Behavior
}
Lock Mouse Position?
can i lock the mouse to not move outside a set position?
i need to lock the mouse so that when it is clicked on a horizontal sliding button, the mouse will not move vertically, only horizontally with the slider. i would appreciate any help / recommendations with this.
-Flash MX
Why Is That My Mouse Will Not Lock On My Button
i create button in photoshop, saved it as png, created new document in flash, imported background gif file and my button image. then i created first button on up state i added my button image, and same will all other states, (over, down and hit).
tested flash and everything looks ok, got html code added that code to my html and now when i go over button mouse changes just for milsecond to hand and then goes back to pointer.
does anyone has any clue why my mouse not locking hand and stays as hand when i'm over my button ???
thanks
Dynamic Text With Mouse Lock
Hello everyone! I am making a links page for my site. What I have is a button for the URL link, and on rollover a description 'locks' to the mouse (like at safeplaces.net).
So for example, when I rollover 'www.flashkit.com' a description locks to the mouse of 'fun for all the family!'.
So I have a dynamic text variable within the mouse- locked movie, but this does not update. I have checked that the global variables work in other places in the movie and they update fine.
any thoughts? thanks guys.
Making OnDrag Lock The Mouse In Place
I don't know exactly how to word this.. basically, I have a homemade scroll button. All my scrolling works fine but I have a problem with onRelease because the mouse isn't on the scrollhead movieclip any moore. Is there a way to lock the x value of the mouse itself while dragging?
http://www.dustinandamy.info/TDOT/
Go to the Schedule page and drag the yellow scroll head.
-Dustin
Rom 8:28
What Is That Little Lock For?
I have looked in the help, the manual, and all over these forums. I have messed with this little lock, and I don't know what it does!
Any object in flash, when you select it, in the properties, if expanded, you see in the bottom left the width and height fields, as well as the x and y pos fields. To the left of those is a little lock, which when you click on it produces two lines which move to the boxes. Presumably it would lock these values. However, this is not the case. What does it do, then?
-Rataluge
Getting Something To Lock On The Y
lets try this again. I guess I made the mistake to try and ask too much in my last post. so I will start off with something easier. (well, at least to you all who understand it)
first one. how would I make an object stay along one path? like say, I have a box, and when I mouse drag it, I only want it to be able to move up and down. so if I try moving the box off to the side, it wont move, but up and down it will.
and if I can ask, how do I make a start button work? have it so my code and game does not start until I hit this specific button.
Lock With MSN ?
Is there anyway possible that upon logging into my msn I can change an indicator on my flash site to show I'm logged on???
I'm thinking it might be possible to take it through a database but I cant figure out how to connect msn to anything.
~~ Seretha
Lock With MSN ?
Is there anyway possible that upon logging into my msn I can change an indicator on my flash site to show I'm logged on???
I'm thinking it might be possible to take it through a database but I cant figure out how to connect msn to anything.
~~ Seretha
Really Lock Swf
hi,
does someone knows how to really lock the import or decompil swf files (with asv for ex.) ?
the flash lock import don't work at all !!
thanks
Swf - LOCK EVERYTHING DOWN
Guys, sorry about this, I'm sure it's been posted before but I need immediate help and I can't find this info anywhere.
What is the easiest way to lock down an exported flash movie.
Specifically dealing with published swf's I want it so that users can't resize the final output as it's basically just a video and it looks like crap when resized/maximized
So:
NO RESIZE of the window
NO MAXIMIZE of the window
that's all I really need.
Any help? Please... been so long since I used flash regularly that it's like learning from the beginning all over again.
Any Way To Lock Printing
I know this sounds a bit stupid, but my boss is paranoid about people being able to print his work off the website. Is there any way that printing is turned off for specific pages? I am working with Flash 5.0
Thanks a lot.
Lock MouseDown
Anyone know a way to lock the mouseDown or onPress feature? I have a function set to play when the mouse in over the button, but it stops when the user presses and holds the button. I just wanna take that ability away from them. Any ideas?
Lock An MC Position?
hi,
i have a Mc that has a drag action on it. within this Mc there is another Mc which i would like to lock the position of. So in other words when "MclipMain" is dragged MclipInMain" stays where it is relative to _root.
strange one i know but any help would be great.
tnx
LOCK AND KEY SAGA
Hi guys,
I need to create a lock and a key element and the key is hanging and can be picked up and put into the lock and turned if possible,
thanks everyone,
tom
Lock And Keys Take 2
hi everyone,
I am trying to get a key and lock thing happening, "key2.fla" is the file I am talking about...when the key is turned I want it to go the the next scene..but it doesn't seem to work, would there be any reason for this??
thanks,
tom
Lock The Size
how do i lock the size on my movie so it always is 700x648 pixels? Now the size on it depon don how big the window is. I want to lock it!
Lock Movie?
I have one other quick question...
When I publish my movies, like all others, it comes out and you are able to rite click on the movie and go foweard, back, rewind, ect. I have come accross meany people that have their movie where all that is allowed it settings, and about flash 6.Do I have to create a progector or publish in another format? Thanks for your time.
Library Lock Out...
Can anybody help me. I'm using Flash 5 but I can't get anything out of
the library it seems to be locked or whatever. What's the magic button
or manouvre???
Lock Code Against Changes
The client wants the .fla and we are concerned about code changes that may backfire on us for future enhancements. The Lock layer can be unlocked by clicking the icon so this is not securing or preventing code changes.
Any suggestions?
Key And Lock Trapped Me In
This part is just background:
I have a "storte_key" mc that attaches to a "inventory" mc when you click on the "outer_key" button. When this happens, the button dissapeers( which is supposed to happen) and the item "appears in the inventory.
After the key is in the inventory:
Now, there is a "_root.complete_door.knob" handle that tells the door when it is unlocked, which depends on whether the key has been dragged
from the inventory, to the knob, and has been released yet. What should happen then is the key dissapeers and the door is "unlocked".So you click the "knob" and open the "door" (the complete_door mc, plays, revealing the next room) .
I only need to know how do the key to the door thing. I have tried the hitTest and dragOver. please help.
How To Lock .swf Size
I'm in the process of publishing my .fla file but when I open the .swf file I can resize the window, which allows me to see all of the components that are off of the stage. Is there any way that I can lock the size of the window?
I know that when you publish an html it will lock the size of the .swf file, but you need the .swf file in the same directory of the html. So is there a way to embed the .swf inside the html?
Sorry if these questions seem stupid, and thank you in advance for any help you can offer.
[F8] Lock Startdrag ?
just wondering how do you lock startdrag. because in my game, newEscape, when you scroll your mouse out of the swf file and go to the other side, the startDrag jumps through.
i am using this code
Code:
square_mc.onEnterFrame=function(){
startStopInterval(true);
startDrag(this,true,32,32,268,268);
for(var i:Number = 1; i<=4; i++){
if (this.hitTest(this._root["bar"+i+"_mc"]))
this.stopDrag();
}
}
so far I made a quick fix by using
Code:
square_mc.onEnterFrame=function(){
startStopInterval(true);
this.onRollOver = function(){
startDrag(this,true,32,32,268,268);
}
this.onRollOut = function(){
this.stopDrag();
}
for(var i:Number = 1; i<=4; i++){
if (this.hitTest(this._root["bar"+i+"_mc"]))
this.stopDrag();
}
}
the fix works, but now its kinda harder to play.
see my signature for the link to the game.
thanks
How To Lock Button's / Mc's?
How do I lock my menu when a movie clip covers the whole scene? They cant be seen at all though Im still able to click on them, which sucks.
I could disable their functions but they're in the main scene and the mc (the one that appears over them) is inside another mc so that option wouldnt work.
How can I do this?
Thanks for your help!!!
Domain Lock With AS3?
Hi,
I was wondering if anyone can tell me how to write a domain lock in AS3? That means locking an SWF file to a certain domain so that it will not run on any other URLs. Maybe there are any tutorials out there that I haven't found yet?
I remember darkly how it was done in AS2 but I guess there are better/safer ways in AS3?
A Way To Lock X And Y Values?
I am still having the same issues mentioned in my preview thread...I have created a menu system and when you click on the button I would like to load an external swf file.
I can load the swf but when I click on another menu item, the external swf does not unload and it moves up and down with the drop down menu.
How can I get around this? Can I lock the x and y values? Do I just unload the swf file??
I have been looking at this issue for days and am getting frustrated!
Please help!!!
How To Lock A Swf (the Source)?
There is a lot of software now that can crack a swf to reveal source.
Is there any way to protect a swf from having its source available from one of these tools?
Thanks!
How To Lock Button's / Mc's?
How do I lock my menu when a movie clip covers the whole scene? They cant be seen at all though Im still able to click on them, which sucks.
I could disable their functions but they're in the main scene and the mc (the one that appears over them) is inside another mc so that option wouldnt work.
How can I do this?
Thanks for your help!!!
Lock Out Key Strokes
I am working a game where I want all the keys that are not a letter or backspace locked out, or that they dont do anything when pressed, does anyone know how I can do this?
[MX] Preloader Lock Up
Hello,
I'm using a preloader on my website. The preloader works fine on Internet Explorer, however when I tested it in Mozilla and on a Mac (running Netscape) there is a lockup on the preloader. The screen will just sit there and the website doesn't load. Both were running Flash Player 6 which is the version I'm aiming for. I found that if I refreshed the page the site would begin to work, but I doubt visitors to my site would do this and I don't want it to be required to get my site to work. I'm going to post the code I'm using below. If anyone out there could help me with this it would be greatly appreciated!
Heres the action script - from the first frame of my launch movie
ActionScript Code:
stop();function loadSWF(theURL, theTarget) { loadMovie(theURL, theTarget); loaderInterval = setInterval(loadChecker, 50);}function loadChecker() { loading = _root.holder1_mc.getBytesLoaded(); total = _root.holder1_mc.getBytesTotal(); percent -= (percent-((loading/total)*100))*.25; per = int(percent); percentage = per+"%"; _root.loading_mc.preloader_mc.loadBar._width = per * 2; if (percent > 99) { faderInterval = setInterval(fadeBack, 50); clearInterval(loaderInterval); }};function fadeBack() { _root.loading_mc._alpha -= 6 if (_root.loading_mc._alpha < 1) { _root.holder1_mc.gotoAndStop("home"); unloadMovie("_root.loading_mc"); clearInterval(faderInterval); }};loadSWF("menu.swf", "_root.holder1_mc");
As you can see I call the loadSWF function to load menu.swf into the holder1_mc movieclip. That function then sets an interval with the loadChecker function that acts as the preloader. This is where nothing happens on some browsers (yet it works fine in IE). Any suggestions?
Thanks
Foo
Help With Browser Lock
Hey all, I'm trying to get my browser to lock down (ie no BG, no scrollbars) to the exact size of my embedded movie. I searched the forums here and elsewhere, but cannot find it. I know I have to use some type of javascript for this, but can anyone help me with it? Thanks.
Lock Scale
I was through the F1 Help doc a lot yesterday, and I sware I saw something about locking the horizontal or vertical scale of ... a movieclip or bitmapdata, I can't remember. All I know is that would be really useful for me right now! I'm transforming the matrix of an mc, but I don't want a certain child mc to be scaled.
Anyone know of such a thing? Maybe not for mc, maybe textfields? Thanks.
Lock Two Sliders Together
I've created a slider control (using the excellent tute on kirupa) and am using two instances of it on my stage. I also have a lock that sets the variable locked to true or false. What I want to do is if locked == true have both sliders move simultaneously to the same values if either one of them is dragged...
Any suggestions?
Drag And Lock
Hello there,
I'm trying to figure out how to drag and lock an item to a movie clip. I have 4 different items that are going to be draggable to a movie clip area called "basket_mc". Once they hit the movie clip area, these 4 items will be lock to that. I was able to drag them to the area, but I also want them to lock as well. any ideas please?
ActionScript Code:
stop();tv_mc.onPress = function () { startDrag ("tv_mc");}tv_mc.onRelease = function () { stopDrag (); if (tv_mc._droptarget == "/tv_mc") { basket_mc.gotoandStop("tv_mc"); }}mobile_mc.onPress = function () { startDrag ("mobile_mc");}mobile_mc.onRelease = function () { stopDrag (); if (mobile_mc._droptarget == "/mobile_mc") { basket_mc.gotoandStop("mobile_mc"); }}mouse_mc.onPress = function () { startDrag ("mouse_mc");}mouse_mc.onRelease = function () { stopDrag (); if (mouse_mc._droptarget == "/mouse_mc") { basket_mc.gotoandStop("mouse_mc"); }}phone_mc.onPress = function () { startDrag ("phone_mc");}phone_mc.onRelease = function () { stopDrag (); if (phone_mc._droptarget == "/phone_mc") { basket_mc.gotoandStop("phone_mc"); }}
How To Lock Button's?
How do I lock my menu from working when a mc appears over them? They can't be seen at all, though Im still able to click on them which is not good.....
Thanks alot for your help!
[MX] Preloader Lock Up
Hello,
I'm using a preloader on my website. The preloader works fine on Internet Explorer, however when I tested it in Mozilla and on a Mac (running Netscape) there is a lockup on the preloader. The screen will just sit there and the website doesn't load. Both were running Flash Player 6 which is the version I'm aiming for. I found that if I refreshed the page the site would begin to work, but I doubt visitors to my site would do this and I don't want it to be required to get my site to work. I'm going to post the code I'm using below. If anyone out there could help me with this it would be greatly appreciated!
Heres the action script - from the first frame of my launch movie
ActionScript Code:
stop();function loadSWF(theURL, theTarget) { loadMovie(theURL, theTarget); loaderInterval = setInterval(loadChecker, 50);}function loadChecker() { loading = _root.holder1_mc.getBytesLoaded(); total = _root.holder1_mc.getBytesTotal(); percent -= (percent-((loading/total)*100))*.25; per = int(percent); percentage = per+"%"; _root.loading_mc.preloader_mc.loadBar._width = per * 2; if (percent > 99) { faderInterval = setInterval(fadeBack, 50); clearInterval(loaderInterval); }};function fadeBack() { _root.loading_mc._alpha -= 6 if (_root.loading_mc._alpha < 1) { _root.holder1_mc.gotoAndStop("home"); unloadMovie("_root.loading_mc"); clearInterval(faderInterval); }};loadSWF("menu.swf", "_root.holder1_mc");
As you can see I call the loadSWF function to load menu.swf into the holder1_mc movieclip. That function then sets an interval with the loadChecker function that acts as the preloader. This is where nothing happens on some browsers (yet it works fine in IE). Any suggestions?
Thanks
Foo
Help With Browser Lock
Hey all, I'm trying to get my browser to lock down (ie no BG, no scrollbars) to the exact size of my embedded movie. I searched the forums here and elsewhere, but cannot find it. I know I have to use some type of javascript for this, but can anyone help me with it? Thanks.
Lock Position Of A MC
Hi,
I have a problem with the position of one of my movie clips.
I have a content MC that is positioned with this code which is in my first frame on stage:
ActionScript Code:
Stage.scaleMode = "noscale";
Stage.align = "tl";
Stage.addListener({onResize:_root.reposition});
function reposition() {
//positionere indholdet på siden boxen der hedder mainContent_mc
var mc = _root.mainContent_mc;
var newX = Math.floor((Stage.width - mc._width) / 2);
var newY = Math.floor((Stage.height - mc._height) / 2);
mc._x = newX;
mc._y = newY;
};
reposition();
In the MC with the instancename of mainContent_mc I try to position another mc with the instancename logo.
I have positioned it with this code:
ActionScript Code:
logo.location._x = _root.mainContent_mc._width / 2;
logo.location._y = 230 - _root.mainContent_mc._height;
My problem is that when I resize the browser window the content of mainContent_mc dissappear out of the brower window.
How can I lock the position so that when I scale it will stop at one point and stay there even when you resize the browser window?
Lock Text Box
Using setFocus, I was able to place the cursor in a specific text box. Is there a way to ensure focus never leaves this text box, in effect locking it?
Help With Lock On Zoom
Found a little .FLA The Canadian posted which zooms in on an mc on key press then back out again on key press. I'm trying to combine it with an x and y scrollable map. The problem is that the map won't zoom in where the mc button is it is always off target and I can't work out why. Click on the grey button to see what i mean.
Please find the .FLA here [url=http://www.bruce-wilson.co.uk/panzoom1.fla]
Thanks for any help
How To Lock A Window With Swf File
I really wont to know how to lock a window with a flash file. Example: when i open a swf file, i want that don't allow to scale (the window), to force the window to stay with 200x300 pixels, for example, to don't allow to scale.
If any one can tell me about this doubt...
Sorry for the inglish.
Lock Input Fields?
Hi there, I want to know if it's possible to lock input fields when a Graphic Symbol is ontop of it with Alpha 50%......
I have an animation when a user click's a button, I use the graphic symbol to let the user think that the background is half transparant, but it's the textfield.....that's all ok, but when you click an input field, you can still edit it, and that's not possible.
Maybe with something like.....a force field on the graphic?....anyone?
Lock The Window Size?
I have a flash movie that is going to be played with the stand alone player(flashmovie.exe). Is there any way that I can set the size of the window as fixed??? I mean, even if the user pressed the "maximize" button on the right top of the player it wouldn't change its size???
It's not a .swf file, it's .exe.
Tks a lot!!!
Tween Lock Problem
Hi Everyone!
I've noticed a nasty problem that comes up when motion tweening and actionscript-style tweening (this._x+=5) collide.
Basically, once you use AS tweening, regular tweening stops.
I've attached a very simple fla to demonstrate. Am I smoking crack somehow? Can these two get along somehow?
Thanks for any input!
- M -
Lock Horizontal Scrolling
What is the script for locking just horizontal scrolling?
I used to know but i forgot =/
Thanks a Million
|