Re: [Flashcoders] AS3 Sound = wtf

2007-09-13 Thread Andreas Rønning
Nice defeatism Arul. My overall point was i'm shocked at the apparent community 
apathy regarding this topic, and thanks for confirming that apathy. If i can't 
rant to fellow developers, who can i rant to? I wanted a discussion on this, 
not an RTFM n00b wankfest.

Considering there is no AS3 sound book, should i not be surprised to find so 
little mention of a topic so important in a book supposedly covering the 
essentials of the language? 3 books on AS3 covering different topics all paying 
the same amount of attention to the topic is an eyebrow raiser. I wasn't 
expecting making things move to have a chapter on sound or anything. I wasn't 
expecting it and a book on design patterns having more information on sound 
than an Essential AS3 book though.

This isn't meant as a rail on Moock, but rather an open question: Does sound 
really matter that little?

- A

- Original Message -
From: Arul Prasad M L [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Wednesday, September 12, 2007 4:04:55 PM (GMT+0100) Europe/Berlin
Subject: Re: [Flashcoders] AS3 Sound = wtf

Why don't you:
1. List down your queries, and ask for suggestions / help from the community
here
2. Write to adobe's feature request list about the features you think are
missing, but essential
3. Stop ranting on the list, and go use ur personal blog for this crap.

Btw, Stop looking for detailed examples for sound APIs inside a design
patterns book or a 'Making things move' book.

~Arul Prasad.

On 9/12/07, Andreas Rønning [EMAIL PROTECTED] wrote:

 So i got my AS3 books finally. Essential AS3 by Moock, AS3
 animation/making things move and AS3 design patterns. Of these 3, none give
 particular interest in the sound API. Making things move takes a fleeting
 glance at AS3 sound, limited to a = new Sound(); a.play();, and Design
 Patterns makes an equally simple example.

 The AS3 docs (F1 in the IDE) suggests a hack of a class to encapsulate
 Sound handling and otherwise assures us that the AS3 api is powerful.

 I still fail to see why.

 When Andre Michelle makes an AS3 303 emulator we're all impressed, but we
 somehow fail to realize he made it with *hacks*. Advanced AS3 sound
 manipulation is effectively barred to those not of his calibre. For the
 rest of us, we're stuck waiting for someone to build a robust sound control
 API wrapper for AS3's frankensteinian mess. In my opinion, AS3 sound is only
 as strong as you're willing to take punishment. Things were rough in AS2,
 but we could work it. In AS3 it's equally rough, with added edges.

 Considering the *vast* improvements AS3 and the new VM gave us, i find it
 bewildering how something so core to the multimedia experience has been
 either ignored completely or thrown in as an afterthought. I'm told by peers
 that oh you know, Sound is weak in Flash. Like a dogma. Which makes me
 think engineers threw a roundtable to somehow assure that in their shiny new
 VM, Sound remained weak.

 I have never seen an AS topic so skirted. It's like a dark secret nobody
 really wants to discuss. Like pooping.

 Either people out there *don't care about sound* which blows my mind, or
 Adobe didn't give a shit. I'm trying to port my AS2 3d sound positioning and
 effects control library to AS3 and, right now, it's disillusioning and
 sometimes infuriating.

 Dual stop methods for streaming and preloaded audio, the contextually
 wrong of which doesn't generate exceptions, but sound glitches.
 Soundchannels allow for quick and easy orphaning of sound. Go orphans!
 Soundmixer only really stopping sound and giving an *incomplete* spectrum,
 ignoring Microphone.

 There's parts of AS3 that force us to get stricter, and this is fine. The
 sound library forces us to either wrap or get sloppy.
 So am i right about this? Do Flash developers really care this little
 about audio?

 Positive sides? Loading sound resources externally and SoundTransform. And
 still being able to actually play audio.

 I don't know of a fix for this beyond doing the sound API over with a
 little more consideration. But i'd love to hear some best practises and
 experiences from other developers. Anything to learn more about this
 POWERFUL NEW API. Yeah.

 - Andreas SJ
 ___
 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




-- 
Arul Prasad
http://arulprasad.blogspot.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] toString(aArray[i]) ?? does this work

2007-09-13 Thread Hal Leonard
You're right, of course. I wasn't thinking correctly. The MovieClip object
has a toString() method which should return the name of the MovieClip
Object. I guess I was specifically thinking about the v2 Components, which
return [object Object] unless you also include the ._name property. Sorry
for the confusion.

Hal 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andy Herrman
Sent: Wednesday, September 12, 2007 6:31 AM
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] toString(aArray[i]) ?? does this work

You say [object Object] is the correct output if the object is a
movie clip.  This isn't the behavior I see.  Any time I trace a movie
clip I get the clip's name (level0.foo.bar.whatever), not the generic
object results.

  -Andy

On 9/11/07, Hal Leonard [EMAIL PROTECTED] wrote:
 Try toString(aArray[i]._name) instead I'm not 100% sure what you're
 storing in your array, but it sounds like you're storing movieClip objects
 in there, in which case the result [object Object] would be the correct
 output.

 Hal

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 [EMAIL PROTECTED]
 Sent: Monday, September 10, 2007 8:30 PM
 To: Flash Coders
 Subject: [Flashcoders] toString(aArray[i]) ?? does this work


 Quick question, can I toString an array element.
 ie:   var  myStr:String  =  toString(aArray[i]);// where 'i' is the
 increment.

 I am having an issue with this.  when I trace myStr it traces [object
 object]
 instead of what I intended/expected mcMovieClipName14 as a string.

 Any insite would be appreciated.

 Thanks in advance,

 Paul V.
 ___
 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@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] increasing real memory use

2007-09-13 Thread Muzak
Get rid of the nested functions in loadNewImage()

Assign the enterframe event to a method of the class, using Delegate and make 
sure to keep a reference to the handler so it can be 
removed.
Make the class itself the MovieClipLoader listener, rather than creating a 
seperate listener.

// pseudo code
import mx.utils.Delegate;
class classes.Twee {

private var movieLoader:MovieClipLoader;
private var enterframeDelegate:Function;

function Twee()  {
movieLoader = new MovieClipLoader()
movieLoader.addListener(this);
enterframeDelegate = Delegate.create(this, this.enterframeHandler);
}

function loadNewImage() {
var image_p:MovieClip = root_p.attachMovie(void, image_mc, 0);
movieLoader.loadClip(2246.jpg, image_p)
}

function onLoadInit(target_mc:MovieClip) {
root_p.onEnterFrame = enterframeDelegate;
   }

function enterframeHandler() {
// do stuff...

//and eventually remove handler
root_p.onEnterFrame = null;
}
}

I'm not very fond (mildly put) of the usage of _root and the movieclip chaining 
going on.
I'd probably go for event dispatching from each class (Een, Twee, Drie) when 
they're done with whatever they're supposed to do, to 
which the Application listens. So the Application takes care of the chain, 
rather than each seperate class.

regards,
Muzak

- Original Message - 
From: Tom Huynen [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Wednesday, September 12, 2007 2:21 PM
Subject: [Flashcoders] increasing real memory use


 Hi list,

 I created a kioks application that needs to display data (text and images)
 24/7. The flash projector file however uses more and more real memory from
 the start on.
 I therefore created a simple version of it as can be seen in the code below.
 It contains four classes: Application.as, Een.as, Twee.as and Three.as.
 When this simplified version runs the task manager (windows) or activity
 monitor (mac) reveals a data leak even though I clear up vars and listeners.
 The code is pretty simple, still I can't find out for quite a while now what
 the problem can be.

 Regards,

 Tom


___
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] AS2 Sound.stop()

2007-09-13 Thread Andrew Sinning

Thanks Arul, and Ian.  This is very helpful!

___
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] AS2 Sound.stop()

2007-09-13 Thread eka
Hello :)

I use in my opensource framework a model to register all sounds in my
application and manipulate all sounds.

The SoundLibrary class :
http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/src/andromeda/media/SoundLibrary.as

See the example of the class :

import andromeda.events.SoundModelEvent ;
import andromeda.media.SoundLibrary ;
import vegas.events.Delegate ;

