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




Snap To Objects Oddness ?



Hi there, when i edit an existing symbol, for some reason snap to objects stops working ! Is there any reason for this as its definetly turned on. When i go back to the scene from symbol editing mode it starts working fine again. Any ideas ??

Thanks alot

Paul J



Ultrashock Forums > Flash > Flash Newbie
Posted on: 2002-09-19


View Complete Forum Thread with Replies

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

Making Objects Snap
I have a childrens collage program that basically is a FLASH Mr. Potato head. you have a figure on the stage and a list of items ie, nose, hair, lips, eyes and so-on.
The problem I am having is I want these objects to snap into place or be able to snap to another object for example I have a set of eyes on the stage and I want to add glasses I would want the glasses to snap to the eyes so they are aligned correctly...

Matt

Snap Objects To Desired Position?
What I'm basically trying to do is use the snap feature in flash during runtime.

I have a diagram of a rack that holds all of our servers, switches, etc and a bunch of pictures of the different models in flash. I want to be able to drag the pictures and have them snap into a place in the rack so anyone could reconfigure it very easily.

I was just wondering if anyone could explain how this might be done, or if anyone had seen anything like this I could download or take a look at.

I think it could also be done using DHTML.

Thanks for any input.

How To Make Objects 'snap' To A Location
I was wondering how to make an object snap to a specific location when dragged to an approximate area. For example, when dragging a solid circle to an outline of itself, the circle would snap perfectly in place when user releases the button. Is there a built-in mechanism that allows for this. I already know how to drag and drop. Any help is appeciated.

Snap To Objects Type Thing
i am making a thing where a bunch of square shaped movie clips will be placed on the desktop, and will be draggable. i was wondering if there was a way to get them to stick together... similar to the snap to objects tool... like say i am dragging one and i want to make a large square out of the smaller squares... i want them to snap together... any ideas?

