Re: [Flashcoders] Grid / Math - getting neighbouring positions

2007-06-17 Thread Jiri Heitlager | dadata.org
Please I really need help on this on, I am cracking my head over it. 
Bresenham algo is also not the way to go, because it is for circle's and 
to complex!

I can only get one ring, arggg

If I go one ring further then it results in many double values, 
calculate allready when doing the first ring.


Here is the code..

var row = 0;
var c:Number = 3;
var ring:Number = 1;
//take start pos [2,2]
var x:Number = 2;
var y:Number = 2;
//
while (rowc) {
for (var i:Number = 0; ic; i++) {
var rowID:Number = (x-ring)+i;
var colID:Number = (y-ring)+row;
if (rowID0 || colID0 /* || (rowID == sR  colID == sC)*/) {
continue;
}
trace('['+colID+','+rowID+']');
}
row++;
}
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Grid / Math - getting neighbouring positions

2007-06-17 Thread Joshua Sera
The easy way to do this is like so.

So you have a square at x,y, and you want to get all
the squares n squares away.

Get squares
  x+n, y
  x-n, y
  x+n, y+n
  x-n, y+n
  x+n, y-n
  x-n, y-n
  x, y+n
  x, y-n

I suspect you want to do this for your version of that
whale-ey thing though, so what you actually want to do
is a bit different.

First off, to find out which grid square a point fits
into (this being the center of where your user is
looking):

You need the height and width of your grid squares.

Take your point (x, y)

Your point fits into grid square
[Math.floor(x/squareWidth),
Math.floor(y/squareHeight)]

Apply this by figuring out where on the big picture
your person is looking.

After that, move left and up by half the screen width,
and height, then right and down by the same amount,
and you have the ranges of squares to get in order to
display that part of the image.





--- Jiri Heitlager | dadata.org [EMAIL PROTECTED]
wrote:

 Please I really need help on this on, I am cracking
 my head over it. 
 Bresenham algo is also not the way to go, because it
 is for circle's and 
 to complex!
 I can only get one ring, arggg
 
 If I go one ring further then it results in many
 double values, 
 calculate allready when doing the first ring.
 
 Here is the code..
 
 var row = 0;
 var c:Number = 3;
 var ring:Number = 1;
 //take start pos [2,2]
 var x:Number = 2;
 var y:Number = 2;
 //
 while (rowc) {
  for (var i:Number = 0; ic; i++) {
  var rowID:Number = (x-ring)+i;
  var colID:Number = (y-ring)+row;
  if (rowID0 || colID0 /* || (rowID == sR
  colID == sC)*/) {
  continue;
  }
  trace('['+colID+','+rowID+']');
  }
  row++;
 }
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the
 archive:

http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com
 



  
___
You snooze, you lose. Get messages ASAP with AutoCheck
in the all-new Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_html.html
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Grid / Math - getting neighbouring positions

2007-06-17 Thread Jiri Heitlager | dadata.org

Thxn Joshua and others,

I have to look into that. In the mean time I came up with the following 
code. This takes in a vector and then calculates a 'ring' from that 
position. With this, I can scale up the 'radius' and get recursively get 
all the rings from a point from in to outer ring. My goal i still to 
fill an array with all the points of the grid, starting from a center 
point en then moving outwards in a ring.

Here is the code so far, i hope someone can maybe give some commment on it.

var i:Number = 0;
var cycle:Number = 1;
var dir:Number = 1;
var count:Number = 3;
var row:Number = 0;


function getTiles(startX:Number , startY:Number) : Void
{
//startX -= (count-1);
//startY -= (count-1);
var x:Number = 0;
var y:Number = 0;

while (cycle=4) {

if (cycle2  dir == 1) {
dir = -1;
}

row = (cycle%2);

while (icount) {
if (dir == 1) {
if (row) {
display(startX + x, startY + y);
x++;
} else {
display(startX + x, startY + y);
y++;
}
} else {
if (row) {
display(startX + x, startY + y);
x--;
} else {
display(startX + x, startY + y);
y--;
}
}
i++;
}
i = 0;
cycle++;
}

}