var debug:Function = function ( e:SoundModelEvent ):Void
{
   var type:String = e.getType() ;
   var id:String = e.getID() ;
   var library:SoundLibrary = SoundLibrary(e.getModel()) ;
   var sound:Sound = e.getSound() ;

   var message:String =   + library ;
   message +=   + type ;
   if (id != null)
   {
   message += , id: + id ;
   }
   if (sound != null)
   {
   message += , sound: + sound ;
   }
   trace( message ) ;
}

var lib:SoundLibrary = new SoundLibrary() ;
lib.addGlobalEventListener( new Delegate(this, debug) ) ;

lib.addSound( sound_1 ) ; // sound_1 is the link name of the sound
in the library
lib.addSound( sound_2 ) ;

// lib.addSounds( [sound_1, sound_2] ) ; // use this method to
register a array collection of sounds ids.

trace(  + lib +  size :  + lib.size()) ;

Key.addListener(this) ;

var onKeyDown:Function = function()
{
   var code:Number = Key.getCode() ;
   switch ( code )
   {
   case Key.UP :
   {
lib.getSound( sound_1 ).start() ;
break ;
   }
   case Key.DOWN :
   {
   lib.getSound( sound_2 ).start() ;
  break ;
   }
   case Key.SPACE :
   {
  lib.toggle() ; // enable/disable all sounds
  break ;
   }
}
}

trace( Press Key.SPACE to disable/enable the library.) ;
trace( Press Key.UP to start the sound_1 sound.) ;
trace( Press Key.DOWN to start the sound_2 sound.) ;


See the online documentation :

http://vegas.ekameleon.net/docs/andromeda/media/SoundLibrary.html

Page project : http://code.google.com/p/vegas/
Install VEGAS with this SVN repository in osFlash :
http://code.google.com/p/vegas/wiki/InstallVEGASwithSVN

EKA+ :)

2007/9/12, Ian Thomas [EMAIL PROTECTED]:

 Each Sound() object is attached to a particular timeline.

 So if you do :

 (new Sound(_root)).stop()

 everything from _root downwards should stop.

 HTH,
Ian

 On 9/11/07, Andrew Sinning [EMAIL PROTECTED] wrote:
 
  I don't understand the docs for the AS2 Sound.stop command.
 
   my_sound.stop([idName:String]) : Void
 
  I can't find any documentation about sounds having an idName.
 
  Method; stops all sounds currently playing if no parameter is
  specified, or just the sound specified in the idName parameter.
 
  But my_sound is an instance of the Sound class, so why would I need to
  specify an id?  This seem to imply that I could use
 
  Sound.stop();
 
  to stop all sounds currently playing.  But it won't compile.  I get
  Sound has no static field stop.
 
  So, how do you stop all currently playing sounds?
 
  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@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] Reliable way to split a string into an array of lines?

2007-09-13 Thread Andy Herrman
The fastest (execution, not writing) way would probably be to do your
own loop over the string and find all the positions of line breaks
(either \r or \n) and use just use substring to pull out the
individual lines.

If you do end up trying RegExes I'd be very interested in how you do
it.  The only regex library I've found for AS2 doesn't compile with
MTASC (looking at the code I don't know why anything would compile
it), which is causing me significant annoyance.  If you find one that
works with MTASC I'd love to know about it. :)

  -Andy

On 9/12/07, Danny Kodicek [EMAIL PROTECTED] wrote:
 I'm looking for a simple, reliable method for splitting a string into its
 constituent lines (at the hard line breaks - this isn't a text wrapping
 thing). The problem is that line breaks could be Chr(10) or Chr(13), or
 indeed both. I've done this:
 myArr =
 myStr.split(String.fromCharCode(10)).join(String.fromCharCode(13)).split(Str
 ing.fromCharCode(13))

 I'm guessing I'm better off going the RegEx route, but I was wondering if
 there's a quicker, simpler way.

 Danny

 ___
 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] Traversing through Object goes backwards

2007-09-13 Thread Mendelsohn, Michael
Thanks for the response Andy.  I just ended up doing this:


public function reverseObject(objToReverse:Object):Object {
// reverses the object again after built, meaning it's now in
the right order
var alteredObj:Object = new Object();
for (var i in objToReverse) {
alteredObj[i] = objToReverse[i];
}
return alteredObj;
}






 Objects work pretty much like hashtables (from my understanding).
Hashtables generally don't guarantee any kind of ordering.  Flash may
enforce some kind of ordering (y seems to be going in reverse order of
when things were added) but I don't know of any ordering and generally
treat it as arbitrary.

Now, if you were using Arrays then your ordering would be guaranteed
(for-in loops go backwards through the array I believe).
___
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] Text Editor Undo/Redo Stack

2007-09-13 Thread Paul Venton
Apparently that works in IE 5 and 6.  IE 7 and Firefox throws an alert
requesting permission for clipboard access; who'd what a website accessing
the clipboard without permission?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of James
Marsden
Sent: 12 September 2007 11:46
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] Text Editor Undo/Redo Stack

skillz, thanks :)



Muzak wrote:
 Use javascript:

 //HTML
 script language=javascript

  function getClipBoardText() {
   var t = window.clipboardData.getData(TEXT);
   return t;
  }

 /script

   

___
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] Isometic game - zdepth managing for multiple movablecharacters

2007-09-13 Thread Joshua Sera
kirupa.com has a ton of tutorials on Isometric stuff
that I've found very useful.

http://www.kirupa.com/developer/flash/index.htm#Isometry


--- Jobe Makar [EMAIL PROTECTED] wrote:

 Hi Jiri,
 
 I've pasted below the isometric class that I wrote
 for one of my game books. 
 It is a handy class that allows for easy translation
 between screen coords, 
 and iso coords. In addition, it handles tile-based
 dept calculations as 
 well. You asked how do you handle multiple per tile
 - check out the leeway 
 variable in this class. If leeway is set to 5, and
 calculateDepth returns 
 1230, then you can place your item anywhere from
 1230 to 1235. You just have 
 to keep track of which depth is being used.
 
 You don't have to swap depths of every item every
 frame. You just have to 
 swap depths on any items that has just changed
 tiles.
 
 There are two limitations with this technique:
 1) It does the depth calculations based on the size
 of the map. For most 
 uses this is fine. But if your map is like 5000 X
 5000 tiles, then this 
 depth calculation can probably quickly get too high
 for Flash to handle 
 without further modifications.
 2) A sortable item needs to be no bigger than a
 tile. If the base of this 
 item takes up multiple tiles (like a couch, or
 bench, etc) then you need to 
 either slice it up into tile-sized pieces, or change
 the depth approach. The 
 approach that you use if you are not slicing it up
 does require resorting 
 lots of item depths frequently rather than using
 just using unique depths 
 per tile.
 
 //Isometric CLASS
 
 class com.electrotank.world.Isometric {
  private var maxx:Number;
  private var maxz:Number;
  private var theta:Number;
  private var alpha:Number;
  private var sinTheta:Number;
  private var cosTheta:Number;
  private var sinAlpha:Number;
  private var cosAlpha:Number;
  var leeway:Number;
  public function Isometric(x:Number, z:Number) {
   maxx = x;
   maxz = z;
   theta = 30;
   alpha = 45;
   theta *= Math.PI/180;
   alpha *= Math.PI/180;
   sinTheta = Math.sin(theta);
   cosTheta = Math.cos(theta);
   sinAlpha = Math.sin(alpha);
   cosAlpha = Math.cos(alpha);
   leeway = 5;
  }
  public function mapToScreen(xpp:Number, ypp:Number,
 zpp:Number):Array {
   var yp:Number = ypp;
   var xp:Number = xpp*cosAlpha+zpp*sinAlpha;
   var zp:Number = zpp*cosAlpha-xpp*sinAlpha;
   var x:Number = xp;
   var y:Number = yp*cosTheta-zp*sinTheta;
   return [x, y];
  }
  public function mapToIsoWorld(screenX:Number,
 screenY:Number):Array {
   var z:Number = 

(screenX/cosAlpha-screenY/(sinAlpha*sinTheta))*(1/(cosAlpha/sinAlpha+sinAlpha/cosAlpha));
   var x:Number = (1/cosAlpha)*(screenX-z*sinAlpha);
   return [x, z];
  }
  public function setLeeway(value:Number) {
   leeway = value;
  }
  public function calculateDepth(x:Number, y:Number,
 z:Number):Number {
   var x:Number = Math.abs(x)*leeway;
   var y:Number = Math.abs(y);
   var z:Number = Math.abs(z)*leeway;
   var a:Number = maxx;
   var b:Number = maxz;
   var floor:Number = a*(b-1)+x;
   var depth:Number = a*(z-1)+x+floor*y;
   return depth;
  }
 }
 
 
 Jobe Makar
 http://www.electrotank.com
 http://www.electro-server.com
 phone: 252-627-8026
 mobile: 919-609-0408
 fax: 919-882-1121
 - Original Message - 
 From: Jiri Heitlager
 [EMAIL PROTECTED]
 To: flashcoders@chattyfig.figleaf.com
 Sent: Tuesday, September 11, 2007 8:50 AM
 Subject: [Flashcoders] Isometic game - zdepth
 managing for multiple 
 movablecharacters
 
 
  He guys (and maybe girls),
 
  I have a question that is related to z-depth
 managing in an isometric 
  game, that needs to be made in AS2.
  In the game I basically use one abstract layer
 that holds all the tiles 
  and their information wheter or not a movable
 object is allowed to 'walk' 
  over the tile. Then there is another layer that
 holds all the objects, so 
  that includes a player, a computer controlled
 player and enviormental 
  objects that players cannot walk through being the
 visualization of the 
  first layer.
  Every object gets a z-depth assigned. For the
 players the zdpeth need to 
  be set based on the tile they are at. This way the
 players can walk 
  'around' the enviorment objects. For the z-depth
 calculation I use the 
  tile grid x and y plus the width of the row, this
 generates an unique 
  z-depth number and makes sure that the higher the
 y, the bigger the 
  z-depth , thus objects appear infront of objects
 with a lower y index.
  Here is the problem I am trying to figure out. If
 two movable objects, or 
  even three of them are at the same time on the
 same tile, then the above 
  described z-depth managing will fail. How do I
 deal with that?
 
  Then another question I have is this. Does every
 movable object needs to 
  check/swap z-depth on every frame. Wouldn't that
 be to CPU intensive?
 
  I really hope someone can clear this up for me.
 
  thank you in advance,
 
  Jiri
  ___
  