Snap/Align Objects Dynamically
How do I snap/align objects dynamically? For instance, if I have an image loading dynamically and a text box directly below, I want the text box to always touch the edges of the image loaded (regardless of the image's size).

Making Movie Clips Snap To Objects
How do you make a movie clip snap to an object in a certain place once they are close. Or if they are too far away have them return to thier original postition? I made this for my son (i.e don't use it) http://portfolio.iu.edu/migomez/bodymixup.html

Right now you can just place stuff anywhere you want. I want to be able to have the objects hit a certain position when you get close to the body.

Drag And Drop Objects That Snap Into Place
Hello! I'm new around these parts (I literally signed up about 3 minutes ago!). I'm a high school student who just started using Flash about a month or two ago, so I'm far from advanced, though I have tackled some of the basics. In class I'm working on an art portfolio site but in my spare time I'm making a virtual dress-up doll (you know, the kind where you can pick up the clothes and drop them on the figure to mix and match outfits). Learning how to make drag-and-drop objects was very easy and there are lots of tutorials on it but what I can't figure out is how to get objects to "snap" into place. I want it so that the doll's hairdo's snap into position because they look kind of stupid when placed incorrectly.
Thank you so much, to anyone who can help! I've looked everywhere but haven't been able to find a tut on this >_<.

Objects That "snap To" Other Objects
Hey y'all,

Anyone know of the best way to script a symbol to "snap to" another symbol, within the published swf? (similar to the way you can set objects to snap to the grid in the Flash UI)

It's for a puzzle game.

Thx

[F8] Button Oddness
Hi,

I'm working on a tile-based game and I've hit a bit of an odd problem.

I've got a level editor that's working fine, and the game itself is loading in levels constructed by said editor. As a test, I've set tiles with a value of '9' to decrease the player's in-game money - if that hits 0, they're taken to the game over screen.

The oddness is this: On the 'Game Over' screen, I have a button that takes the player back to the title screen. The trouble is, if you get to this screen by losing all your money, the button doesn't work properly; it flashes to the title screen and then straight back to the 'Game Over' screen. I have a button on the title screen that takes you straight to the 'Game Over' screen (as a test) - if you get to the 'Game Over' screen using this button, you can return to the title screen no problem; it seems that the problem only occurs after you've played the game.

Could it be the fact that the title screen is earlier in the main timeline? If I change the 'Game Over' screen's button's target to a frame later in the timeline (say, for example, the frame that constructs the level), it works just fine.

I've attached the .fla (Flash 8 format) if anyone's got the time to take a look at it... you'll have to ignore the shoddy code; I don't have the time I'd like to polish it.

This (should) be really simple, but it's got me tearing my hair out! Any ideas?

Xml.send Oddness
Hi, I'm having various troubles with xml.send.

Using a command like:
resultsXML.send("http://www.myrailsapp.com/histories", "_self")

Running my flash app from my desktop, the above command will send it to my rails server. I see it in my logs. (Don't worry about whether it is a GET or a POST).

If I embed the movie on a page on my server, it does not send anything to my server (nothing shows up in my log).

Side note: if I don't have the "optional" "_self" parameter, neither local or the embed movie sends anything to the server.

If I use:
var target_xml:XML = new XML();
resultsXML.sendAndLoad("myapp.com", target_xml);

..the embedded movie will send a command to my rails server. But what I don't like about this is I don't expect anything in return (the local app complains with an error can't open that page")

Am I doing something wrong with the resultsXML.send() where it does not work when it is embedded? What's best practices here?

Array Oddness
Hi,

I'm trying to run two arrays alongside each other and to set one of them as an undo state, equalling the previous state of the other. Trouble is that when I change the first array the other one changes too!

So in the code below array 2 should NOT change when array 1 changes.

But it does!

Can anyone help?

See the code:

Code:
var array1:Array = Array();
var array2:Array = Array();

array2 = array1;

trace ("array1 = " + array1.length);
trace ("array2 = " + array2.length);

array1.push ( "bob" );
array1.push( "bill" );
array1.push( "jim" );

trace ("array1 = " + array1.length);
trace ("array2 = " + array2.length);

BitmapData Oddness
got a bit of a issue with bitmapData, i'm trying to make a replica of a movie clip inside a sperate movie clip at half scale. so far theres been no problems, however the bitmap that gets reutrned is only of the bottom right corner. i thought this might be a problemlem with the regestratoin point, so i changed that to top left but it hasn't changed anything.
because i suck at explaining i have the swf up at www.webng.com/adamius/Draw.html

try drawing something thenn click done (by the colours) the display box only appears to show anything in the very far bottom right.
any thoughts would be highly appriciated
you can download the fla from www.webng.com/adamius/Draw.fla
ads

Preloader And Linkage Oddness
Hmmm after messing around trying to get my preloader to work with linkages, I gathered to have to place instances of all the linked parts in a frame just after the preloader.

When I test the clip now it all works fine if I double ctrl enter to get it running in simulated bandwidth.
However if I do a normal test on it, it all apears ok (ie doesnt complain) but just doesnt draw the linked parts as though they arent loaded....?
If I put them into the centre of the frame I can even see them blip past so they must be there, but when attachMovie calls them nothing happens.

Anyone else had this?

Imput Text Oddness
Ok - I've created a site which is working fine apart from the contact form.

When I use it (on mac - safari & firefox) the imput boxes are fine, but when the client views, the text appears to low, and masked by the imput boxes.

The site is here: http://www.victoria.uk.net/new.htm

And the clients screenshot is here: http://www.victoria.uk.net/image.png

Has anyone got any ideas... really stuck!

Cheers, J.

Oddness With </p> And External Text
Hello all,

I am having a problem with external text and style sheets. For some reason, when I end a paragraph with </P> the text after that is cut off. The strange thing is, it works for some copy, generally the first <p class.... call. I can close that, but then I'll have one after the next block of copy and everything is lost.

Here's my code that I am using and an example of the copy that is loading incorrectly.

ActionScript Code:
var myStyle:TextField.StyleSheet = new TextField.StyleSheet();myStyle.load("main_styles.css");output.styleSheet = myStyle;output.multiline= true;output.wordWrap = true;output.html = true;output.selectable = true;var story:XML = new XML();story.ignoreWhite = true;story.load("text/textexample.txt");story.onLoad = function () {        output.htmlText = story;}



Here's the text.

Code:
<html>
<body>

<p class="title">TITLE</p><br>
<p class="bodyCopy">SUBHEAD</p>

<p class="bodyCopy">Body copy goes here.

<p class="headline">List<br>
<span class="headline_smallGrey">One a</span><br>
<p class="wheretobuylist">List Item<br>

<span class="headline_smallGrey">Two</span><br>
<p class="wheretobuylist">List Item<br>

</body>
<html>
So, if I add at </p> to the end of <p class="bodyCopy">Body copy goes here., everything else gets cut off. In fact, if I add a </p> pretty much anywhere it will get cut off. So the question is, what is going on here. how can I control the CSS styles? Thanks!

AS3 - Floating Point Oddness
Last edited by Nutrox : 2008-11-22 at 11:26.
























Hi guys,

I'm putting together my own matrix class at the moment (my version of the new Matrix3D class) and things are going well, but when multiplying matrices there are very slight differences between the values returned by my class and the values returned by the Matrix3D class.

For example, the first array here is my matrix result and the second is the one from the Matrix3D class...


Code:
1,0,0,0,0,0,1.5000000000000002,0,0,-1.5000000000000002,0,0,0,0,0,1

1,0,0,0,0,0,1.5,0,0,-1.5,0,0,0,0,0,1
Very similar but not exactly the same as I would expect. Here is another example...


Code:
1,0,0,0,0,0,1.7660444431189781,0,0,-1.7660444431189781,0,0,0,0,0,1

1,0,0,0,0,0,1.7660443782806396,0,0,-1.7660443782806396,0,0,0,0,0,1
Does anyone know why the values are slightly different? Technically the multiplication I use and the multiplication the Matrix3D class uses should use the same matrix math. I know it is a strange question but curiosity has got the better of me.

FYI: Here are the average times taken to multiply 10000 matrices:


Code:
myMatrix = 9ms
matrix3D = 190ms
Matrix3D class sucks!

Laco Extension Oddness
Hey,

I have a question for Laco users out there-- have you uninstalled the extension and experienced any oddness?

I have several projects which use it (I had 1.2 installed) . . . when I uninstall it, all of them break except for one. That one can still use all of the tween functionality, even though it explicitly throws an error that it can't locate lmc_tween.as if I attempt to import it. If I create a new .fla in the same directory and copy and paste a movieclip and its tween command in for that file, it does nothing as expected, and a trace of the movieclip's tween property comes up undefined.

There doesn't seem to be anything else weird-- the classpath is set to to the immediate directory, and a search for the include statement comes up blank. Nor did I attempt to override the MC or TF classes.

I'm not quite sure what it does when it installs . . . does anyone have any ideas?

Thanks--

Snap To
Can anyone help me with a snap to. I am trying to get a movie to snap to a postion on the screen when it is dragged to within a certain distance from the position. what I am currently doing is

getting the x and y position of the positon
getting the x and y position of the movie

subtracting the smallest x position from the largest
subtracting the smallest y position from the largest

if the both positions are less than a specified distance then setting the x and y properties of the movie to that of the snap position.

Here is the code that I have written for the x position am I on the right track:

//snaplooper movie contains 2 loopng frames

//frame 1
set (c, getProperty(_root.a, _x));
set (d, getProperty(_root.b, _x));

//a is the movie, b is the position

//frame 2

if (c>d) {
f = (c-d);
} else {
f =(d-c);
}
if (f < 30) {
setProperty ("_root.a", _x, d);
}
gotoAndPlay (1);


Thanks

Snap
Hey, I've sort of just jumped into the deep end on a project. Hoping I'll learn to swim.

It's a self-help quiz with 2 draggable MC's sorta like marbles (one called "more" and one called "less"), and 4 holes to put the marbles in, depending on their answer. At this point, I'm just trying to get the marbles to snap back to original position if the user doesn't put it in a hole.

THE PART THAT WORKS OK:
I was able to make the marble MC's (each containing a smaller MC called "snap") snap to the holes using hittests-- I placed this script on each hole (with different y positions depending on which hole)

onClipEvent (enterFrame) {
if (this.hitTest(_root.less.snap)) {
setProperty ("_root.less", _x, "84");
setProperty ("_root.less", _y, "102");
} else if (this.hitTest(_root.more.snap)) {
setProperty ("_root.more", _x, "84");
setProperty ("_root.more", _y, "102");
play ();
}
}
That seems to work allright. The draggable MC's start acting weird when they snap to position, though. Like hard to pick back up, or you can pick it up, but the mouse is no longer actually touching marble. I tried adding
Start Drag ("drag", lockcenter), but it gave me an error saying it had to be true or false. I'm new to this, I'm a moron, I know. The error is probably obvious to you masters, but I'm clueless why it's not working.

THE PART I CAN'T GET TO WORK AT ALL: the snap back to original position.

I've tried several approaches, some based on other discussions I found by searching this board, but none seemed to work. So I decided to try writing my own, but I think there's some sort of syntax error, or logic flaw somewhere.

I added a very narrow box-like MC over the row of holes, and called it "testerbar". Then on draggable, I tried:

onClipEvent (mouseDown) {
startDrag ("");
}
onClipEvent (mouseUp) {
stopDrag ();
if (this._droptarget != _root.testerbar) {
setProperty ("this", _x, "366.8");
setProperty ("this", _y, "367.9");
}
}

Is this just WAY off track? Am I using the != in the wrong way?

***DEMO: The client wanted a prototype sorta demo to see how it could work (he didn't think flash could do this sorta thing! hahahaha), and I put one together assuming (HOPING) I'd be able to figure it out if I got the job. I got the job, so now I need to figure it out. Bad way to do it, I know, but you can view the demo at: http://www.apexdesign.tv/ali/


THANK YOU FOR ANY ADVICE


========================================Pointless Rambling=
ActionScript is exciting as hell! but I feel like I'm learning Japanese, and all I want to say is "Which way to the bathroom", but probably coming out as "How spoon is my fire dog?"

I've spent oodles of dough on AS books, but they must all be too basic. One doesn't even mention the _droptarget property, and the other just gives a tooltip size description of what it is. ARGH.

I'm sure I'll have more questions later, but right now I'd just like to figure out why I can't get this snap to work. But also, in the meantime, is there any other source for ActionScripting KNOW-HOW besides books and FlashKit tutes? Seems like I keep shelling out dough on books, just to find out it doesn't tell me what I want to know.
[Edited by Al Flashino on 08-11-2001 at 09:25 AM]

Help/Does Anybody Know How To Snap?
Having great difficulty trying to figure this one out. I have a series of cubes and a series of squares. The cubes are dragable and when any cube is dragged onto any of the squares I want it to snap into place on the square. If anyone can help me out with this one I'd appreciate it.

Snap
Okay, I want to snap my all of my duplicate clips of "circle" when dragged over the target. The targets are named target1, target2 and so on, and it goes on till target 15.

When snapped, I would like them to still be draggable. Can someone help me out with this task? I have posted some of the coding that I have, I just need to add the snap to target command. Any help would be greatly appreciated.



Code:
for (i=1; i<=totNum; i++) {
circle.duplicateMovieClip("circle"+i, i);
ref = this["circle"+i];
ref._x = 45;
ref._y = 130;
funName = "fun"+ref;
ref.onPress = function() {
startDrag(this, false, 0, 0, Stage.width, Stage.height);
};
ref.onRelease = function() {
stopDrag();
};
}

[Edited by wiReZ on 06-13-2002 at 05:51 PM]

Snap To Help
Hello,

My flashMX 2004 is giving me a headache. i turned on snap to, turned on the magnet, hell i even put it to tolerant! but it wont snap to lines! it only snaps to straight lines(as in up,down,left or right). This is only when i draw with straight lines. When i normally move a line side with my mouse (when its already drawn) it does snap to the other lines.

A little help here please.

Snap To
how can I make only selected draggable movie clips "snap to" a non-draggable movie clip? Can anyone help me out? thx.

Snap To X,Y
Hey -
i know its easy and that its out there - just can't seem to find it.
i need my movie clip to snap to the xy coordinates to keep the text sharp.
applied to this code:


Code:
onClipEvent (load) {
_x = 1280;
_y = 0;
speed = 5;
}
onClipEvent (mouseMove) {
endX = _root._xmouse;
endY = _root._ymouse;
}
onClipEvent (enterFrame) {
_x += (endX-_x)/speed;
_y += (endY-_y)/speed;
}
thanks!

Snap
Any niffy suggestion on creating a snap game?

I want the press button to detect the last button pressed and if the shapes match, make them do something...obviously.

I think I'm going at it the wrong way.

I need to stick a "triange" id into the button/mc then if compares that and then if there is a match works then... right?


Code:
if(zum>1 && zum<=3){

ab[cb] = i
cb=cb+
}
if(zum>3 &&zum<5){
ac[cc] = i
cc=cc+
}
if(zum>5 &&zum<7){
ad[cd] = i
cd=cd+
}
if(zum>7 &&zum<9){
ae[ce] = i
ce=ce+
}
if(zum>9 &&zum<11){
af[cf] = i
cf=cf+
}
if(zum>11 &&zum<13){
ag[cg] = i
cg=cg+
}
if(zum>13 &&zum<15){
ah[ch] = i
ch=ch+
}
if(zum>15 &&zum<17){
ai[ci] = i
ci=ci+
}
if(zum>17 &&zum<19){
aj[cj] = i
cj=cj+
}
if(zum>19 &&zum<21){
ak[ck] = i
ck=ck+
}
if(zum>21 &&zum<23){
al[cl] = i
cl=cl+
}

Drag, Snap
Can someone help me? I need to know how to make this draggable words snap
parallel to the word to which it
is being matched, regardless of whether it is correct or not?.
http://www.eclipselatino.com/pearsonDrag&drop.html

Drag And SNAP
What i'm trying to do here is a drag and SNAP, whereby the obj i'm dragging will automatically "snap" to the droptarget area when i release my dragged obj near it.
There are plenty of plain drag & drop tutorials, but i juz can't find the one that i want. Can someone help?

Snap Modifier - What And Where Is It ?
I recently wen"t through the Flash5 lessons.
However I newer wen"t through lesson (08 - Animation) bicos I just can"t find this "snap modifier" !?!
I found button "the snap to object" but, when I moved bee to the end of the line, no black ring apers at the center of bee.
Please, if somebody has manage to pass this lesson whit actually animating movement of the bee, please share you knowledge whit me I"m so thamm curious :/

Drag - Snap
Does any1 saw AS with draggin' MovieClip to the area.
When it's near - MC must SNAP.

I have somethin like that... but it contains bUgs!

Clear?

Snap? And Symbols I Think.
Hello and thank you in advanced for the help.

What I've been trying to figure out how to do is take 2 lines. Both of them I've converted into Symbols (graphic file). I want one bar to be sitting on its own layer running top to bottom, and the other line to start in the middle of the vertical line and grow out from it.

I've tried making motion tweeds where I set change the horozonal transform % and try to grow it, but what happens is instead of just one end growing both ends grow at an equal rate and it looks more like a cross. I've seen some demos that do what I'm trying to do I just can not figure out how =(

Any advice would be helpful

To Snap To Pixel?
Is it possible to snap a minifont to pixel in flash 5. Of does anyone know how I can work arounf the blur problem ?. Im sick and tired of moving my font one pixel at a time to see if it is in focus and not blurred.. please help!

-ace

Paypal Snap In Help
Hi ppl,

I am encountering some problems when using the WA paypal snap in for my website. The tutorial shows that the final price is determine by the size of the shirt and the colour.

As for my item, the price and size is constant throughout and I only need the buyer to set the colour of the T shirt. Therefore I don't need a setprice.. Only need to set colour...

How do I do that? When the buyer click on the Add cart button, the chosen colour will show on the final order.

Please see the attached script below and help me. Thanks..


// Set the initial color and price for when the movie loads

setPrice();

function setPrice() {

// Get the price (based on size list)

var newPrice = sizeList.getValue();

// Declare color object for manipulating colors in the rubberBG Symbol

myColor = new Color(rubberbg);

// Set the background color of the color object to the value from the color list

myColor.setRGB("0x"+colorList.getValue());

// Set the amount of the Add to cart Snap-in

ATC.setAmount(newPrice);

// Set the item name for the Add to cart Snap-in to include the size and color

ATC.setItemName(sizeList.getSelectedItem().label+" "+colorList.getSelectedItem().label+" Brake Pedal Rubber");

// Sets the item number to a unique number based on item (concatinated index of both lists)

ATC.setItemNumber(String(sizeList.getSelectedIndex ())+String(colorList.getSelectedIndex()));

// Set visible price on page

thePrice = "$"+sizeList.getValue();

}

Snap To Mc On Drop
I need to make the key movie click snap onto the lock movie when it is dropped on to it. Can someone tell me what I'm doing wrong.
I have the following code:

on (press) {
startDrag(this, true);
}
on (release)
{
xlock = getProperty(_root.unlock_sequence.lock, _x);
ylock = getProperty(_root.unlock_sequence.lock, _y);

stopDrag();

if (eval(this._droptarget) == _root.unlock_sequence.lock) {

setProperty(_root.unlock_sequence.key, _x, "xlock");
setProperty(_root.unlock_sequence.key, _y, "ylock");

_root.unlock_sequence.lock.gotoAndStop(2);
}
}

Thank you for your time

Snap To Point?
Help!

I'm working in a clip in MX that has a scrollable series of 5 graphic instances (when you move the mouse left or right, the clip "scrolls" in that direction)..... and I want to code the instance to snap to one of 5 coordinates (identified as points between each graphic instance within the top-level strip of graphics)- whichever point is nearest.

How can I do this?

*looks hopeful for some guidance*

Cheers,

Snap MC To Path
hi,

i use a mc as a custom cursor, now i want to snap this cursor to a path if the cursorMC is close to the path.

The path is a randomly free path, generatetd with the drawing API.

If someone have an idea how to resolve this problem, please tell.

thx rocknroad

Scollbar Snap
Hi, does any body know how I can create a scrollbar that snaps to specific points? Thanks.

Snap One Object To Another
I am trying to snap one object to another via an (onload)anything anyone can tell me to get this working? I don't want just snap to an area I want a graphic to snap to a hotspot that will change possition on a screen.

Pixel Snap
I'm getting really really fed up with pixel snap. I have it turned on, but I still get text on fractions of pixels. I'll correct the text, but if I move the movie it's a part of, I end up with fractions again. I must be missing something. How on earth can I limit everything to whole pixel values?

Thanks
Mark

Snap-on Effect
On my drag and drop game how would i go about making an item "snap" into place when its in the general area of where its supposed to go?

Snap To Not Working.....
I am trying to use snap to objects in Flash mx v6.0
I am using a circle to trace a word and I snap it to the begining and then to the end and then tween but when I try it all it does is go from start to end at an angle staraight across the screen from left to right. What am I doing wrong here? Help please.

Thanks

Snap Angel
Hi All it would be kind if some body can tell me where to change the rotation angle when we rotate an object by pressing shift key (default value is 45 degrees)

[F8]Snap Movieclips Together
If there are more than 2 moviclips on the scene, what script should be used to snap them together edge by edge or snap to grids which are invisible?

Snap Scroller Help
I found this exciting little toy on Flash Kit (http://www.flashkit.com/movies/Scrip...1148/index.php) and am having trouble modifying it.

I've got it part of the way to where I want it right now. I've got my own background, selector, etc. created for it and it's running as it should. However, I want it to do a little bit more.

When the icon is over the dot for "Option One," I'd like my icon to change and become a link. For instance, over the first dot it would morph into a house-icon and become a link to my home page; over the second dot the icon would morph into a question mark and become a link to an "about me" page.

Now, the animation of morphing images is easy and I can simply take care of that when I need to. The hard part is getting the rest to happen.

How do I go about making the image change when it's at a certain point? And how do I make it a link? I need the scroller to still be active, so that even if it is acting as the "Home" icon, you can move it to another spot on the scroller.

I can't seem to figure this out, and I figured I'd post here to see if anyone could enlighten me.

Here is my site with the currently-working Flash: http://www.phenixdesigns.net

And here is the FLA file: http://www.phenixdesigns.net/scrolltop.fla

Snap Scroller Help
I'm using Flash MX.

I found this exciting little toy on Flash Kit (http://www.flashkit.com/movies/Scrip...1148/index.php) and am having trouble modifying it.

I've got it part of the way to where I want it right now. I've got my own background, selector, etc. created for it and it's running as it should. However, I want it to do a little bit more.

When the icon is over the dot for "Option One," I'd like my icon to change and become a link. For instance, over the first dot it would morph into a house-icon and become a link to my home page; over the second dot the icon would morph into a question mark and become a link to an "about me" page.

Now, the animation of morphing images is easy and I can simply take care of that when I need to. The hard part is getting the rest to happen.

How do I go about making the image change when it's at a certain point? And how do I make it a link? I need the scroller to still be active, so that even if it is acting as the "Home" icon, you can move it to another spot on the scroller.

I can't seem to figure this out, and I figured I'd post here to see if anyone could enlighten me.

Here is my site with the currently-working Flash: http://www.phenixdesigns.net

And here is the FLA file: http://www.phenixdesigns.net/scrolltop.fla

[F8] Snap To A Point (Oh Please Help)
I'm so close to finishing a game. I just need to know how to make more than one object snap to a certain point when the user person releases it. droptarget doesn't work sooooo any suggestions??

[F8] Snap To Grid
Hi Everyone

I've got at chessboard-like grid, on wich I drag several duplicated MC's. This works fine, but I would like to place thes MC in the midle of the nearest field in my grid automatically as I stop drag the MC, and not across two fields. A 'snap-to-grid'-like function. Preferably without the use of 'invisible buttons and the likes.

Does anyone have an idea to how i can attack this, since I am quite clueless. Perhaps a sctipt, since I am running out of time ...

Hope you can help. Thanks a lot.

[F8] Snap To Grid...need Some Help
Hi,

I'm trying to build a grid (using tile MC's) which will allow pieces to be placed in it. The pieces will then be centered (when dropped onto some spaces). When the object which you want to place somewhere is dragged over the grid pieces they kinda light up, to show the user which ones would be occupied. I need some help because I'm not sure how to approach this, seeing as I don't now a lot of AS. My approach would be:

1. Create a tile class, which has a boolean data member that stores whether or not a tile is occupied.

2. Initialize two arrays. One stores all the y-coordinates for the tiles which are created, the other one storing all the x-coordinates. Maybe I'll use two two-dimensional arrays (rows and columns).

example: Xarray[0][3] would be 1st row, 4th tile....it's x-coordinate.

3. Have a loop creating all the tile objects from the tile class. 20 x 15 tiles, 300. Every time an object is created, I would pass the tile's x and y coordinate from my arrays to the class' constructor. I would also pass the for loops i variable to the constructor so I can always create a different instance name for every newly placed MC, which would also happen in the constructor.
The coordinate values passed to the constructor would be used to create an MC at that location every time an object from that class is created.

So this is my idea to create all the tiles. Not sure if this will work in AS. Any input is appreciated.

I need a working way of determining which tiles are being "hit/touched" by whatever you are trying to place on them. I don't want to right tons of if statements, any ideas how this could be pulled off?

Thanks for reading,
Chris

How Do I Drag An MC And Have It Snap To Other MCs
Hi, posting again hopefully with more luck this time.

I've set up a grid of buttons that light up as you pass over them and I want to be able to drop a building on them as though they are a grid.
This is the script I'm using:

_root.mwindow.grid1.house2.onPress=function() {
this.startDrag();
}
_root.mwindow.grid1.house2.onRelease=function() {
this.stopDrag();
this._x=eval(this._droptarget)._x;
this._y=eval(this._droptarget)._y;
}

It works but it's inconsistent since the Object I want to drop wont always drop onto one of the buttons. How can I make it fall onto a button within a certain distance?

SNAP/Pairs
Hello All,

Im creating a game of snap/match the pairs for children.
There will be 5 pair, where they are positioned will never change, but....
how do i reveal two at a time?
how do i make the pairs recognise that they are the same? and keep them visible?
how do a make two mis-matches 'un-reveal' themselves

Any ideas?

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