Can 3D Objects Overlap/intersect
Oct 15, 2009Not sure how best to put this into words Ddoes the depth manager always keep one on top of another, or can planes intersect, overlap, go through one another?
View 1 RepliesNot sure how best to put this into words Ddoes the depth manager always keep one on top of another, or can planes intersect, overlap, go through one another?
View 1 RepliesActually my project is about dynamic readjusting of nodes i.e. let say if you have 15 nodes( assume point objects) and suppose lines are drawn between any randomly selected two nodes,then the corresponding figure obtained should be readjusted that no two lines should intersect except at nodes.
View 8 RepliesHere is the link
[URL]
when resizing the window, swf objects overlaps?
I have all the functionality that I want. The basic premise of this exercise is that youth will grab a statement, drag over a microphone and it'll appear on the corresponding area (board1, board2, board3). So if they grab two statements in a row it'll place their answers at my predetermined spot. Is there a way to space each answer by a difference of 10 px? So they grab answer one and it'll go at (x) 75px, answer two will go to (x) 85 px? Basically ensuring that the mc's will not overlap or pile up.
Code is below:
// listeners
backbutton.addEventListener(MouseEvent.CLICK, backclick);
helpbutton.addEventListener(MouseEvent.CLICK, helpclick);
answerbutton.addEventListener(MouseEvent.CLICK, answerclick);
[Code] .....
I ran into an odd problem a week ago that I haven't been able to fix. I'm new to Flash so sorry if this has been discussed but my research has turned up nothing. I'm using Flash Develop. I managed to duplicate the problem in a simple program: I set up one large bitmap for the background, not transparent. I then add another large bitmap on top of that, the second layer background, as a child of the main bg. This layer has transparency so you can see the bg through the trees and such. Then I stack a lot of sprites on top of each other, all with transparency. They can be children of the main bg or the second layer bg, doesn't matter. Where the transparency of the sprites overlap the second layer background disappears completely to reveal the main background (like a window around the sprite stack.) The bitmaps I'm using are from embedded png files.
I found that 23 transparent objects causes the 24th object and beyond to disappear. And it only happens when I have a mask set to the main background (a simple filled square for clipping the child sprites that move off-screen.) Also the problem goes away while the background is moving. My project features many objects near each other so the chance of this problem occurring is pretty high. Its not game-breaking but I'm new to flash and my project is nearly complete (and large) so I'm hoping there is something simple I can do to fix this.
I need to determine if a ray from a point (point and angle or vector) which goes to infinity intersects a line segment (two points), and if so, what direction it crosses (left or right.)I've been searching around on google but haven't had any success implementing the math solutions.I'm trying to do is implement the winding fill rule described here to determine if a path is clockwise or counterclockwise.
View 2 RepliesI have been playing around with the fmx2004 drawing api. I am drawing a complex shape and all is well but I would like to make the lines smoother. I haven't been able to find a smoothing function but I am working on a custom solution using the curveTo method.
I have to be able to calculate where two lines intersect. i have their slopes and two points along each line, so now all I need to do is calculate their intersection. I can do it on paper but not in flash
I have been playing around with the fmx2004 drawing api. I am drawing a complex shape and all is well but I would like to make the lines smoother. I haven't been able to find a smoothing function but I am working on a custom solution using the curveTo method. I have to be able to calculate where two lines intersect. i have their slopes and two points along each line, so now all I need to do is calculate their intersection. I can do it on paper but not in flash
View 5 RepliesLooking for any info on how to determine the overlap of two shapes created with AS3, and preform the usual shape manipulations on them, like combining the two shapes together to create a new shape, punching the overlapping shape out of the underlying shape, or creating the intersecting shape from the two objects.
View 5 RepliesI have a MovieClip that has four circles on the stage. Each circle draws a line to the other three circles. I'm trying to figure out how to find the intersect point between all of the lines. If there is no intersect point, then the circle in the middle should become the intersect point. I've uploaded the SWF here: [URL].
Here is the code for generating the lines:
ActionScript Code:
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.sensors.Accelerometer;
public class IntersectTest extends MovieClip {
[Code] .....
I have a flash drop down menu that overlaps a separate flash piece in an HTML page. The example of what I am talking about can be found here: [URL]
When you hover over product types, you'll notice that the drop down falls under the 'water banner'. I have set the z-index of that specific banner to be lower than the flash header but it still did not work. When I change the 'water banner' to a static image instead of a flash file, the menu overlaps without a problem.
This is the style that I have applied to the navigation bar
#flash_piece {
z-index: 1;
position:relative;
top:0px;
}
I have 9 movie clips on stage that i am shuffling but some of the clip overlap each other how can i prevent this?[code]...
View 2 RepliesI'm trying to use hitTest so that if any images overlap they will be replaced on the canvass.
ActionScript Code:
function imgSeed(){
for(i=0; i<5; i++){[code]....
although this works, It checks against itself, so it always true at least once, how can I tell it not to check against itself?
I want to add a lector in every frame with question. Everything works fine if i have 3 sounds of lector. When i add next, more then 3, in 4 frame sounds starting overlap on self.I dunno why, there is no error or warning. Funny is, if i change positions of sound for example add lector to 1,4,5 and 6 frames, overlap starting at frame 6 and next ones. I solved this problem by playing sound with AS3.
Here is a code:
Code:
var soundReq:URLRequest = new URLRequest("1.mp3");
[code].....
how can overlap a bitmap to another, setting the alpha of the top one in a way that I can still see the bottom one?Like if in photoshop I have to levels with one image each and I decrease the alpha of the top level.
View 6 RepliesIm using Flash CS3 with Action Script 2. I create a Flash file with few scenes in it. im using movie clip button in every scenes plus i embed .mov file in some of the scenes. I also have sound in every single scenes.
i create btnHDPage1 with instance name hd1 to be linked to scene1 and i create btn2 with instance name hd2 to be linked to scene2. (all these buttons are movie clip buttons). i have a sound and both scenes and a .mov file in scene1
The problem is, when i click on hd1 or hd2, yes it goes to appropriate scene. but the sound is overlapping and when im in scene2 and click on hd1 to go to scene1, my sound does not play and my .mov does not working.
[Code]...
i am doin a room planner where objects can be moved about 2 problems i got so far number 1 how can i make it so the objects can not overlap each other when the user drags them about 2nd problem is is it possible to put a arrow on the corner so when the user clicks it it spins round?
View 2 RepliesI have a screen showing 6 buttons. 3 of these buttons are fixed controls which must always be in view while the remaining three will be randomly selected for each question from a total of about 150 possibilities (do I really have to make 150 differently labeled buttons? (but this is a side issue)). these randomly selected buttons show up at randomly selected screen positions? I'm vaguely aware that X and Y and random will be used here.
The idea is to prevent the user from becoming familiar with the layout and building an intuition which would be counterproductive to the aim of the application. The remaining aspect of this problem after randomizing the position of the three dynamically generated buttons is that they must not overlap the 3 fixed controls which must be always available. I'm sure II could spend weeks on this without a few good tips to point me in the right direction.
I am creating a flash website and I want to scatter images all over the screen. Now doing this part isn't that hard, as it seems simply as giving them random coordinates. However I do not want them to overlap each other nor certain areas.I haven't scattered them yet, I've tried though with hitobject etc. How can I solve it so they won't overlap each other?
View 5 RepliesI'm building a game in Flash (AS3), and I need to check for a 100% Overlap of 2 symbols.
View 3 RepliesI have designed an interface and on one of the pages there are thumbnails of book covers which you rollover each cover and on the "up and down" states ive included the blurb which has some details about that articular book. However not all books appear correctly, the blurbs go behind the other book covers. All the books covers are placed on a single keyfame in the timeline, i have tried it on separate layers as well but got the same result. above the screenshot of the problem: Ive tried many ways to fix it and each time it is the same.
View 3 Repliesi have two draggable mclips on stage and need one of them two snap to the other whenever it passes over it. I tried with f(hitTestObject){ mc1.x = mc2.x; and mc1.y = mc2.y}, but it doesn�t work very nice.
View 1 RepliesI have two movieclips and I want to test if they have collided. However, I want them to still be able to touch eachother (i.e. no pixels between them) without them registering that they have collided. I'm using the following code but it doesn't quite do the trick for what I am wanting to do:
Code:
thisMovieClip.hitTestObject(thatMovieClip);
I'm trying to simply draw a solid shape consisting of various other shapes, however, when I overlap two shapes, the overlapped area becomes transparent again. For instance:
Code:
var myShape:Shape = new Shape();
myShape.graphics.beginFill(0x000000);
myShape.graphics.drawCircle(10, 10, 25);
myShape.graphics.drawCircle(20, 10, 25);
myShape.graphics.endFill();
this.addChild(myShape);
The above code is AS3, but I believe the same thing happens for AS2 as well. The overlapping area between the two circles is not clack.
I like to place lets say 4 movieclips on the stage with a random x-axis, but with no overlap, and if possible also not outside the borders of the stage. Performing the hit test would be not to hard, but then perfomring it again untill it is true, that is the tricky part (for me).
On the other hand I just want to place them visually random on stage, but infact they need to be more or less evenly distributed over the stage width, so maybe another solution is easier?
part of the code:
Code:
else if((i > spacery) && (i <= spacery*2)) {
container.x = Math.floor(Math.random()*800);
if (if (container.hitTestObject(container)){
[code]....
I have two rectangles, one of which is draggable, and when hitTestObject occurs I want to prevent the overlap.
here is the code:
addEventListener(Event.ENTER_FRAME, detectColl);
redSquare.addEventListener(MouseEvent.MOUSE_DOWN, grabIt);
redSquare.addEventListener(MouseEvent.MOUSE_UP, dropIt);
[code]....
I've been able to avoid this issue by avoiding overlaps or breaking the top layer down to a bitmap but in this particular design I need to have overlapping buttons. Previously if I had an MC overlap a button (cs3/as3) the button wouldn't work so in this design I made sure the hit areas weren't overlapping and the buttons do indeed work. Problem is when you click them, most of the time, there will be what looks like a single frame blink. In recording the issue the blink is the exact size of the full button being pressed. [URL] All of the buttons do it, Home, Bio, Demo, Contact. If it doesn't do it at first, keep clicking and they will.
View 1 RepliesI have a menu swf with multiple buttons and an animated logo which is in a loader called myLoader
These buttons are in an MC which uses this[code]...
...and so on with the add.event.listeners and they all work great- they overlap the menu then disappear.
The problem I have is the logo always stays on top of everything. Looks rather stupid, is there a way I can hide this logo behind the swfs while they play?
I'm trying to detect overlap between elements on my canvas. The attempt is to reuse some of the code for collision detection at [URL]
This is the smallest MXML sample I could come up with that gives me a type error.
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
[code]....
I have made a Actions Script 3 code that fetches an image, does an addchild do it and adding a mask to it aswell.
Everything works fine, except the mask I've made is an animated MovieClip, and this MovieClip hides some spots where 2 or more objects inside that MovieClip overlaps each others.I haven't found how to remove this effect, so the mask is valid on overlaping aswell.[code]...