RE: [Flashcoders] Multilingual video with Flash

2007-09-13 Thread Norman Cousineau
I've used separate audio / video once and had syncing problems.  To correct it, 
I set the video time to match the audio time at a fixed interval.  It was a 
talking head type video, and the results were satisfactory, although there's a 
little jump in the video sometimes.

-Original Message-
From: Volker Scarpatetti - Advertis Interactiva
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 12, 2007 4:27 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Multilingual video with Flash


Hi,

What would be the best way to a flash video project with multilingual audio?

- A copy of the video for each language (means several video files) ?
or
- One video and different audiotraks ?

As I am not streaming from a server but from a CD, I have a limited space
condition. The video is about 5 minutes long, and I remeber, in earlier
versions, separated audio didn´t syncronize to good in longer videos.

Any suggestions ? Thanks !

-- 
Volker Scarpatetti
Dirección Interactiva - Advertis Interactiva




___
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] Traversing through Object goes backwards

2007-09-13 Thread eka
Hello :)

Use my framework and this ADT package based on the JAVA collections
framework :

The Map and the SortedArrayMap tutorial :

http://code.google.com/p/vegas/wiki/VegasTutorials_collection_map

My SortedArrayMap can help you :)

You can use my vegas.data package in AS2/AS3 and SSAS :)

Page project :
http://code.google.com/p/vegas/

Installation :
http://code.google.com/p/vegas/wiki/InstallVEGASwithSVN

EKA+ :)



2007/9/12, Andy Herrman [EMAIL PROTECTED]:

 Objects work pretty much like hashtables (from my understanding).
 Hashtables generally don't guarantee any kind of ordering.  Flash may
 enforce some kind of ordering (y seems to be going in reverse order of
 when things were added) but I don't know of any ordering and generally
 treat it as arbitrary.

 Now, if you were using Arrays then your ordering would be guaranteed
 (for-in loops go backwards through the array I believe).

   -Andy

 On 9/11/07, Mendelsohn, Michael [EMAIL PROTECTED] wrote:
  Hi list...
 
  I want object y, below, to output in the same order as x.  Is it
  possible?
 
  Thanks,
  - Michael M.
 
  x = {a:first, b:second, c:third};
  for (i in x) {
 trace(i + :  + x[i]);
  }
  /*
  output:
  a: first
  b: second
  c: third
  */
 
 
  y = new Object();
  y[a] = first;
  y[b] = second;
  y[c] = third;
  for (i in y) {
 trace(i + :  + y[i]);
  }
  /*
  output:
  c: third
  b: second
  a: first
  */
  ___
  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] exit screen button script

2007-09-13 Thread Eric Walton
Hello all,

Quick and albeit silly question.

I have a presentation and I am building it for both online and an autorun cd
in fullscreen. My question is what AS should I put on the button so it will
do both functions.
Here is something I found.

on (release) {
getURL('javascript:closeWin()');
}

What do I add to the above?

Thnx,

Edub9
www.HollywoodFineART.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] Help with listener for custom class (AS3)

2007-09-13 Thread Rob Romanek

Hi Dane,

Here are some thoughts for you to try. First off since you are not  
actually working with a display object you don't need this class to extend  
sprite. The easiest way to give the class the ability to send out events  
is to have it extend EventDispatcher and then you can have it dispatch  
events as required...  here is you sample pared down a bit, just dealing  
with xml


package {
import flash.events.*;
import flash.net.*;
public class fileImports extends EventDispatcher {
public var newStyleSheet:StyleSheet = new StyleSheet();
public var newXML:XML = new XML();
public function fileImports(xmlFile:String):void {
var xmlToLoad:URLRequest=new URLRequest(xmlFile);
var xmlLoader:URLLoader = new URLLoader;

xmlLoader.load(xmlToLoad);
//event listeners
xmlLoader.addEventListener(Event.COMPLETE,xmlLoaded);

}

public function xmlLoaded(event:Event):void {
newXML = XML(event.target.data);
dispatchEvent(new Event(Event.COMPLETE));
}
}
}

then in the movie calling the class

var tFile = new fileImports(data/xml/presenter1.xml);
tFile.addEventListener(Event.COMPLETE, xmlDone);
function xmlDone(e:Event){
trace(done);
}

hth,

Rob

On Tue, 11 Sep 2007 15:25:05 -0400, Dane Williams [EMAIL PROTECTED]  
wrote:



My problem is I don't know how to listen to the class
from the main timeline to find out if the class is finished processing  
the
XML. Right now if I try to use fileForThis.newXML I get a value of  
null.
But if I put a trace on newXML in the class, it shows the content of my  
XML

file.
I have gotten this to work on other projects because I haven't tried to  
use

the data immediately - so the data has time to process before it's put
into a text field, etc.
I appreciate any help I can get on this. Thanks!

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___
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] Google Maps or Yahoo maps

2007-09-13 Thread Cédric PASCAL
Hi everybody,
i have a choice very important,
i have to use map and interact with them (put a flag and see the nearest
flag for exemple, search the road or the distance between two flag).
I have to work in flex and i would like your point of view, its better to
use google map or yahoo maps in flex ?

I think flex and AS API of yahoo are better for the moment but i need senior
programmers point of view please.

Thanks !

-- 
PASCAL Cédric
IT french student

PS : if someone have another solution he could propose it , and some
examples too !
I'am not an expert in fact ;)
___
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] Reliable way to split a string into an array of lines?

2007-09-13 Thread keith

If you have the libertry to go the RegExp, it's much easier.
(Put everything you consider a linebreak in the brackets with [\r\n\f\v]

var lines:Array=myStr.replace(/[\r\n\f\v]/mig,\n).split(\n);
trace(lines.length.toString());

Don't know if that's what you was talking about.
-- Keith H --


Danny Kodicek wrote:

I'm looking for a simple, reliable method for splitting a string into its
constituent lines (at the hard line breaks - this isn't a text wrapping
thing). The problem is that line breaks could be Chr(10) or Chr(13), or
indeed both. I've done this: 
myArr =

myStr.split(String.fromCharCode(10)).join(String.fromCharCode(13)).split(Str
ing.fromCharCode(13))

I'm guessing I'm better off going the RegEx route, but I was wondering if
there's a quicker, simpler way.

Danny

___
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] Isometic game - zdepth managing for multiple movablecharacters