function display(x, y) {
trace('['+x+','+y+']');
}


getTiles(2,2)
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] sending simple messages between swf files

2007-06-17 Thread August Gresens

Hello

Simple, quick question

We are building a game that contains mini games. We want to create the
mini games as separate swf files to load into our main swf.

We need the mini game swfs to send a message to the main swf that it has
finished.


From reading the docs, one way to do this is by using the LocalConnection

method.

Is this the preferred method of doing this kind of thing? Or is there
another way?

Thanks,

August

--
-


August Gresens
Technical Director
Black Hammer Productions, NYC
[EMAIL PROTECTED]

-

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] sending simple messages between swf files

2007-06-17 Thread Andrei Thomaz

if your movies are loaded into your main.swf, the movies have access to
classes and _root variable. So, you can use singleton, and call static
methods of classes defined in your main.swf from your games.swf.

Maybe, you can also give a look at exclude.xml They prevent the code of
your classes of being duplicated in main.swf and games.swf.

http://www.google.com/search?hl=pt-BRq=exclude.xml+actionscript+classesbtnG=Pesquisarmeta=

[]'s
andrei


On 6/17/07, August Gresens [EMAIL PROTECTED] wrote:


Hello

Simple, quick question

We are building a game that contains mini games. We want to create the
mini games as separate swf files to load into our main swf.

We need the mini game swfs to send a message to the main swf that it has
finished.

From reading the docs, one way to do this is by using the LocalConnection
method.

Is this the preferred method of doing this kind of thing? Or is there
another way?

Thanks,

August

--
-


August Gresens
Technical Director
Black Hammer Productions, NYC
[EMAIL PROTECTED]

-

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] onRelease, onPress missing with attachmovie and DoubleClick class

2007-06-17 Thread Johnny Zen

Hi all

Forgive me, i'm learning here :)

If i use attachmovie to add a mc to he stage which has a doubleclick
class attached to the mc in the library, i cant use onRelease or
onPress.

If I remove the class, attachmovie works with onRelease etc

Why is this?

Is there a simple answer?


Kind regards


Johnny
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] flv problems, cpu usage

2007-06-17 Thread Chris Tague

Problem fixed...i was using some old html templates to display the swf in
the browser...when i used CS3 with the new AC_RunActiveContent.js it fixed
everything!

CPU usage is down to about 11% fantastic...now i have another problem about
the component not working if i export all my classes on a frame rather thatn
frame 1.

i'll write a new message for this.

c.



On 6/15/07, Latcho [EMAIL PROTECTED] wrote:


if you use on2vp6 codec with variable bitrate, big (dimension) videos
can eat a lot of cpu.
possible fixes:
-try  to encode with a lower variabillity rate if you can acces this
setting within your encoding program.
 - use static 1-pass bitrate.
- encoding with the older sorenson codec might free up your cpu
reserves too, at the cost of filesize and quality.

Good Luck,
Latcho


2lakes wrote:



 In firefox the CPU usage hovers around 60% which is acceptable, even
 though
 it still seems quite high, for videos of 320x280 pixels. In internet
 explorer though it is around 97% of the cpu and as a result the videos
 stutter.



 hi i have similar issues with firefox vs safari on some nested video's
 on my site.
 Safari seems to refresh to screen much more efficiently than FF.
 Also FF default cache size is  1 meg?!

 Good analysis, gives me some things to consider.



 cheers Ian
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] flvplayback export classes to another frame

2007-06-17 Thread Chris Tague

Hey guys,

Anyone worked otu how to export classes on a differnt frame of the timeline,
but still have the flvplayback component working?

thanks.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Searching for AS3 Link and exemples with flash

2007-06-17 Thread Laurent CUCHET
Morning

Searching for AS3 Link and exemples with flash

Thanks

Laurent
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Searching for AS3 Link and exemples with flash

