PDA

View Full Version : Drawn lines appearing behind background


TrevPage
07-27-2004, 01:07 PM
I'm a bit stuck (and have been trying all sorts of things all morning) - any help would be appreciated.

I have a GIF image that is my background (with some transparent space).
In front of this, I am trying to draw some curves from co-ordinates as defined by an ASP page. The importation of data is working ok, and the curve is drawn. However, I am only able to see the curve between the transparent parts of the GIF.

I've tried all manner of things (e.g. swapDepths(xx) ), but am unable to bring my curve to the foreground.

My code for drawing the curves is:

for(y=1;y<=routes;y++)
{
templigne="ligne"+y;
this.createEmptyMovieClip(templigne, y);
with (this.templigne)
{
this.swapDepths(1);
lineStyle(1);
moveTo(eval("xdep"+y), eval("ydep"+y));
curveTo(150, 150,eval("xarr"+y), eval("yarr"+y))
}
}

Any thoughts on what I might be doing wrong? Or what I might try next?

Many Thanks

Trevor

binkyboo
07-27-2004, 03:57 PM
This is just a shot in the dark but maybe this.swapDepths(1) needs to be altered. I believe your gif image is also at a depth of 1. Try changing the number.

TrevPage
07-27-2004, 04:08 PM
Thanks binkyboo.

I've added the following line:
map.swapDepths(1000)
where map is the name of the GIF occurance.

I've also changed:
this.swapDepths(1);
to
this.swapDepths(y);
which it was originally, before I started playing around with it.

Unfortunately, I'm getting the same result.....

binkyboo
07-27-2004, 04:11 PM
If the map is the name of the GIF occurance, wouldn't you want that at a depth of one and have the drawning at a higher depth?

TrevPage
07-27-2004, 04:17 PM
I couldn't work out which way to do it (i.e. is a higher number "higher" or "lower" - so have been trying both ways.

By putting:
map.swapDepths(1);
and
this.swapDepths(20+y);
I get the same result.

Any other thoughts?

I'm off home shortly, so probably won't see any replies till later/tomorrow

thanks again for your advice.

binkyboo
07-27-2004, 04:20 PM
Could you post your .fla for me to look at?

TrevPage
08-02-2004, 04:13 PM
This was on the back burner a little, but I've retackled it today.

First of all, a big thankyou to Binkyboo for trying. Your help really is appreciated. However, I haven't managed to find a solution (and that is really ANNOYING!!)

Unfortunately, it is a bit more complicated than just posting the FLA - you wouldn't see much without the ACCESS database and a number of ASP files as well. I was considering working through it to creaate a static version, but in the meantime managed to find a workaround - it isn't really the solution I was looking for, but it works!!!

The map which was in the foreground, blocking the lines I was drawing, I have changed the ALPHA to 50%, thus making the lines behind visible.

Again - thanks for your help.

binkyboo
08-02-2004, 04:45 PM
One last thing. Have you tried attaching the movies using attachMovie and then assign a depth to each?

TrevPage
08-05-2004, 08:19 AM
I've just tried with attachMovie, but unfortunately get the same result.......