2007-09-13 Thread Jiri Heitlager
First off, thanks that you people took the time to help me out and thank 
you Jobe for sending me your class. I appreciate that, but would really 
like to program the game myself from scratch to get a full understanding 
on how games like this are made.


I am reading all the replies and trying to see if I am understand them 
correctly.
Basically I have two options. Give every movable object the depth of the 
screen _y value and make sure that objects can never be on the same _y 
position.
Second option.  If the movable objects only move one tile at a time, 
meaning that their screen _y position could sometimes be the same, I 
need to assign for every tile a range of n numbers of depth that can be 
taken. Then check for an available depth within each tiles indivudual 
range of depth , when a movable objects is on a tile.


@Danny, could please explain your comment on subsorting a bit more. I am 
not quit sure if I understand it.


 However, you can optimise quite a bit
 by sub-sorting - if you know that object 1 is in the rear 16 tiles and
 object 2 is in the front 16 tiles, no need to check the z-order.

Jiri

Danny Kodicek wrote:
Every object gets a z-depth assigned. For the players the 
zdpeth need to be set based on the tile they are at. This way 
the players can walk 'around' the enviorment objects. For the 
z-depth calculation I use the tile grid x and y plus the 
width of the row, this generates an unique z-depth number and 
makes sure that the higher the y, the bigger the z-depth , 
thus objects appear infront of objects with a lower y index.
Here is the problem I am trying to figure out. If two movable 
objects, or even three of them are at the same time on the 
same tile, then the above described z-depth managing will 
fail. How do I deal with that?


If this is possible in your game then you'll need to either store sub-tile
positions and z-sort further on those (you could, for example, assign ten
z-slots per tile to ensure that you have more space) or randomly choose one
to be in front of the other (if there's only one position per tile, then it
doesn't matter which one gets drawn in front).

Then another question I have is this. Does every movable 
object needs to check/swap z-depth on every frame. Wouldn't 
that be to CPU intensive?


Depends how you do it. If there's only a few movable objects, this shouldn't
be particularly hard on the machine - Flash isn't the fastest thing in the
world, but it's fast enough for that. However, you can optimise quite a bit
by sub-sorting - if you know that object 1 is in the rear 16 tiles and
object 2 is in the front 16 tiles, no need to check the z-order.

Danny

___
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] fileReference and proxy

2007-09-13 Thread Snaijer, Paul de
Hi all,
 
I have a problem with the fileReference class and the proxy. The situation is a 
Flash movie in which you can select files and upload them to the server via the 
fileReference.upload() method. On the server the upload() method calls a 
Coldfusion file which handles the upload to the correct folder. Access to the 
internet goes throu a proxy. After clicking the button to fire the 
fileReference.upload() method, Flash returns a 407 error (proxy authentication 
error). This error only shows up on a Mac - Firefox combination! On a Windows - 
Firefox combination you get a prompt to fill in your proxy username and 
password. Not perfect but the upload works.
 
Is there a way to solve this problem? A search on the net shows a lot questions 
like this, but no answers...
 
Thanx allready!!
 
Best regards,
Paul de Snaijer


This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.
___
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] Isometic game - zdepth managing for multiple movablecharacters

2007-09-13 Thread Jiri Heitlager
Thanks Joshua, I allready went through some of their stuff. I posted 
exactly those things that weren't adressed in the articles I wrote on 
Kirupa.


J

Joshua Sera wrote:

kirupa.com has a ton of tutorials on Isometric stuff
that I've found very useful.

http://www.kirupa.com/developer/flash/index.htm#Isometry


--- Jobe Makar [EMAIL PROTECTED] wrote:


Hi Jiri,

I've pasted below the isometric class that I wrote
for one of my game books. 
It is a handy class that allows for easy translation
between screen coords, 
and iso coords. In addition, it handles tile-based
dept calculations as 
well. You asked how do you handle multiple per tile
- check out the leeway 
variable in this class. If leeway is set to 5, and
calculateDepth returns 
1230, then you can place your item anywhere from
1230 to 1235. You just have 
to keep track of which depth is being used.


You don't have to swap depths of every item every
frame. You just have to 
swap depths on any items that has just changed

tiles.

There are two limitations with this technique:
1) It does the depth calculations based on the size
of the map. For most 
uses this is fine. But if your map is like 5000 X
5000 tiles, then this 
depth calculation can probably quickly get too high
for Flash to handle 
without further modifications.

2) A sortable item needs to be no bigger than a
tile. If the base of this 
item takes up multiple tiles (like a couch, or
bench, etc) then you need to 
either slice it up into tile-sized pieces, or change
the depth approach. The 
approach that you use if you are not slicing it up
does require resorting 
lots of item depths frequently rather than using
just using unique depths 
per tile.


//Isometric CLASS

class com.electrotank.world.Isometric {
 private var maxx:Number;
 private var maxz:Number;
 private var theta:Number;
 private var alpha:Number;
 private var sinTheta:Number;
 private var cosTheta:Number;
 private var sinAlpha:Number;
 private var cosAlpha:Number;
 var leeway:Number;
 public function Isometric(x:Number, z:Number) {
  maxx = x;
  maxz = z;
  theta = 30;
  alpha = 45;
  theta *= Math.PI/180;
  alpha *= Math.PI/180;
  sinTheta = Math.sin(theta);
  cosTheta = Math.cos(theta);
  sinAlpha = Math.sin(alpha);
  cosAlpha = Math.cos(alpha);
  leeway = 5;
 }
 public function mapToScreen(xpp:Number, ypp:Number,
zpp:Number):Array {
  var yp:Number = ypp;
  var xp:Number = xpp*cosAlpha+zpp*sinAlpha;
  var zp:Number = zpp*cosAlpha-xpp*sinAlpha;
  var x:Number = xp;
  var y:Number = yp*cosTheta-zp*sinTheta;
  return [x, y];
 }
 public function mapToIsoWorld(screenX:Number,
screenY:Number):Array {
  var z:Number = 


(screenX/cosAlpha-screenY/(sinAlpha*sinTheta))*(1/(cosAlpha/sinAlpha+sinAlpha/cosAlpha));

  var x:Number = (1/cosAlpha)*(screenX-z*sinAlpha);
  return [x, z];
 }
 public function setLeeway(value:Number) {
  leeway = value;
 }
 public function calculateDepth(x:Number, y:Number,
z:Number):Number {
  var x:Number = Math.abs(x)*leeway;
  var y:Number = Math.abs(y);
  var z:Number = Math.abs(z)*leeway;
  var a:Number = maxx;
  var b:Number = maxz;
  var floor:Number = a*(b-1)+x;
  var depth:Number = a*(z-1)+x+floor*y;
  return depth;
 }
}


Jobe Makar
http://www.electrotank.com
http://www.electro-server.com
phone: 252-627-8026
mobile: 919-609-0408
fax: 919-882-1121
- Original Message - 
From: Jiri Heitlager

[EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Tuesday, September 11, 2007 8:50 AM
Subject: [Flashcoders] Isometic game - zdepth
managing for multiple 
movablecharacters




He guys (and maybe girls),

I have a question that is related to z-depth
managing in an isometric 

game, that needs to be made in AS2.
In the game I basically use one abstract layer
that holds all the tiles 

and their information wheter or not a movable
object is allowed to 'walk' 

over the tile. Then there is another layer that
holds all the objects, so 

that includes a player, a computer controlled
player and enviormental 

objects that players cannot walk through being the
visualization of the 

first layer.
Every object gets a z-depth assigned. For the
players the zdpeth need to 

be set based on the tile they are at. This way the
players can walk 

'around' the enviorment objects. For the z-depth
calculation I use the 

tile grid x and y plus the width of the row, this
generates an unique 

z-depth number and makes sure that the higher the
y, the bigger the 

z-depth , thus objects appear infront of objects

with a lower y index.

Here is the problem I am trying to figure out. If
two movable objects, or 

even three of them are at the same time on the
same tile, then the above 

described z-depth managing will fail. How do I

deal with that?

Then another question I have is this. Does every
movable object needs to 

check/swap z-depth on every frame. Wouldn't that

be to CPU intensive?

I really hope someone can clear this up for me.

thank you in advance,

Jiri
___

[Flashcoders] Sending file from Flash to server

2007-09-13 Thread Alen Balja
Is it possible to load the jpg, mp3 or flv from X server, then save it back
to the server that delivered the swf?

Thanks

Alen
___
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] AS3 Sound = wtf