2007-06-17 Thread Muzak
http://www.google.com/search?hl=enq=actionscript+3

- Original Message - 
From: Laurent CUCHET [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Sunday, June 17, 2007 6:36 PM
Subject: [Flashcoders]  Searching for AS3 Link and exemples with flash


 Morning

 Searching for AS3 Link and exemples with flash

 Thanks

 Laurent


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Mac full screen title bar

2007-06-17 Thread david hodgetts

Hello Tony,

yep, I think I saw this happen to me. It's a bit of pain because it  
only occurs on a subset of  macs which can make it difficult to spot.  
The following solution works for me, found it on a forum but I don't  
remember where, so unfortunately, I can't give credit where credit is  
due.



best regards

david hodgetts


-- start quote

make a 3 frame movie.
don't put anything in the first two frames except this actionscripting:
in frame 1, put fscommand(fullscreen, true);
in frame 2, put fscommand(fullscreen, false);
in frame 3, put fscommand(fullscreen, true);
and then continue on w/ the rest of your actionscripting in this  
frame and

on...
placing the three toggling fscommands all in the same frame did not  
seem to

provide enough time for flash to react.
i realize this is ugly w/ the flashing notfull/fullscreen. i hate  
writing code
and building files like this... but it does work. the flashing  
doesn't really

show up on a PC either, which is nice.

-- end quote



On 12 Jun 2007, at 17:15, Tony P wrote:


Hello all,

I have a strange problem with a fullscreen projector (Flash Player  
9) on Mac OS X. It works fine normally, but if the user has  
installed Flash Player 8 then it goes not-quite-fullscreen and  
displays a title bar for the window. Uninstalling, reinstalling 9  
and praying to the techno gods all don't work.


Anyone seen this, or have any ideas?

Cheers!

Tony Pollard
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Why 512?

2007-06-17 Thread sean
Someone asked me the other day, why the Sound class function
computeSpectrum()  returns specifically 512 floating point values.

I know it returns 256 values for the left and right channels and that each
value is a 32-bit floating point value of 4 bytes, but despite alot of
Googling, I could find no explanation as to why it's 512 values (rather
than 30 or 200,000). Maybe it's a audio specification, maybe it's a number
the Adobe Flash team decided arbitrarily was sufficient to represend the
sound frequencied.

Does any one posses this knowledge?

Flashcoder.net

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Why 512?

2007-06-17 Thread Glen Pike

It's quicker to do an FFT with a length that is a power of 2

Can't remember exactly why, but I think the algorithm keeps splitting 
the array into 2 for each iteration of the calculation...


Have a look on Google.



[EMAIL PROTECTED] wrote:

Someone asked me the other day, why the Sound class function
computeSpectrum()  returns specifically 512 floating point values.

I know it returns 256 values for the left and right channels and that each
value is a 32-bit floating point value of 4 bytes, but despite alot of
Googling, I could find no explanation as to why it's 512 values (rather
than 30 or 200,000). Maybe it's a audio specification, maybe it's a number
the Adobe Flash team decided arbitrarily was sufficient to represend the
sound frequencied.

Does any one posses this knowledge?

Flashcoder.net

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


  

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Why 512?

2007-06-17 Thread Glen Pike

Ha, found it...

   http://www.dspguide.com/ch12.htm

   It is a while since I read this, but it hurt trying understand it a 
few times, then I got it, then I promptly forgot about it because I was 
using public domain code...


   Glen

[EMAIL PROTECTED] wrote:

Someone asked me the other day, why the Sound class function
computeSpectrum()  returns specifically 512 floating point values.

I know it returns 256 values for the left and right channels and that each
value is a 32-bit floating point value of 4 bytes, but despite alot of
Googling, I could find no explanation as to why it's 512 values (rather
than 30 or 200,000). Maybe it's a audio specification, maybe it's a number
the Adobe Flash team decided arbitrarily was sufficient to represend the
sound frequencied.

Does any one posses this knowledge?

Flashcoder.net

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


  

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com