2007-09-13 Thread Andreas Rønning
I didn't mean hacking was wrong by any stretch, but i am not a hacker. I 
simply don't have the time / budget to get in-depth on that level. Imagine what 
these hacker types (Andrè Michelle in particular) could do if the API natively 
supported the things they now hack to do? I don't really think the things 
Michelle does is special in terms of audio programming, but it IS special in 
a Flash context because of how limited the API is. It's a moan about how truly 
awesome Flash audio could've been with some direct way to affect audio and an 
orderly way to manage it i suppose?

I'll write up a feature request myself. Good to hear more people want the same 
:)

- A

- Original Message -
From: Glen Pike [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Wednesday, September 12, 2007 10:16:03 PM (GMT+0100) Europe/Berlin
Subject: Re: [Flashcoders] AS3 Sound = wtf


 When Andre Michelle makes an AS3 303 emulator we're all impressed, but we 
 somehow fail to realize he made it with *hacks*. Advanced AS3 sound 
 manipulation is effectively barred to those not of his calibre. For the rest 
 of us, we're stuck waiting for someone to build a robust sound control API 
 wrapper for AS3's frankensteinian mess. In my opinion, AS3 sound is only as 
 strong as you're willing to take punishment. Things were rough in AS2, but we 
 could work it. In AS3 it's equally rough, with added edges. 


   
What's wrong with hacking? 

Someone has released an AIR app that allows you to mix sound:
http://www.digimix.com/

Rockstar produced the Beaterator which uses server side to compile 
audio, but be warned this was the only flash app ever to blue screen my 
PC...
http://www.beaterator.com/beaterator.html

Brighton Flashcoders have released a nice synthesizer that uses hacks 
http://www.flashbrighton.org/wordpress/?p=9

They also give you the classes to do your own stuff.

It is frustrating that Flash AS2 gave us 2 dimensional filters, but 
nothing to manipulate 1 dimensional sounds.  I have added my plea to the 
feature list for more sound stuff - you should too.  
http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

I would dearly like to see some audio manipulation stuff in the Flash 
Player, but one possible reason for this could be licensing issues with 
mp3 - because of software patenting (another can of worms...) I have 
seen free mp3 codecs get stuffed by the patent holders.  I would not be 
surprised if FP restricted by this, but I am merely hypothesising...

Anyway, without hacking, we would not have some of the more interesting 
stuff that happens today like 3D, crazy audio, video, mashups and some 
of the amazing stuff that people are doing.  I often wish I was half as 
good as some of the guys on this list, but I am not going to sit around 
and wait for an official audio API, it probably won't be half as much 
fun as the stuff happening now, so get your overalls on and get your 
hands dirty.

Glen
___
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] Flash 9 Not importing fl.data.DataProvider.

2007-09-13 Thread aaron smith
UH, not sure why this is happening. But when I create an empty fla, and put
this one line of code in it: import fl.data.DataProvider.

I get errors:
1172: Definition fl.data:DataProvider could not be found.
___
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] How to override or change functions in MovieclipLoader

2007-09-13 Thread julian atienza
Hello. Excuse my english again (i'm spanish).

I have to obfuscate in any way some jpg's in my standalone flash
application to avoid that users could get jpg of the directory i read
it with moviecliploader and use it out of the application.

1) Images are sliced - first method for make harder the copy of
images. They will find slices in directory of images
2) Extension of images - instead of .jpeg or .jpg, they are called
.xxx Flash will read it fine thanks to it read header of file to know
what kind of file it is.

And i want to make the third

3) Changing any byte of header in jpeg will make it unreadable for
photoshop or any application. Take a look at:
http://www.obrador.com/essentialjpeg/HeaderInfo.htm

F.e. if i change the first FF by 00 , will make this effect. But of
course, flash and actionscript will have the same problem.

How can i override MovieclipLoader or any class of flash in the time
it reads header to change on the fly this byte by the correct and read
image without problems?

if it isn't possible...
Can i use one kind of byteLoader that gives bytes to movieclip
loader changing this one?

if it isn't possible
Any idea?

thanks so much in advance!
___
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] OT Mail delivery options

2007-09-13 Thread Dave Burnett


Hi all;

Yesterday I set my mail delivery to disabled in the Options section.
That was yesterday.
Still getting mail.

Am I missing something obvious?

Regards,

Dave

_
Gear up for Halo® 3 with free downloads and an exclusive offer. 
http://gethalo3gear.com?ocid=SeptemberWLHalo3_MSNHMTxt_1


___
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] Isometic game - zdepth managing formultiple movablecharacters

2007-09-13 Thread Danny Kodicek
  I am reading all the replies and trying to see if I am 
 understand them correctly.
 Basically I have two options. Give every movable object the 
 depth of the screen _y value and make sure that objects can 
 never be on the same _y position.
 Second option.  If the movable objects only move one tile at 
 a time, meaning that their screen _y position could sometimes 
 be the same, I need to assign for every tile a range of n 
 numbers of depth that can be taken. Then check for an 
 available depth within each tiles indivudual range of depth , 
 when a movable objects is on a tile.
 
 @Danny, could please explain your comment on subsorting a bit 
 more. I am not quit sure if I understand it.
 
   However, you can optimise quite a bit   by sub-sorting - 
 if you know that object 1 is in the rear 16 tiles and   
 object 2 is in the front 16 tiles, no need to check the z-order.

The best thing would be to look up binary sorting trees, quadtrees and so on
(a quick search on Wikipedia should take you to most of the interesting
stuff. Essentially, the trick is an extension of what I was describing
before: if you know which tile each object is on, then you can sort first by
tile, then by sub-tile position. In the same way, you can divide your tiles
into groups (usually you'd use a quadtree for this, it's probably the most
efficient in this instance) and keep track of which tile group each object
is on. If they haven't changed groups, you only need to sort within their
current group. 

The logic should be fairly clear - getting it efficient is a little more
complicated, but you should be able to find examples. Whether it's necessary
in your case, I can't say. As a general rule, I find these things are less
useful than they seem - in the most complicated case, you always have to
perform all your checks anyway, so your efficient calculation is going to
break down (especially as you've added a big pre-calculation step drilling
down through your search tree). If you're relying on your optimizations to
keep the game running at speed, it's going to slow down when you hit the
most difficult cases.

Danny

___
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] flash contact form backend

2007-09-13 Thread robert nikolic
I have a flash contact form, and I'm struggling to implement a proper 
backend code to be able to send it to an email recipient.


Could anyone help with an example, many thanks,
Robert

_
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


___
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] What would cause this...

2007-09-13 Thread Andy Herrman
Just as a sanity check, are you sure your handlers for those other
events are set up properly?  Could you post the code?  It might be
easier to tell what's wrong if we can see it.

  -Andy

On 9/12/07, Max Kaufmann [EMAIL PROTECTED] wrote:
 I'm downloading a SWF using the Loader class.  It dispatches open and
 progress events, and gets to a point where the bytesTotal == bytesLoaded,
 however it never actually gets gets the content and it never dispatches
 complete, init, or any of the error events.

 Anyone else encountered this problem?

 max


 ___
 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] Weirdo Bugs : css background repeat makes swf textinput bug

2007-09-13 Thread Flap Flap
Hi there,

I just come to a tricky issue on a full flash website I'm working on :

All my textInput gets buggy (when you input numbers they take letters with
accents instaed of the numbers you typed).
After some research I jsut found that the only difference with the buggy and
the working site was that in the html page that embed the swf (using
swfobject), a background repeated image have been added...
And comment the line have make all input works fine !

Very nasty and strange bug isn't it ! Any idea on the how and how-to-fix
this ?

Thanks

-- 
Benoît Milgram / Flapflap
http://www.kilooctet.net

I'm also a music mashup / bootlegs producer :
http://www.djgaston.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] Google Maps or Yahoo maps

2007-09-13 Thread Randy Troppmann
Hello,

I have little experience with the Google API but AFAIK the API is
strickly AJAX based. Yahoo! maps on the other hand, has an AS2 based
component that you can hack and extend in Flash. They do not have an
AS3 based component at this time but released an AS3 communication
kit that facilitates direct API calls within Flex to the AS2 map
though ExternalInterface. Google is the leader with maps. But IMHO
Flash/flex is a better performer when layering interactivity on a map
and a better development platform.

Randy Troppmann
http://www.runningmap.com

On 9/12/07, Cédric PASCAL [EMAIL PROTECTED] wrote:
 Hi everybody,
 i have a choice very important,
 i have to use map and interact with them (put a flag and see the nearest
 flag for exemple, search the road or the distance between two flag).
 I have to work in flex and i would like your point of view, its better to
 use google map or yahoo maps in flex ?

 I think flex and AS API of yahoo are better for the moment but i need senior
 programmers point of view please.

 Thanks !

 --
 PASCAL Cédric
 IT french student

 PS : if someone have another solution he could propose it , and some
 examples too !
 I'am not an expert in fact ;)
 ___
 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] AS3 TextFields with filters - game performance?

2007-09-13 Thread Dimitrios Bendilas
Hello,

I was wondering if any of you have any feedback to share concerning the 
extensive use
of textfields with filters in games made with Flash 9 and ActionScript 3.

We are developing a desktop casual game, let's say of the scale of Diner Dash 
(http://www.playfirst.com/game/dinerdashfloonthego).
I am building a new Game Framework in AS3, Flash 9 and I was thinking of using
the native TextField objects for displaying text of all kind.

I want to use textfields with embeded fonts and various styles like Glow and 
DropShadow
at will. The game will have text displayed on game panels, score, animated 
score,
game messages and everything a middle-scale game contains.

My major concern is performance, because of the use of filters. By the way, I 
want to use
the filters so that I won't have to make a new Raster Font Engine in Flash 
(I've already done
one for AS2.0)

Any insight would be great.

Thanks,

Dimitrios
___
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] AS2 Sound.stop()

2007-09-13 Thread Keith Reinfeld
Hi Andrew, 
 
 So, how do you stop all currently playing sounds? 
 
If that is literally what you want to do, have you looked at the global
function stopAllSounds()? 
 
Regards, 
 
-Keith 
http://keithreinfeld.home.comcast.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] flash contact form backend

2007-09-13 Thread gerry
PHP or CGI?

-Gerry

 I have a flash contact form, and I'm struggling to implement a proper
 backend code to be able to send it to an email recipient.

 Could anyone help with an example, many thanks,
 Robert

 _
 Express yourself instantly with MSN Messenger! Download today it's FREE!
 http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

 ___
 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] What would cause this...

2007-09-13 Thread Dino Gravato
if this was AS2.. i would suggest appending a 'PreventCache=
Math.random(1000)' in the swf address as init won't fire cause of
browser cache issues.
but i am not too sure if issues like this were cleared in AS3 now

-Dino

On 9/13/07, Andy Herrman [EMAIL PROTECTED] wrote:
 Just as a sanity check, are you sure your handlers for those other
 events are set up properly?  Could you post the code?  It might be
 easier to tell what's wrong if we can see it.

   -Andy

 On 9/12/07, Max Kaufmann [EMAIL PROTECTED] wrote:
  I'm downloading a SWF using the Loader class.  It dispatches open and
  progress events, and gets to a point where the bytesTotal == bytesLoaded,
  however it never actually gets gets the content and it never dispatches
  complete, init, or any of the error events.
 
  Anyone else encountered this problem?
 
  max
 
 
  ___
  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


RE: [Flashcoders] flash contact form backend

2007-09-13 Thread Sunil Jolly
Hi Robert,

You'll need to post your form data to a URL which contains a script
which will grab the posted variables and then will email out the
information.

If you're using PHP it's quite simple and there are lots of scripts.
This is the first Google result for php emailer. I haven't tried it
but it sounds like what you need.
http://www.bellonline.co.uk/web-services/free/scripts/php-mailer-script/

Your server will need to be configured to send out emails, but I believe
this is a pretty basic function that most should have enabled.

Hope that helps.

Sunil

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of robert
nikolic
Sent: 13 September 2007 14:01
To: Flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] flash contact form backend

I have a flash contact form, and I'm struggling to implement a proper 
backend code to be able to send it to an email recipient.

Could anyone help with an example, many thanks,
Robert

___
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] flash contact form backend

2007-09-13 Thread eric e. dolecki
http://www.kirupa.com/developer/actionscript/flash_php_email.htm


On 9/13/07, robert nikolic [EMAIL PROTECTED] wrote:

 I have a flash contact form, and I'm struggling to implement a proper
 backend code to be able to send it to an email recipient.

 Could anyone help with an example, many thanks,
 Robert

 _
 Express yourself instantly with MSN Messenger! Download today it's FREE!
 http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

 ___
 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] Isometic game - zdepth managing for multiple movablecharacters

2007-09-13 Thread Joshua Sera
A quick clarification on using _y value to control z
depth:

You don't need to make sure no two objects share the
same _y value.

Every object should have some sort of unique ID
between 0 and whatever you're multiplying the Y value
by. In the example, an ID between 0 and 99.

EX:

var limit:Number = 100;

this.swapdepths(this._y * limit + this.id);

This means two objects can have the same _y value
without overwriting each other, depth-wise.

--- Jiri Heitlager [EMAIL PROTECTED]
wrote:

 First off, thanks that you people took the time to
 help me out and thank 
 you Jobe for sending me your class. I appreciate
 that, but would really 
 like to program the game myself from scratch to get
 a full understanding 
 on how games like this are made.
 
 I am reading all the replies and trying to see if I
 am understand them 
 correctly.
 Basically I have two options. Give every movable
 object the depth of the 
 screen _y value and make sure that objects can never
 be on the same _y 
 position.
 Second option.  If the movable objects only move one
 tile at a time, 
 meaning that their screen _y position could
 sometimes be the same, I 
 need to assign for every tile a range of n numbers
 of depth that can be 
 taken. Then check for an available depth within each
 tiles indivudual 
 range of depth , when a movable objects is on a
 tile.
 
 @Danny, could please explain your comment on
 subsorting a bit more. I am 
 not quit sure if I understand it.
 
   However, you can optimise quite a bit
   by sub-sorting - if you know that object 1 is in
 the rear 16 tiles and
   object 2 is in the front 16 tiles, no need to
 check the z-order.
 
 Jiri
 
 Danny Kodicek wrote:
  Every object gets a z-depth assigned. For the
 players the 
  zdpeth need to be set based on the tile they are
 at. This way 
  the players can walk 'around' the enviorment
 objects. For the 
  z-depth calculation I use the tile grid x and y
 plus the 
  width of the row, this generates an unique
 z-depth number and 
  makes sure that the higher the y, the bigger the
 z-depth , 
  thus objects appear infront of objects with a
 lower y index.
  Here is the problem I am trying to figure out. If
 two movable 
  objects, or even three of them are at the same
 time on the 
  same tile, then the above described z-depth
 managing will 
  fail. How do I deal with that?
  
  If this is possible in your game then you'll need
 to either store sub-tile
  positions and z-sort further on those (you could,
 for example, assign ten
  z-slots per tile to ensure that you have more
 space) or randomly choose one
  to be in front of the other (if there's only one
 position per tile, then it
  doesn't matter which one gets drawn in front).
  
  Then another question I have is this. Does every
 movable 
  object needs to check/swap z-depth on every
 frame. Wouldn't 
  that be to CPU intensive?
  
  Depends how you do it. If there's only a few
 movable objects, this shouldn't
  be particularly hard on the machine - Flash isn't
 the fastest thing in the
  world, but it's fast enough for that. However, you
 can optimise quite a bit
  by sub-sorting - if you know that object 1 is in
 the rear 16 tiles and
  object 2 is in the front 16 tiles, no need to
 check the z-order.
  
  Danny
  
  ___
  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
 



  

Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mailp=graduation+giftscs=bz
___
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] Isometic game - zdepth managing for multiple movablecharacters

2007-09-13 Thread Ian Thomas
Yep, that's pretty much what I was saying in my example.

No real need for sorting, either - or subsorting for that matter.

Ian

On 9/13/07, Joshua Sera [EMAIL PROTECTED] wrote:

 A quick clarification on using _y value to control z
 depth:

 You don't need to make sure no two objects share the
 same _y value.

 Every object should have some sort of unique ID
 between 0 and whatever you're multiplying the Y value
 by. In the example, an ID between 0 and 99.

 EX:

 var limit:Number = 100;

 this.swapdepths(this._y * limit + this.id);

 This means two objects can have the same _y value
 without overwriting each other, depth-wise.

___
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] onIOError downloading with filereference class in AS2

2007-09-13 Thread tom rhodes
Hi all,

Got a really annoying prob, i've got flash sending bitmapData to php, php
makes a jpeg, saves it on the server and returns the unique filename to
flash.

all of this works perfectly.

then

the system dialogue box opens, you select where you want to save the file
and

onIOError is called.

i can't find any good info as to why it gets called. can someone help
please?

tia,

tom.
___
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] TWeener custom class property tweening

2007-09-13 Thread Jiri Heitlager
I tried to use the Tweener class to 'animate'  a property of a class, 
but it doenst seem to work. Can somebody point me out, what it is I am 
doing wrong.


Here is my code
/**
* ...
* @author Default
* @version 0.1
*/
import caurina.transitions.Tweener;
import org.dadata.utils.Proxy;
class Test.test{

private var x:Number = 0;

public function test() {

		Tweener.registerSpecialProperty(_xpos, Proxy.create(this , 
_xpos_get), Proxy.create(this ,_xpos_set));

Tweener.addTween(this, {_xpos:10, time:.5});
}

public function _xpos_get(p_obj:Object) : Number
{
trace('getting x' + this.x)
return p_obj.x
}
public function _xpos_set(p_obj:Object, p_value:Number):Void
{

p_obj.x = p_value

trace('this x :: '+p_value)
trace('this x :: '+p_obj.x)
}
}

Thank you.

Jiri
___
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] Radial Gradient Programmatic Masks in AS3.0

2007-09-13 Thread Patrick Lemiuex

Hi,
I was trying to script a spotlight effect in AS3... I didn't have any  
luck, apparently, it's pretty common to do this and come up with a  
rectangle.  Does anyone have a working example of this?  This is  
probably something I am going to do over and over again so help is  
really appreciated.


Thanks,
Patrick
___
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] Google Maps or Yahoo maps

2007-09-13 Thread Andrei Thomaz
you can also give a look at http://www.afcomponents.com/components/g_map/. I
had to use it, because Google has better maps of brazilian cities than
YahooMaps.

[]'s
andrei


On 9/13/07, Randy Troppmann [EMAIL PROTECTED] wrote:

 Hello,

 I have little experience with the Google API but AFAIK the API is
 strickly AJAX based. Yahoo! maps on the other hand, has an AS2 based
 component that you can hack and extend in Flash. They do not have an
 AS3 based component at this time but released an AS3 communication
 kit that facilitates direct API calls within Flex to the AS2 map
 though ExternalInterface. Google is the leader with maps. But IMHO
 Flash/flex is a better performer when layering interactivity on a map
 and a better development platform.

 Randy Troppmann
 http://www.runningmap.com

 On 9/12/07, Cédric PASCAL [EMAIL PROTECTED] wrote:
  Hi everybody,
  i have a choice very important,
  i have to use map and interact with them (put a flag and see the nearest
  flag for exemple, search the road or the distance between two flag).
  I have to work in flex and i would like your point of view, its better
 to
  use google map or yahoo maps in flex ?
 
  I think flex and AS API of yahoo are better for the moment but i need
 senior
  programmers point of view please.
 
  Thanks !
 
  --
  PASCAL Cédric
  IT french student
 
  PS : if someone have another solution he could propose it , and some
  examples too !
  I'am not an expert in fact ;)
  ___
  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


Re: [Flashcoders] toString(aArray[i]) ?? does this work SOLVED

2007-09-13 Thread paul
Thanks,
Thanks all who answered this post
I ended up using

var varName:String = this._name;
var varNumber:Stirng = substr(2);
var varNum:Number = parseInt(varNumber);

trace(varNum);  //traces 1,2,3 etc. as type -Number.

Thanks again,
Paul V.




- Original Message - 
From: Andy Herrman [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Wednesday, September 12, 2007 8:30 AM
Subject: Re: [Flashcoders] toString(aArray[i]) ?? does this work


 You say [object Object] is the correct output if the object is a
 movie clip.  This isn't the behavior I see.  Any time I trace a movie
 clip I get the clip's name (level0.foo.bar.whatever), not the generic
 object results.

   -Andy

 On 9/11/07, Hal Leonard [EMAIL PROTECTED] wrote:
  Try toString(aArray[i]._name) instead I'm not 100% sure what you're
  storing in your array, but it sounds like you're storing movieClip
objects
  in there, in which case the result [object Object] would be the correct
  output.
 
  Hal
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of
  [EMAIL PROTECTED]
  Sent: Monday, September 10, 2007 8:30 PM
  To: Flash Coders
  Subject: [Flashcoders] toString(aArray[i]) ?? does this work
 
 
  Quick question, can I toString an array element.
  ie:   var  myStr:String  =  toString(aArray[i]);// where 'i' is the
  increment.
 
  I am having an issue with this.  when I trace myStr it traces [object
  object]
  instead of what I intended/expected mcMovieClipName14 as a string.
 
  Any insite would be appreciated.
 
  Thanks in advance,
 
  Paul V.
  ___
  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@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] Google Maps or Yahoo maps

2007-09-13 Thread Cédric PASCAL
But my problem would be now to combine AS2 file in flex.

In fact i dont understand why no solution for Flex and AS3 exist :(
Its strange

Thanks
I will do my best !

PS : :) I will promise you French wine for someone who can find a solution !
lol Ruse Cédric I 'am !


2007/9/13, Andrei Thomaz [EMAIL PROTECTED]:

 you can also give a look at http://www.afcomponents.com/components/g_map/.
 I
 had to use it, because Google has better maps of brazilian cities than
 YahooMaps.

 []'s
 andrei


 On 9/13/07, Randy Troppmann [EMAIL PROTECTED] wrote:
 
  Hello,
 
  I have little experience with the Google API but AFAIK the API is
  strickly AJAX based. Yahoo! maps on the other hand, has an AS2 based
  component that you can hack and extend in Flash. They do not have an
  AS3 based component at this time but released an AS3 communication
  kit that facilitates direct API calls within Flex to the AS2 map
  though ExternalInterface. Google is the leader with maps. But IMHO
  Flash/flex is a better performer when layering interactivity on a map
  and a better development platform.
 
  Randy Troppmann
  http://www.runningmap.com
 
  On 9/12/07, Cédric PASCAL [EMAIL PROTECTED] wrote:
   Hi everybody,
   i have a choice very important,
   i have to use map and interact with them (put a flag and see the
 nearest
   flag for exemple, search the road or the distance between two flag).
   I have to work in flex and i would like your point of view, its better
  to
   use google map or yahoo maps in flex ?
  
   I think flex and AS API of yahoo are better for the moment but i need
  senior
   programmers point of view please.
  
   Thanks !
  
   --
   PASCAL Cédric
   IT french student
  
   PS : if someone have another solution he could propose it , and some
   examples too !
   I'am not an expert in fact ;)
   ___
   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




-- 
PASCAL Cédric
étudiant en
Master 1 Produits et Services Multimédia
Université Technologique du Pays de Montbéliard
___
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] Radial Gradient Programmatic Masks in AS3.0

2007-09-13 Thread Rob Romanek

What have you tried?

I don't think you can do this via the timeline you need to do it  
programatically by setting the mask of a clip to another clip which has  
it's bitmap caching set to true.


hth,

Rob

On Thu, 13 Sep 2007 14:19:42 -0400, Patrick Lemiuex [EMAIL PROTECTED] wrote:


Hi,
I was trying to script a spotlight effect in AS3... I didn't have any  
luck, apparently, it's pretty common to do this and come up with a  
rectangle.  Does anyone have a working example of this?  This is  
probably something I am going to do over and over again so help is  
really appreciated.


Thanks,
Patrick

___
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] Radial Gradient Programmatic Masks in AS3.0

2007-09-13 Thread Patrick Lemiuex
Yeah, that didn't work, i am not using the timeline, very rarely do i  
use the timeline these days.

I need a working example to understand the exact process

Thanks,
Patrick
On Sep 13, 2007, at 12:35 PM, Rob Romanek wrote:


What have you tried?

I don't think you can do this via the timeline you need to do it  
programatically by setting the mask of a clip to another clip which  
has it's bitmap caching set to true.


hth,

Rob

On Thu, 13 Sep 2007 14:19:42 -0400, Patrick Lemiuex  
[EMAIL PROTECTED] wrote:



Hi,
I was trying to script a spotlight effect in AS3... I didn't have  
any luck, apparently, it's pretty common to do this and come up  
with a rectangle.  Does anyone have a working example of this?   
This is probably something I am going to do over and over again so  
help is really appreciated.


Thanks,
Patrick

___
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] TWeener custom class property tweening

2007-09-13 Thread Zeh Fernando

Hey Jiri,

I'm not sure if I'm getting it right; but if you want to animate a 
property of a class, you don't need to register anything. The special 
properties are meant only to wrap around features that aren't directly 
acessible (like data that is only acessible through methods and 
functions.. gotoAndStop() to change a Movieclip's _currentFrame for 
example).


If you want to tween a numeric property that's already acessible, you 
can tween it directly, with no special property, wrapping function, or 
anything. Ie:


Tweener.addTween(this, {x:10, time:.5});


Zeh

Jiri Heitlager wrote:
I tried to use the Tweener class to 'animate'  a property of a class, 
but it doenst seem to work. Can somebody point me out, what it is I am 
doing wrong.


Here is my code
/**
* ...
* @author Default
* @version 0.1
*/
import caurina.transitions.Tweener;
import org.dadata.utils.Proxy;
class Test.test{

private var x:Number = 0;

public function test() {


Tweener.registerSpecialProperty(_xpos, Proxy.create(this , 
_xpos_get), Proxy.create(this ,_xpos_set));

Tweener.addTween(this, {_xpos:10, time:.5});
}

public function _xpos_get(p_obj:Object) : Number   
{

trace('getting x' + this.x)
return p_obj.x
}
public function _xpos_set(p_obj:Object, p_value:Number):Void
{
   
p_obj.x = p_value


trace('this x :: '+p_value)
trace('this x :: '+p_obj.x)
}
}

Thank you.

Jiri
___
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] Prevent Enter Key Playback?

2007-09-13 Thread Doug Coning
I have a flash swf that plays to a certain frame and then stops.  Then
with JavaScript, I have HTML tell the flash player to play a demo later
on.  

However, if the swf file has the focus in the browser and the user
presses enter, it begins to play.  I've tried capturing the enter key
unsuccessfully to prevent it from playing.

Is there a way to prevent Enter Key from playing the movie when the swf
has the focus?

Thanks,

Doug Coning
Senior Web Development Programmer
FORUM Solutions
[EMAIL PROTECTED]
 
This e-mail and any attachment(s) are intended for the specified recipient(s) 
only and are legally protected.  If you have received this communication in 
error, please reply to sender's e-mail address with notification of the error 
and then destroy this message in all electronic and physical forms.
___
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] Radial Gradient Programmatic Masks in AS3.0

2007-09-13 Thread Rob Romanek

This should work for you...

http://www.manibus.com/codeSamples/maskTest.fla

Rob

On Thu, 13 Sep 2007 15:41:46 -0400, Patrick Lemiuex [EMAIL PROTECTED] wrote:

Yeah, that didn't work, i am not using the timeline, very rarely do i  
use the timeline these days.

I need a working example to understand the exact process

Thanks,
Patrick
On Sep 13, 2007, at 12:35 PM, Rob Romanek wrote:


What have you tried?

I don't think you can do this via the timeline you need to do it  
programatically by setting the mask of a clip to another clip which has  
it's bitmap caching set to true.


hth,

Rob

___
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] Developers wanted.

2007-09-13 Thread Chris Hill
We are looking for quality flash developers for contract and full-time 
positions. Telecommute is ok. Please email me offlist with your resume 
and availability.


Must be based in US, sorry.
Thanks,
Chris
___
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] AS3 TextFields with filters - game performance?

2007-09-13 Thread EECOLOR
I do not know what the performance inpact is of TextFields with
filters. If the performance it too great you could take a snapshot
of the text using a BitmapData instance. Then draw that BitmapData to
a Shape or Bitmap and apply the filters there.

As I said, I dont know about the difference in performance, but you could
try it :)


Greetz Erik

On 9/13/07, Dimitrios Bendilas [EMAIL PROTECTED] wrote:

 Hello,

 I was wondering if any of you have any feedback to share concerning the
 extensive use
 of textfields with filters in games made with Flash 9 and ActionScript 3.

 We are developing a desktop casual game, let's say of the scale of Diner
 Dash (http://www.playfirst.com/game/dinerdashfloonthego).
 I am building a new Game Framework in AS3, Flash 9 and I was thinking of
 using
 the native TextField objects for displaying text of all kind.

 I want to use textfields with embeded fonts and various styles like Glow
 and DropShadow
 at will. The game will have text displayed on game panels, score, animated
 score,
 game messages and everything a middle-scale game contains.

 My major concern is performance, because of the use of filters. By the
 way, I want to use
 the filters so that I won't have to make a new Raster Font Engine in Flash
 (I've already done
 one for AS2.0)

 Any insight would be great.

 Thanks,

 Dimitrios

___
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] Google Maps or Yahoo maps

2007-09-13 Thread EECOLOR
A few weeks ago I had to create some map application in Flex 2 aswell. I
went out and started looking for a solution and came across a Flash Player 9
application that could connect with all types of map services including
google. But the source for that application was not available anymore
(apparently ordered by google or something).

I tried to figure it out myself by going over the JavaScript files. This
however would have taken ages as it's quite a complex process that google
uses. You can not just get the images directly, you need to send
somesort of header I guess.


Eventualy I used Yahoo, dug through the scripts and figured out how to load
the images.

I did not come across the G_map component in my search though, I'm not quite
sure how it works but my guess is that you could find out. However this is
on the google API's Terms of Use:

Your use of this photographic imagery is limited to displaying it to end
users within the Service itself, and in the same manner, form, format, and
appearance as it is provided by the Service. You may not, nor may you allow
others to, copy, distribute, display, alter, or otherwise use, this
photographic imagery except as it is provided to you through the Service.


This also the reason that I stopped persuing the better images of Google
maps.


Greetz Erik


On 9/13/07, Cédric PASCAL [EMAIL PROTECTED] wrote:

 But my problem would be now to combine AS2 file in flex.

 In fact i dont understand why no solution for Flex and AS3 exist :(
 Its strange

 Thanks
 I will do my best !

 PS : :) I will promise you French wine for someone who can find a solution
 !
 lol Ruse Cédric I 'am !

___
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] AS3 Sound = wtf

2007-09-13 Thread EECOLOR
Maybe this is a project you would like to check out?

http://code.google.com/p/popforge/


Greetz Erik



On 9/13/07, Andreas Rønning [EMAIL PROTECTED] wrote:

 I didn't mean hacking was wrong by any stretch, but i am not a hacker. I
 simply don't have the time / budget to get in-depth on that level. Imagine
 what these hacker types (Andrè Michelle in particular) could do if the API
 natively supported the things they now hack to do? I don't really think the
 things Michelle does is special in terms of audio programming, but it IS
 special in a Flash context because of how limited the API is. It's a moan
 about how truly awesome Flash audio could've been with some direct way to
 affect audio and an orderly way to manage it i suppose?

 I'll write up a feature request myself. Good to hear more people want the
 same :)

 - A

___
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