Re: [Flashcoders] swf2jpg conversion

2007-02-06 Thread Martin Wood-Mitrovski

is there any chance you could put it somewhere publicly accessible?

im sure there are quite a few people who would like to use it (myself included)

thanks,

Martin


Firstpixel wrote:

There is some PHP that does it.

email me and I will send you the php Classes.

Gil Beyruth
Criação e Desenv. Flash
{FP}Firstpixel.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] sort 2d array

2007-02-02 Thread Martin Wood-Mitrovski
I think its wise to be careful how you approach this as although quicksort is 
'quick' you could actually be using it inefficiently (or rather in a situation 
that isnt appropriate)


If your list is almost sorted then quicksort can be inefficient, (depending on 
how you choose your pivot, apparently choosing a random pivot can be a good idea)


Also this highlights how you should be careful when benchmarking any sorting 
algorithms as the order of the data before the sort greatly affects performance.


If its possible you might be better off storing your data already sorted.

How is the data generated?

If you have to sort then you might want to do some reading first :

http://www.cs.sunysb.edu/~algorith/lectures-good/node5.html

'the worst case time for Quicksort is worse than Heapsort or Mergesort.'

http://linux.wku.edu/~lamonml/algor/sort/quick.html

'the quick sort has horrible efficiency when operating on lists that are mostly 
sorted in either forward or reverse order - avoid it in those situations'


youre lucky though because this topic is very well covered :)


Martin
___
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] Need a volunteer Flash Programmer

2007-01-31 Thread Martin Wood-Mitrovski

Is it that I cant read, or is it hiding somewhere on the page. Or is
this just some inside knowledge about swivelgames that I am not privy
to. Because I dont see anything on the swivelgames.com page about
asking for volunteer work.


its just from the email address of the dude who sent the request.

not really worth your time thinking too deeply about it.
___
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] Flair Pattern?

2007-01-29 Thread Martin Wood-Mitrovski
Im not normally one to comment on personal behaviour but that post really does 
leave a bitter taste, which is sad as you are sometimes helpful.


If you are going to pass judgements on other peoples work which may prove 
helpful in the situation facing the OP then at least qualify them or you also 
look like you are relying on us accepting your notion of your own ego.


Design patterns are not cast in stone and the GoF dont hold the one true set of 
patterns, PhD's or no PhD's.


Actionscript is not C++ and its not Smalltalk, other solutions may apply.

I know you can discuss a topic without resorting to ad hominem, so please do so.

thanks,

Martin

Steven Sacks | BLITZ wrote:

There are no references to the Flair design pattern anywhere else
because it doesn't exist anywhere except in the ego of Brendan Hall.
It's not a design pattern, it's a class that uses another design
pattern, and poorly, too, judging by the code example.

If you want to learn more about Design Patterns, there are quite a few
great books out there on the subject written by people more learned and
experienced than Brendan Hall.  Like people with PhD's in Computer
Science.  From the de facto bible Design Patterns by the Gang of Four to
many others.

___
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] Invisible re-draw

2007-01-26 Thread Martin Wood-Mitrovski



eric dolecki wrote:

The player draws constantly what is on stage. Vector takes more horses than
bitmap (in fact unless a bitmap moves or changes, its static (won't be
redrawn - hence the cacheAsBitmap option).


I would have thought the rasterizer has at least some kind of dirty rectangle 
setup, hence the option to view redraw rectangles.


___
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] Q: Approaches to integrating existing class libraries with frameworks

2007-01-26 Thread Martin Wood-Mitrovski



[EMAIL PROTECTED] wrote:

Hi I'm very much interested in exploring several popular flash frameworks,
especially PixLib, but am wondering if there is a way to adopt and integrate
legacy class code with these new frameworks.


absolutely.

i've been doing exactly that with pixlib and documenting my progress

http://relivethefuture.com/choronzon/category/development/flash/pixlib/

I've got a couple more posts in my head that I just need to type up when i get 
the time covering remoting and general utility stuff.


I cant really comment on the other frameworks as i've not tried them, but pixlib 
is pretty cool and the community support is excellent.


You should definitely sign up for the mailing list if you start working with 
pixlib.

___
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 wish: Omit comments on publish

2007-01-25 Thread Martin Wood-Mitrovski

comments arent compiled. dont worry about it. :)

Mick G wrote:

Am I wrong in thinking that comments are included in a SWF when it's
published?

___
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] External libraries

2007-01-23 Thread Martin Wood-Mitrovski
there's a -mx switch specifically for that, in fact I think it just ignores the 
mx.* classes so they dont even get compiled.


you can also patch your mx.* classes using a patch from osflash.org which is 
what I do, then I dont need the -mx switch.


n.b. I patched a copy of the mx classes, not the originals. My IDE install 
points to the originals. :)



martin

Andy Herrman wrote:

Hmm...I just tried building using MTASC and I'm getting an error in
one of the mx classes.  It's choking on mx.utils.Delegate (variables
aren't typed).  Is there a way to keep MTASC from being too strict on
the built in mx classes?

  -Andy

___
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] External libraries

2007-01-23 Thread Martin Wood-Mitrovski
like i said in the other mail, -mx prevents mtasc compiling the mx.* classes so 
you will want to generate the swf in MMC and then inject the new code when you 
compile (or patch the mx classes)


also, you might like this delegate implementation :

http://dynamicflash.com/2005/02/delegate-class-refined/

Andy Herrman wrote:

If I add the -mx parameter to MTASC (I'm working through FlashDevelop)
it removes the error, but the Delegate class doesn't work anymore
(Delegate.create returns undefined).

  -Andy

___
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] External libraries

2007-01-22 Thread Martin Wood-Mitrovski
you cant attach symbols from a loaded swf to a different parent, you *must* 
attach them somewhere in the tree where their library exists.


you have to do uiResources.attachMovie instead of _root.attachMovie

its a nasty limitation of flash (pre v9, in v9 you can manipulate the display 
heirarchy pretty much as you like)



Andy Herrman wrote:

   var img:MovieClip = root.attachMovie(asImage, asImageMC,
root.getNextHighestDepth());


___
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] Datatypes that are complex/composite ...

2007-01-15 Thread Martin Wood-Mitrovski
id stick to 'complex' in general because the word composite to me refers to the 
composite pattern [1]. Although movieclip is an example of the composite pattern 
and a complex object, so you could use both.


There's also the usage of 'composition' (vs. inheritance) [2] which is a way of
creating complex data types, but not necessarily composites.

its a mine field out there :)

[1] http://en.wikipedia.org/wiki/Composite_pattern
[2] http://en.wikipedia.org/wiki/Record_(computer_science)

Stephen Ford wrote:

Do you refer to the following datatypes (arrays, objects, movieclips, etc) as
complex or composite.I'm finding references that use both terms.Not a biggie,
but would like to hear
opinions.___ 


--
Martin Wood-Mitrovski

http://relivethefuture.com/choronzon
___
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] Drag on a specific angle

2007-01-05 Thread Martin Wood-Mitrovski



Merrill, Jason wrote:
You can project a perpendicular line from the mouse to the 
target line and then find the intersection.


uh huh. Still waiting for someone to explain how to do the constrain
part.  Mike did say, Using this basic principle you could limit an MC
to a slope based on the _xmouse value. - sounds cool, some code showing
the limit part I think is what Eric is after.


right, tbh its probably best to stick to one line of reasoning and follow what 
Mike is suggesting as its probably not as complicated :)


actually thinking about it you could just use the dot product to project the 
vector from the start point to the mouse onto the drag line then constrain the 
result between 0 - 1. Multiply that number by the drag line vector and add it 
to the start point.


not that complicated (not like my previous idea..dont know why i came up with 
that..but im sure ive used it before..)

___
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] Senior Developer Posisition

2006-12-20 Thread Martin Wood-Mitrovski
Reverse the math from London at $80K. 


NYC: $69K, SF: $52K
Both of which are far less than what a senior level flash dev should be
making in this market.


thats why i dont live in london anymore :)
___
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] How to send Audio objects as MP3 via XML-RPC?

2006-11-30 Thread Martin Wood-Mitrovski



Leo Burd wrote:

- thanks so much for all the feedback provided!

I believe now I've collected all (or most) of the pieces that I needed 
for my little system!


As for the sorenson format issue, I believe ffmpeg can take care of 
that... (hopefully)


the video is sorenson, but the audio is nellymoser. Im pretty sure that there 
are currently no free converters for nellymoser.


If you want to record audio from flash via the mic and convert it into a 
'usable' format you'll have to pay nellymoser for their transcoder.


From what ive read (on the flashcomm list) its in the region of $8k

If you do find a way to convert .flv audio to something else for free, please 
let me know :)


thanks,

Martin

___
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] migrating to Flex

2006-11-26 Thread Martin Wood-Mitrovski

Millie Niss wrote:

Am I the only one on this list who (still) uses the Flash IDE (Flash 8 Pro) and
hasn't migrated to AS 3.0 or any version of Flex? 


haha, no, all my paid work is still still targeting the v7 player.

I dont think i'll be using AS3 commercially for at least a year.


What
is the minimum cost to start using Flex?  (I mean in a production
version.  


absolutely zero.

FlexBuilder costs money, but the Flex SDK is free.

___
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] Tween color of dynamic text

2006-11-22 Thread Martin Wood-Mitrovski



eric dolecki wrote:

Thats cool - i hooked the class up, but i get an array with values like
this:

4951245,6133970,7316439,8499164,9681633,10864358,12046827,13229552,14412021,15594746 



from going from a blue to white:

[0x4B8CCD,0xFF]

??


looks right to me

0x4B8CCD = 4951245

im guessing you missed of some of the end values as

0xFF = 16777215

___
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] LocalConnection breaks object types?

2006-11-14 Thread Martin Wood-Mitrovski

did you use Object.registerClass ?

you have to register your types for them to serialize / de-serialize with their 
type information intact.


PR Durand wrote:

Hi there!

using localConnection seems to totally untype an object, right?

___
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] LocalConnection breaks object types?

2006-11-14 Thread Martin Wood-Mitrovski
Object.registerClass is used to register types for a variety of purposes, shared 
objects, local connections and remoting apart from the MC / class link usage.


Did you register the class at both ends? and are you sure its compiled into both 
movies?


check this post from the archive

http://chattyfig.figleaf.com/pipermail/flashcoders/2004-November/126008.html

its a good guide to local connection and registerClass.




PR Durand wrote:
Nope... it seems that object.registerClass remains a link between AS1 
class and a movieClip...

I can't get my object pass through the localConnection... :(
++
PiR

___
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] [OT] Flash player on the PS3?

2006-11-13 Thread Martin Wood-Mitrovski



Zárate wrote:

Good news about the Wii!

There is no FP9 for PPC Linux yet

PPC? As far as I know* Pocket PC is Microsoft exclusive. What I would
expect in the future is player 9 (Linux version), but it will probably
need to get out of beta first.


:)

PowerPC, like Macs used to be

http://www.ps3land.com/ps3specs.php

___
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] Music visualisation in Flash 9

2006-11-02 Thread Martin Wood-Mitrovski



Jake Prime wrote:

Hi

I have just been asked about the possibility of making an app which
will play MP3s, and display visual effect to match it. Does this sound
like something that is possible in AS3?


Its easy in AS3, just look up Sound.computeSpectrum in the reference.

you'll also find code examples on the internet.

such as

http://blog.andre-michelle.com/2006/soundmixercomputespectrum/

and

http://www.martijndevisser.com/blog/article/as3-computespectrum-bitmapdata


___
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] Music visualisation in Flash 9

2006-11-02 Thread Martin Wood-Mitrovski



Paul Steven wrote:

Haven't looked into AS3 yet but seeing this thread I wonder if it is
possible to change the pitch of dynamically loaded mp3 files in real time?


im 99% certain the answer is no.

if there is a way i would love to know how. :)

___
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] setVolume has a greater range than documented?

2006-10-25 Thread Martin Wood-Mitrovski
if you have no other sound objects then setting the volume to 100 should be full 
volume.


if you create sound objects using a heirarchy of mc's then the final volume is a 
combination of the volumes of each sound object within the heirarchy.


if its not that then i dont know...what version of the player and which 
platform?

as a side note, you can set the volume to any number you like, what i find 
interesting is that the player has its own flavour of distortion which can be 
quite nice (if you like that kind of thing)


if you do try running some sine tones or other simple tones (square, saw, dtmf 
etc..) and cranking up the sound object volume to 10,000 or so (but mind your 
ears / speakers)




Michael Bedar wrote:
I am loading MP3's into a sound object, and the sounds play full volume 
without me touching anything.  However if i then set the volume of the 
Sound object to 100, the sound plays at what seems to be about 50%, and 
following this trend passing in 200 seems to get back up to 100%.


soundPlayer.loadSound(my.mp3);
//plays at 100%


soundPlayer.loadSound(my.mp3);
soundPlayer.setVolume(100)
//plays at ~ 50%

soundPlayer.loadSound(my.mp3);
soundPlayer.setVolume(200)
//plays at 100%

Has anyone run into this?

-Mike
___
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



--
Martin Wood

http://relivethefuture.com/choronzon
___
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] Hough transform

2006-10-06 Thread Martin Wood
I dont have a simple way to do it but I can point you to some teaching materials 
so you can learn how to do it.


http://www.cogs.susx.ac.uk/users/davidy/teachvision/vision0.html

There are some good descriptions of implementing the hough transform and other 
techniques for finding shapes like active contour models.


There might be better resources on the web but I know these as it was the course 
I did way back when I was an undergraduate. :)



dan wrote:

Hi guy's
Im tring something tht might work 
Heres the idea


Find the edge of a picture
And use the Hough transform to find the shape :)

Kinda stuck

Does anyone have a simple way to use the Hough transform?
10x

___
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] [JOB] Flash developer, Cambridge, UK

2006-10-04 Thread Martin Wood



Zárate wrote:

Hi guys,

The company I work for is looking to hire Flash developers as we have
a huge amount of work. We're based in Cambridge, UK and do
predominately e-learning applications. You can check out our website
http://www.tribalctad.co.uk for more info.

Main role: Flash developer. The level of your role will depend on
which of the following skills you can match (both freelance and
permanent roles are possible, though if you want to get the most out
of us you will need to be permanent).


and do the freelancers have to be on-site or do you support remote workers?

thanks,

Martin

___
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 returns incorrect size for masked clips

2006-09-29 Thread Martin Wood

useful is a matter of perspective :)

if you want to load in the content behind a mask and dont know how big the 
content is then its useful to be able to find out its real size, not just the 
visible size.


Radley Marx wrote:
I have a .swf that's 400x300. It has a stage and mask that's 400x300, 
but the masked content is 800x600.


When I check ._width  ._height for the movie I get 800x600, instead of 
400x300 which *should* be the true (and useful) value.


Is this a permanent error? Or does the value eventually come back as I 
expected?


___
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] Software Development Position

2006-09-18 Thread Martin Wood

Kevin Aebig wrote:

Just so we're clear, I don't mean they simply enjoy their jobs. I'm talking
about the guys who constantly learn, adapt and take their work home with
them on a regular basis. The guys who eat, breathe and sleep their jobs. 


I've found that there are many guys fresh out of school who are like this
for the first 6 months to a year and than taper off. Than it's simply 9 to 5
and everything else is a waste.


Sounds like burnout.


If you know a lot of them, than you're living in a pretty unique place
compared to where I'm from. I'm pretty rigged into the industry here and
generally most of the guys couldn't even do that if they wanted to. They
have families or other commitments that infringe on their time.


I think you meant to say 'their' (this group includes me) priorities change and 
coding all day every day just isnt as important or exciting as something like 
seeing the first smile on their childs face.


anyway..its all getting a bit OT now.

lets stick to what this list is about. :)


martin.
___
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] [JOB] Sr. Flash/AS Programmers

2006-09-07 Thread Martin Wood
And sometimes the user group meetings do some web broadcasts so I always check 
whats going on :)


Count Schemula wrote:

That's why I think the main requirement was city name in the title,
so, people could delete them if they were geographically irrelevant.

On 9/7/06, Merrill, Jason [EMAIL PROTECTED] wrote:

but Sydney user groups have no value to me.  But that's just me. :)



___
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] Fwd: Application Framework

2006-09-01 Thread Martin Wood



Jeff Brown wrote:

Wow Duncan, this may solve quite a bit.

It looks even easier than the php-xml-flash method I was looking for.
Although my designer may need to install the Flash Remoting thing.  We've
already started development on the app's php mysql side, but we're a little
ways (re: 8-10 weeks) from needing the flash integration.  I'll have to
devote a bit of time to figure out if this will serve our needs, but it
looks like it will.

If so, then great, but I'm still keeping my options open for the XML.  
I'm a
little worried about network traffic, as this app will need to support 
100's

to 1000's of simultaneous users.  That won't be a problem for the XML
scheme.   Don't know yet.


Well, remoting data takes less bandwidth than XML data so if traffic is a 
primary concern you should definitely consider the remoting option.


It also means you generally need less code in the flash part.

Personally I would always take a remoting solution over XML.

martin.
___
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] Images stay on memory forever?

2006-08-31 Thread Martin Wood
Sounds perfectly normal to me, making something invisble in flash doesnt mean it 
will unload the content from memory, in fact it doesnt necessarily mean it wont 
get rendered.


Im not sure if this is still the case in fp8 but i know that in previous 
versions i would also move a clip to -1,-1 to stop the renderer from 
including it.


martin

Dimitrios Bendilas wrote:

Sorry for posting again,

Anyone got any idea?

___
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] Images stay on memory forever?

2006-08-31 Thread Martin Wood

are the clips created via attachMovie?

why do you need to reclaim 4MB? its not a lot of memory. Flash may well use a 
memory management strategy that doesnt require it to immediately return the 
memory its allocated.




Dimitrios Bendilas wrote:

Hi Martin,

Ok, but the memory doesn't even free if I remove the movie clip
with .removeMovieClip()

And I tried moving it out of the stage as well...

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] RE: Images stay on memory forever?

2006-08-31 Thread Martin Wood
p.s. Martin, is this true? - does the player really NOT render things 
placed way off stage?


 Im not sure if this is still the case in fp8 but i know that in previous
versions i would also move a clip to -1,-1 to stop the renderer 
from

including it.


im sure it *was* true back in the mists of time but i dont think it is with 
fp8...i dont know if it was with fp7..my memory isnt so good these days ;)


In fact i remember another interesting artifact of _visible = false was when you 
used a non 32-bit colour depth you could still 'see' the object..well, it made 
the colours go a bit off.


I just did a quick, fairly unscientific test in f8 and _visible = false seems to 
be fine in fp8.


so, thats something i can now forget about. :)
___
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] AMFPHP 1.2 Class Mapping VO's incomming from PHP5 - It works but...

2006-08-30 Thread Martin Wood

Just knowing that
the object is populated before the constructor is called and that those
properties take precedence over my class explains a lot.  Now I'm much
better prepared to handle what remoting throws at me :)


great...

I think thats one part of remoting where they could have done something slightly 
more clever. Even if they added some configuration possibilities to the player 
like a flag for


Remoting.callConstructorFirst

and

Remoting.useAccessors

which could use both types of accessor but I prefer to have options.
___
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] AMFPHP 1.2 Class Mapping VO's incomming from PHP5 - It works but...

2006-08-30 Thread Martin Wood

Just knowing that
the object is populated before the constructor is called and that those
properties take precedence over my class explains a lot.  Now I'm much
better prepared to handle what remoting throws at me :)


Accidentally hit the wrong key combo and sent the previous mail before i was 
finishedhere it is again..in all its glory..


great...

I think thats one part of remoting where they could have done something slightly
more clever. Even if they added some configuration possibilities to the player
like a flag for Remoting.callConstructorFirst if you want you objects created in 
a 'normal' way, maybe at the expense of performance and Remoting.useAccessors 
which could use both types of accessor. (get x and getX)


They could be set to default to what they are now, but at least you would have 
options to turn the remoting deserialization (and local shared objects) into 
something that behaves like normal code rather than magic. :)



martin.
___
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] AMFPHP 1.2 Class Mapping VO's incomming from PHP5 - It works but...

2006-08-29 Thread Martin Wood
Unfortunately the player wont do data type conversion when deserializing the 
contents of an object returned via remoting.


You have to make sure your types are right on the server so that when the 
remoting gateway constructs the amf data to send to flash it has the correct 
types already inside.


Obviously this is more of a pain from something like PHP than say Java as PHP 
has a much looser type system.


For me the beauty of remoting is that you *do* get the datatypes that you create 
on the server sent to you in flash.


I think the other issue you are running into is that when the player creates the 
actionscript objects from the remoting data it populates the object *before* it 
runs the constructor.


This means that it doesnt care about any getters / setters and you have to be 
extra careful if you do anything in the constructor or are expecting parameters 
to your constructor.



Julius Turnmire wrote:

Ok, I've got it working as advertised.  I'm using VO's and my returned
values are being mapped to my VO classes.  But the problem is how
they're mapped.

___
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] mvc dillema

2006-08-29 Thread Martin Wood

So I was wondering what the best method may be to access the model to add a
playlist.
Some say the best way is to create a wrapper function to the MusicPlayer
class, that simply runs the method of the model. But then I need to create
extra kinda useless functions in the MusicPlayer class.
So what would you guys do?


I would add the 'useless' functions :)

dont worry about their content, focus on the API that you are presenting.

If im using your music player and i see

MusicPlayer.addPlaylist

its obvious what its for and i'll happily use it. I dont care if it just 
delegates to the model without doing anything else. Im quite happy not even 
knowing there is a model. :)


Of course you could choose to allow the client code to access the model through 
a MusicPlayer.getModel but you probably dont need to expose that much of the 
internals.

___
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] Actionscript 3.0 compiler Qs

2006-08-22 Thread Martin Wood

of course :)

thanks Chafic and David..

Chafic Kazoun wrote:
 From what I know (And I am no expert on the Flash Player). The way the 
JIT process works, not everything is actually always JITed. Bytecode 
that is executed once may not tget JITed at all. But code that is 
accessed multiple times or deemed as a performance botleneck will get 
JITed. The main motivation behind this would be to reduce application 
perceived performance by interpreting some code rather than Jitting 
which would alleviate the user from having to wait for the JIT process 
to complete. This is most apparent on application startup where if the 
user had to wait for everything to go through the entire JIT process, 
things would just seem slow. You see this with the Java runtime although 
Sun has improved this over time.


HTH

Chafic

___
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] working with dynamic images using mysql database

2006-08-22 Thread Martin Wood
if you really want to (or have to) load images from the database then you'll 
need to look at the server language you are using and find out how to send the 
correct headers then send the image data.


Its probably easiest to get it working by displaying the images in a html page 
first, then just use the working url in your loadMovie call.


bhasker u wrote:

HI, all

I was trying to incorporate a small interface in my flash site where I 
would

like to load 9 thumbnails(images) in 3*3 grid, when ever the mouse moves on
to thumbnails should able to show the enlarged view in given space defined
beside the thumbs, loading the images from a folder is quite simple but 
here

iam interested to *load images from databse* using mysql.

can any one of u plz help me on this.



--
Martin Wood

http://relivethefuture.com/choronzon
___
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/Actionscript Coding conventions

2006-08-22 Thread Martin Wood

that lead me down some interesting paths...I didnt know there were 2 versions...

Im still not a fan of that style of Hungarian notation but I can see the 
benefits of the 'original' :


http://www.joelonsoftware.com/articles/Wrong.html

you learn something new every day :)

Mark Lapasa wrote:

I find Hungarian Notation to work well in ActionScript 2.0

http://en.wikipedia.org/wiki/Hungarian_notation

___
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] How does registerClass() / registerClassAlias() work internally?

2006-08-21 Thread Martin Wood



Marcelo de Moraes Serpa wrote:

It always intrigued me how this method worked internally. First, when I
register this (AS2):

Object.registerClass('mylinkageid_or_myobjectname',myclass);

1)How does flash knows that each time I create a new instance of the
object/movieclip symbol it should attach it to the class specified? Is it
internal to the Flash Player OR is it implemented in pure ActionScript? 
Does

Flash keep a kind of a dictionary list or hash table to keep all these
values?


I believe it is internal to the flash player. The same mechanism is used for 
local shared objects. I dont know how its stored or how it works and i've not 
noticed anything relating to it in the remoting source code that they provide.



2)What also defies me is how does flash automatically instantiates the
correct Value Object class when you use a application server such as AMFPHP
1.2... does AMFPPHP send a class namepsace metadata together with the 
object

and the flash remoting engine reads that and then applies the correct class
depending on the class that has been registered with registerClass() /
registerClassAlias() (Flex 2)?


exactly.

if you look at the AMFPHP source (or some AMF specs...i just have the source to 
hand) you'll see that the classname is written into the AMF packet by the 
serializer :


$this-writeUTF($classname); // write the class name

(in AMFSerializer.php)

the player then reads the AMF packet, decodes the class name and instantiates 
that type for you.


thanks.

Martin
___
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] Actionscript 3.0 compiler Qs

2006-08-21 Thread Martin Wood
Does the compiled code get recompiled during runtime to machine code 
(like a JIT compiler) or does it get interpreted?


Some Adobe presentation on the subjet was saying that all the code get 
JIT'ed, except the $iinit and $cinit functions which are the one 
defining the classes and initializing their static variables.


I just read that the other day and was wondering why?

Personally I cant really think of why constructors and initialization should be 
interpreted and not JIT'ed but im sure someone can think of good reasons.


this is the paper if anyone is interested :

http://www.onflex.org/ACDS/AS3TuningInsideAVM2JIT.pdf


thanks,

Martin
___
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] Question about __constructor__

2006-08-18 Thread Martin Wood
The first thing to understand is that AS2 uses the same bytecode as AS1. i.e. 
AS2 if just AS1 with pretty makeup and a new hairdo.


This page might help you understand more about __proto__ , .prototype and all 
the weird stuff we did that is thankfully in the past (most of the time) :)


http://www.debreuil.com/docs/ch01_Proto.htm

Helmut Granda wrote:

Erixtekila,

Thanks for the link, I have read the site serveral times during the day
trying to figure this out. but one of the things I saw is that the code
above only helps if you are exporting for flash 5. I still dont understand
what this was used since the program that this piece of software powers was
made with flash MX and export to flash7 so something else could have been
used instead.

Thanks again!

___
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] Play Sound Backwards or in Slow Motion during RunTime

2006-08-17 Thread Martin Wood

nice, follow the trail and you can get source code for doing audio DSP in flash 
9 :

http://www.flashcodersbrighton.org/wordpress/?p=9

I knew it would work :)

Andy Makely wrote:

On 8/11/06, Helmut Granda [EMAIL PROTECTED] wrote:


Does anyone knows of a technique to play a sound backwards or in Slow
Motion
with AS?

So far this task seems imposible, bt I was wondering if some one would
have
some pointers.

Thanks!
...helmut




Andre Michelle knows how to do it in AS3.
Look at F9:audio/scratch

http://lab.andre-michelle.com/

--
andy makely

___
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] how to not overwrite methods, but append functionality

2006-08-11 Thread Martin Wood



Matthias Dittgen wrote:

Hello list,

my tooltip class uses code like this mc.onRollOver = function() {}
to add its tooltip functionality to a movieclip mc. But this way it
overwrites the onRollOver method of mc and disables the functionality
like highlighting.

So now my question (probably a really simple one): How is it possible
to append functionality instead of overwriting? is there something
like super() is for cunstructors?


exactly.

super.onRollOver()

will call the method in the superclass.

martin

___
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] how to not overwrite methods, but append functionality

2006-08-11 Thread Martin Wood
in MyTooltip you can re-assign the onRollOver to another name and call that from 
the new onRollOver, like this :


in MyTooltip

mc.onRollOver2 = mc.onRollOver;

mc.onRollOver = function()
{
   // some stuff here

   // call the original
   this.onRollOver2();
}

thats one way of doing it

martin

Matthias Dittgen wrote:

but it doesn't work for me, because I don't want to get onRollOver
from the superclass ( I don't do an extend). I just want to add some
functionality to the onRollOver of the same instance of a movieclip.

___
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 Lite - what's happening

2006-08-07 Thread Martin Wood
Tony, your clock is set to the epoch (1970)
or its your mail transport agent.

come and join the future :)

Anthony Lee wrote:
 You literally can't buy a new handset in Japan that doesn't support Flash
 Lite.
 
 1.1 and you have to register with the carrier to be a content provider.
___
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] amfphp, identify each calling

2006-08-05 Thread Martin Wood
as far as i know its not possible with any built-in mechanisms, you would have 
to code something yourself..


where and how depends on what you really need to achieve..

martin.

Martin Weiser wrote:

Hello,

is it possible to mark the calling by some identifier, number or string,

so that callings of hte same method with the same responder could be 
distinguished?


thanks in advance

Martin

___
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] amfphp, identify each calling

2006-08-05 Thread Martin Wood



[EMAIL PROTECTED] wrote:

Yes, I think this library is what you're looking for...

http://www.5etdemi.com/blog/archives/2006/03/cinqetdemiremoting-a-tiny-but-useful-remoting-library/ 



steve



nice..id never noticed that...

very useful


martin
___
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] Ignoring error in code on compile

2006-08-02 Thread Martin Wood
do you mean that you want to compile those classes seperately but are getting 
errors when they are referenced?


You could create interfaces for the classes and code to that.

martin

Ramon Miguel M. Tayag wrote:

Hi everyone,

I want to use Screenweaver to create a desktop application.  Just like
the other SWF2EXE programs, you can arbitrarily call an object, like,
swFile.function to access the commands.

The problems comes in when I put these commands in classes and I
compile the classes.  How do I tell Flash to ignore these errors and
continue compiling like those weren't there?

The workaround would be ugly (pointing to the root that contains the
functions), and I'd like to avoid that.

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


Re: [Flashcoders] Problems getting the brightness of a color returned from getPixel

2006-07-29 Thread Martin Wood
to go from a 24 bit number to 3x8 bit colour components you can just shift it 
and mask the bits you need :


var r=color  16  0xFF
var g=color  8  0xFF
var b=color  0xFF

that should do the job.

James Deakin wrote:

Hi Guys,

I'm having some problems with getting the brightness of a color returned
from get pixel. get pixel returns an RGB color as a number which means I 
was

expecting something like three groups of three numbers 255 255 255 or
similar. what I am actually getting back is of this form 14540754 one digit
short.

___
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] sequential tweens ?

2006-07-23 Thread Martin Wood

couldnt you just use 2 methods in your class to control the sequence of tweens?

// Start a tween for a photo
private function tweenPhoto()
{
var animPhotoX:Tween = new Tween (photoStrip[currentIndex], _xscale,
   Bounce.easeOut, 100, 120, 0.5, true);
var animPhotoY:Tween= new Tween (photoStrip[currentIndex], _yscale,
   Bounce.easeOut, 100, 120, 0.5, true);

// Get the tween to call us back when its finished
animPhotoY.onMotionFinished = Delegate.create(this,tweenFinished);
}

// Tween finished
private function tweenFinished()
{
currentIndex++;

if(currentIndex == numberOfPhotos)
{
   // The sequence is complete
   // do something, dispatch an event, call a method etc.. :)
}
else
{
startTween(currentIndex);
}
}

Then to start the whole show just make sure currentIndex and numberOfPhotos are 
setup correctly and call tweenPhoto();


e.g.

private function createPhotos(photolist:Array)
{
// photo creation stuff here

currentIndex = 0;
numberOfPhotos = photolist.length;
tweenPhoto();
}

no need for intervals or anything fancy.

hope thats what you mean.

Martin


jcarlos wrote:

Hi All,

I need some ideas how to workaround the following situation

I have na mc as an holder for some photoStrip   this photoStrip has 
n photos as mcs in it   I want to produce some tween over each one 
BUT the next tween should only begin after the previous has finished


as I don´t know how many photos are ther and as I´m using DepthManager 
class to to set up the photos into the PhotoStrip


I begin using  for in to trasverse the strip but I´m stucked here with 
some clever idea about how to chain these tweens, any help,please ?


___
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] sequential tweens ?

2006-07-23 Thread Martin Wood

// Tween finished
private function tweenFinished()
{
 ...

 else

{
startTween(currentIndex);


oops, this is meant to say tweenPhoto(currentIndex)

my email client doesnt have refactoring support yet ;)
___
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] sequential tweens ?

2006-07-23 Thread Martin Wood
Martin, do not take this personally, I don't mean to sound rude or 
anything, I'm sorry in advance if I do, and your code totally makes 
logical sense and it's 100% correct, but... WHY would someone need so 
much code just to produce sequential tweenings? A bunch of specialized 
functions just to make it work? And then suppose he has an slightly 
different animation he wants to do at the same time, will he need new 
functions, or add parameters to those functions, and so long and so 
forth? Why something so convoluted for something so simple? Simply 
because the tweening doesn't support delays? :(


don't worry i don't take it personally its only programming :)

To me it doesn't seem complicated, just a couple of functions, nothing special 
in either function.


If it doesn't fit the requirements, so be it.

Sorry for the rant, but really, there's a moment you have to use the 
best tool for the task - and I don't mean only the easiest. The tweening 
classes included on Flash are cool and all that, but they're too basic, 
too raw. Why you'd need dozens of lines just to do something that can be 
done with one single line in a pretty straightforward way is beyond me. 
Most of the times I have to build sites, there's so much having to be 
animated correctly that if I resorted to functions and complex callbacks 
any time I needed some kind of sequence or delay, my code would be a 
complete mess and the sequence would be unmaintainable. Now, with delays 
it's as easy as it gets. It's easier to read, debug, write, change, etc.


Don't be sorry, if it upsets you then best to let it out, bottling things up 
isn't good for the soul :)


Anyway, to consider if its easier to change then it really depends on how you 
want to change it. In some cases yes its undoubtedly easier, in other cases i 
think it could be harder but I don't know the API of your tweening classes so I 
cant say.


What if i wanted to trigger something when each tween ends? What if i want to 
perform an action depending on which tween has ended?


Each solution has its pro's and con's so its worth understanding the options and 
the trade offs.


Like i said i don't find functions or callbacks complicated, its the bread and 
butter of programming. The code i showed is an idiom that I've used on a number 
of occasions, not just for sequencing animations but for various things that 
need treating in a consequential manner and aren't all necessarily time based.


My advice is to still use another solution. MC Tween, laco's, Fuse Kit, 
it doesn't matter. Any of them will do the trick. 


Mine too :)

I don't know any of the other animation kits so I couldn't vouch for their ease 
of use, size when installed or performance, but I've heard good things about 
those you mention.


anyway..shop around, its always the way to get the best deal and the solution 
that fits your needs.


Martin.
___
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] Speak into microphone Save as wav to sever, is it possible in Flash9 /AS3/Flex2 ??!

2006-07-22 Thread Martin Wood
If you use FMS then it does indeed store the audio as .flv but its encoded with 
NellyMoser so there isnt a simple way of using that audio in anything else but 
flash.


There is also the open source Red5 project which again records .flv files 
(NellyMoser encoded, not by choice) which of course is free.


There is a supposed 'flv - mp3' converter coming from Adobe but i've only seen 
people talking and waiting for it.


I would love to see a solution that allows you to record audio from flash in any 
usable format (NellyMoser is so limited in availability and usage that to me its 
unusable)


Maybe if enough people shout loud enough Adobe will deliver, but im not holding 
my breath.


blists wrote:

You can do this with flash media server. I think it would save the file as a
flv though, not sure on that point. But you can defiantly record a stream
and save it on the server for later playback/distribution.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of info
nJooyLab
Sent: Friday, July 21, 2006 11:06 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Speak into microphone  Save as wav to sever, is it
possible in Flash9 /AS3/Flex2 ??!

Hey to you all out there, the microphone object in flash player 6 is cool 
but do you know how to save the stuff you say into the microphone on 
to a server as a wav or MP3 file.

___
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's your job title?

2006-03-10 Thread Martin Wood

Capitalist Code-Whore


___
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] compiler not warning (little rant)

2006-03-01 Thread Martin Wood
so why doesn't MMC complpain about that ? i this a legal statement ? i 
know  'o.arguments[1, 2, 3];'

or equivalent would be, but i didn't write that.


as far as the compiler is concerned you did write that because whitespace is 
ignored. e.g.


: code :

var x:Array = [];

x [   0 ]  =  23;

trace  (  x   [0  ]  )  ;

: output :

23

:)

martin

___
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] haXe Flash

2006-02-25 Thread Martin Wood
There's been progress in this domain as well. You should expect haXe 
to be able to get AS3 speed and new APIs quite soon. Plus, you will 
still be able to use haXe to target Flash 6-7-8 player which is not 
the case for AS3.


Of course it's the case with AS3. It's perfectly possible to write AS3 
code that compiles in AS2 too, the problem is, would we want to?


It's apparent if haXe is the matching subset of AS2 and AS3, it won't be 
powerful as neither of them.


i think you miss the distinction between a language and its libraries.

From my understanding the core language will provide most features that are 
available from each of the supported targets, but if you want to make use of 
specific parts of the target platform then you will need to use its libraries.


Its entirely possible to create a unified API that supports some subset of 
target specific features, but I expect that this kind of work would most likely 
be done by the users of haxe, not necessarily by Nicolas.


One advantage of something like haxe is that you reduce the amount of context 
switching your brain has to do as you move between targets. At the moment im 
writing an application that has a flash front end and a java backend.
Now they are fairly similar languages but I still have to re-adjust my brain as 
I move between the two.


And another problem is that I end up duplicating a lot of concepts and code that 
represent data and business processes (which generally have little dependencies 
on target specific libraries).
Sure some of this can be automated, but I really like the idea of being able to 
create my value objects once, in one language. Same with business processes and 
other application logic.
Im sure you will have heard the hot new acronym DRY. Dont repeat yourself. With 
haxe you can take that idea and apply it across all targets where appropriate.


less code = less bugs.

personally i think its a great idea. Its not for everyone of course and you are 
right in that there is a certain barrier to using some aspects of it as its not 
yet likely to be found as part of some cheap hosting deal, but for those of us 
who have control of our deployment servers it offers a great opportunity.


A great quote I often remember which Nicolas should put as his sig :

'don't bite my finger, look where i am pointing'


thanks,

Martin
___
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] OT: Design patterns

2006-02-23 Thread Martin Wood

Take a look at this interesting interview of Erich Gamma about Design
Patters (How to use):

http://blog.itpub.net/post/1087/48817


thats really good.

definitely worth reading for anyone with questions about design patterns.


:)

Martin.
___
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] Installing Custom Ant Tasks in Eclipse

2006-02-23 Thread Martin Wood

this article has a small section on using custom ant tasks in eclipse :

http://www-128.ibm.com/developerworks/opensource/library/os-ecant/

it might help..

martin


John Mark Hawley wrote:

There doesn't seem to be a simple tutorial for actually getting custom Ant 
tasks installed and running. Even as2Ant leaves you out to dry when it comes to 
actually getting it to work the first time. Any help?

Has anyone else on the list experimented with the Prebob preprocessing Ant 
task, or custom Ant tasks in general in Eclipse? I can't seem to get mine to 
work...I have a feeling it's because I don't have the java SDK installed, and 
no one else is running into this because mot of the Flash devs fooling around 
with Ant and Eclipse in the first place are also developing Java occasionally. 
(UPDATE: well, installing the SDK, and making sure Ant could see tools.jar did 
squat.)

In Eclipse-Preferences-Ant I can see the preprocessor task is defined.

Vanilla Ant builds are working 100%, but ant tasks installed as Eclipse plugins 
don't work when built, they just croak and give a massive, unhelpful Ant error.

___
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] OOP Concepts

2006-02-21 Thread Martin Wood



[EMAIL PROTECTED] wrote:

This is my first experience use the mailing List so I hope this makes sense!
My question is more of a conceptual one regarding oop best practises. If
I have a class which attaches a clip to the stage how can I attach functions
to clips nested inside this clip. Putting code on the attached clip?s timeline
is wrong, I can use;

myClip.MyChildClip.onRelease = function() { stuff };

It works, but seems fundamentally wrong, as I understood it was bad practise
to add methods to an object dynamically. Should I make the class listen for
clicks on the nested clip or is there another solution?


I don't see anything wrong with that. The only thing i would do is to use 
Delegate instead of the function declaration so that you can control the scope 
of execution.


It might make sense to contain the behaviour of this child clip into a class of 
its own if its used for more than just event notification, but theres no hard 
rules as to when you should do this.


Personally I would think about what the child clip is doing. What are its 
responsibilities. If they can be neatly contained in a Class which can 
encapsulate the implementation details away from the users of the child clip 
then I would make a new Class for it.


The only other point to choose here is more a matter of style, do you inherit 
from movieclip or do you use composition.  I avoid inheriting from movieclip 
because i feel its more trouble than its worth once you start creating 
subclasses and dealing with initialization order.


thanks,

Martin
___
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] seeking :: Oscillating SineWaves via Drawing API

2006-02-17 Thread Martin Wood

its quick and its dirty but it should give you something to work with :



for(var n=0;n3;n++)
{
var sinewave:MovieClip = _root.createEmptyMovieClip(sinewave + n,n+1);

sinewave._y = 100;

sinewave.phase = n * 10;
sinewave.frequency = ((n + 1) * 5) / 50;
sinewave.amplitude = 60 - (n * 10);
sinewave.speed = (n + 1) / 5;
sinewave.heightDeviation = Math.random() * 30;

sinewave.onEnterFrame = function()
{
this.phase+=this.speed;
		_root.drawSineWave(this,this.phase,this.amplitude + (Math.sin(this.phase) * 
this.heightDeviation),this.frequency);

}
}

function drawSineWave(mc:MovieClip, phase:Number, amplitude:Number, 
frequency:Number)

{
var numPoints:Number = 80;
var width = 550;

mc.clear();
mc.lineStyle(2,0,100);  

var y:Number = Math.sin(phase * frequency) * amplitude;

mc.moveTo(0,y);

var dx:Number = width / numPoints;

for(var x=0;xnumPoints;x++)
{
y = Math.sin((phase + x) * frequency) * amplitude;
mc.lineTo(x * dx,y);
}
}

you can just stick this into the first frame of an .fla

let me know if you need some explanations.

thanks,

Martin

artur wrote:

its 3 waves that need to appear randomly oscillating in height..

___
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] Dynamic drop shadow

2006-02-17 Thread Martin Wood
btw, have you fixed your clock or is this a cynical attempt to stay at the top 
of my list of flashcoders emails? ;)



martin.

Philip Smith wrote:
Hi Jim, I'd like to check the code out, my email is 
[EMAIL PROTECTED]

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


Re: [Flashcoders] Is this site legit to buy the software???

2006-02-09 Thread Martin Wood

if you follow the WHOIS trail :

http://www.dnsstuff.com/tools/whois.ch?ip=http%3A%2F%2Fwww.tekdealers.com

'NOTE: This domain is registered through register.com, a poor WHOIS provider 
that often violates ICANN regulations and does not provide WHOIS service.'


checking the WHOIS results from register.com gives this :

Registrant:

DomainsByProxy.com

Who's site says :

'...So if you want to keep your personal information private and still retain 
full benefits of domain registration, then a “private registration” is for you. 
Your identity is nobody’s business but ours.'


so, they appear to have done everything they can to avoid being contacted 
directly.

Personally I like the services I use to have some public visibility.

I guess its a case of Caveat Emptor.

Martin.


Søren Christensen wrote:

Good question.
I dont know. But it definitely is worrying that they give you no
possibilities but a online forum to get in thouch with them. No adress nor
phone, email nada...


On 9/2/06 17:45, Jason Je [EMAIL PROTECTED] wrote:


Does anybody know if this site is legit or is it one of those warez site???

http://www.tekdealers.com/?pg=product_detailsref=956846552productID=374

Thank you...

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Is this site legit to buy the software???

2006-02-09 Thread Martin Wood
ok, i know its OT but just for completeness sake so that any of us who are 
considering buying from them (after all the prices are good.)


theres a customer review here :

http://www.bizrate.com/ratings_guide/cust_review_detail__mid--113841,mr_type--1,review_id--8001791.html

thanks,

Martin
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Q:implementing quadtrees

2006-02-06 Thread Martin Wood
So i guess what I'm asking is 
What is the best way to set up the node array(s)? (nested , associative, using objects, etc)


What i would suggest is that when you classify the hotspots, you only create the 
nodes that you need.


For the data structure each node can have 4 children, so a simple array will do 
containing references to its 4 child nodes, or even just 4 member variables if 
you dont want to loop :)


So when constructing the tree you can just create the nodes that actually 
contain hotspots..


e.g. (in the node class)

function classify(hotspot)
{
// flag to indicate if the hotspot is entirely contained
// within a leaf node
var containedInLeafNode:Boolean = false;

for(var n=0;n4;n++)
{
// test bounds of child[n] to see if it can hold the hotspot
if(isInQuadrant(n,hotspot))
{
// Make a new node if we dont already have it.
if(childNodes[n] == undefined)
{
childNodes[n] = new Node();
}   
childNodes[n].classify(hotspot);
containedInLeafNode = true;
}
}

// If none of the leaf nodes 'took ownership' of the hotspot
// then hold onto it here.
if(!containedInLeafNode)
{
candidates.push(hotspot);
}
}

So this will recurse down the tree, making sure that any item is contained 
within the smallest possible leaf node. Of course you'll want to put a limit on 
how small a node can get. How small that is depends on the sizes of the items 
you want to classify, if i remember correctly (which i wouldnt assume i do) then 
the best target size is somewhere just around the size of the smallest object 
you are trying to classify, unless you are classifying lots of very small 
objects relative to screen size then you can just cap it somewhere like 4 or 5 
levels deep.


Then when you come to query the tree for nodes that contain items that may be 
within distance of your draggable object you only need to bother with the nodes 
that exist


for speed you could even not bother with a loop and also take advantage of the 
fact that calling a function on something that doesnt exist wont generate an error :


so instead of

for(i=0;i4;i++)
{
if(childNodes[n] != undefined)
{
   // check childNodes[n] for candidates
}
}

you just do

candidateList.concat(childNodes[0].getThingsThatAreClose(draggableObject))
candidateList.concat(childNodes[1].getThingsThatAreClose(draggableObject))
etc..

anyway, im just typing it out as it comes into my head..some of it from hazy 
memories of implementations past. :)


Theres no real canonical way of working with quadtrees, the beauty is that you 
can adapt them according to your particular requirements.


Id be interested to hear other peoples opinions and experiences or just 'why 
bother, you can do 'x' because its easier and quicker'


thanks,

Martin
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Q:creating a 'snappable' class

2006-02-03 Thread Martin Wood



[EMAIL PROTECTED] wrote:

Hi
I'm creating a 'snappable' class, that would work with a predefined set of x,y 
pairs or 'hotspots'.
When a dragged movieclip was within a 'offset' distance of any of these 
hotspots it would 'snap to' and stop drag.
The best way of doing this I thought would be to simply pass an array of 
predefined x,y pairs as an object into the class when it was instantiated.
However, having to cycle thru an array, especially if there are a huge number 
of 'hotspots', while dragging doesn't seem very efficientcan anyone suggest 
a better way of approaching this?


theres a fair few spatial partitioning approaches around these days, but i guess 
you could do something easy with quadtrees. It depends on how many hotspots you 
have and what shapes the objects are etc..I think the first thing to do is some 
performance tests to see if checking the whole array is too expensive.


If you do need them then quadtree's are quite simple, basically you divide the 
screen into 4, then you can recursively subdivide each section, stopping when 
you think you have a small enough resolution.


Then when you are dragging this clip around you will only need to test for 
proximity to items contained within certain nodes of the tree, not everything on 
screen.


I dont know of any AS2 implementations, but its quite fun to code :)

i've found a few references that should help explain :

http://www.gamedev.net/reference/articles/article1303.asp

http://www.ece.eps.hw.ac.uk/~dml/cgonline/hyper00/model/spacediv.html

theres even a paper on macromedia.com that covers quadtrees

http://www.macromedia.com/devnet/director/articles/collision_detection/collision_detection_lingo.pdf

good luck

martin.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] mx.utils.ClassFinder.findClass problem

2006-02-02 Thread Martin Wood

or just

import com.whatever.Foo;
var foo:Foo;

no need for the :Function, or the assignment.

martin


Ian Thomas wrote:

Whoops - I'm being dim. These will work just as well:

import sk.sowhat.linuxPlayer.play4dogs.Test;
var dummyVar:Function=Test;

or

var dummyVar:Function=sk.sowhat.linuxPlayer.play4dogs.Test; (with no import)

Ian

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Problems with Javascript Integration Kit

2006-02-02 Thread Martin Wood

btw, there's a list just for the js integration kit.

very low traffic, but useful for questions specific to the kit.

http://osflash.org/mailman/listinfo/flashjs_osflash.org

thanks,

Martin


--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Noise Cancelling in Flash

2006-02-01 Thread Martin Wood
i think that theoretically it may be possible to generate real time audio just 
in the 8.5 player.


In the thread about MIDI and the flash player I mentioned an idea for creating 
real time audio streams using 8.5


Basically i think you could do it by using the loadBytes method in 
flash.display.Loader by streaming bytes that represent a streaming swf with audio.


It should work, just needs the code to create the swf header and the right bytes 
to represent the audio tag inside the swf, then it should just be a matter of 
pumping the audio into the byte stream.


I'd love to try it if i had the time.

really, though it would make more sense to have a loadBytes method for sounds as 
well, but i wont go over all the points we covered in that other thread again. :)


martin.

ryanm wrote:

8.5 actually provides write as well as read access to the
waveforms? I haven't looked into it much, but i've only
seen people making visualizations of sounds, not actually
modifying or generating them in real-time.

   I don't know, but there was talk of it at one time. What I said was 
*if* 8.5 provides low-level access, then you can make your own filters. ;-)


ryanm
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Noise Cancelling in Flash

2006-02-01 Thread Martin Wood

David Rorex wrote:

1. can flash load .wav files?


No


2. can loadBytes simulate loading .wav files?


No


if so, it might be simpler to generate a .wav structure than a .swf


thats what would be best, but doesnt look like its currently possible. 
Generating the swf header and audio tags isnt too hard, the information is out 
there...its really only v4 features, its just taking the time to do it..


maybe if i stopped writing emails for a week, the time would add up and id have 
enough time to actually do it ;)


martin.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Dynamic class creation

2006-01-30 Thread Martin Wood

This should do the job.

1. ClassFactory to create classes specified by strings.

code
class ClassFactory
{
public static function create(className:String):Object
{
// Split the class name into its parts
var parts:Array = className.split(.);

// a variable to build a reference to the class
var classRef:Object = _global;

// Iterate over the parts, digging deeper each time
// into the namespace heirarchy
for(var n=0;n  parts.length;n++)
{
classRef = classRef[parts[n]];
}

// Check that the class exists
if(classRef == undefined)
{
throw new ClassCreationException(Class not found :  + 
className);
}
else
{
return new classRef();
}
}
}
/code

2. The Class Creation Exception, nothing special :)

code
class ClassCreationException extends Error
{
public function ClassCreationException(msg:String)
{
message = msg;
}
}
/code

and some test code to check it works :

code
var className:String = com.test.MyClass;

import com.test.MyClass;
var c:MyClass;

try
{
var c:Object = ClassFactory.create(className);
}
catch(e)
{
trace(e.message);
}
/code

of course, you need the reference to the class you want to create somewhere or 
the compiler wont include it when it builds the swf, hence the


var c:MyClass line.

for me thats the worst part of the whole thing, but theres ways you can organise 
this, e.g. a simple include that just lists the declarations you will need


#include forceIncludes.as

which just contains a list of the references

im sure there are other solutions to this little problem, if anyone else has any 
bright ideas id like to know.


Of course, the other part of this is that the class factory can only return 
objects that are typed as 'Object' so you lose quite a bit of type safety like 
this, unless of course you are creating objects that all conform to a specific 
interface. You might want to modify the class factory to add methods that return 
particular types of objects with a return type set to their common interface. It 
depends on what your requirements are really on how you architect this part.


hope that all makes sense.

thanks,

Martin


franto wrote:

Hi all,

maybe it is easy, maybe not, but i cant figure it out now, and i need it :)

when i got class e,gpkg1.pkg2.pkg3.className

i can make new instance in this way
new pkg1.pkg2.pkg3.className()

but i want to make it from string

this dont work of course
_global['pkg1.pkg2.pkg3.className']();

but this work:
_global['pkg1']['pkg2']['pkg3']['className']();

can this done automatcally? i want jsut read string from XML and
create new class instance,
but i cant do it now.
Any help is appreciated :)

-
Franto

http://blog.franto.com
http://www.flashcoders.sk
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] nested MC not firing event

2006-01-26 Thread Martin Wood

So you have something like this :

MC_A --¬(uses mouse handlers)
MC_B(also uses mouse handlers)

Where A is B's parent but A has some handlers defined and none of the handlers 
in B will work.


The way around it is to introduce a common parent to A and B which has no mouse 
handling, its just a container. So A is no longer the parent of B


CONTAINER --¬
 MC_A (contains some mouse handlers)
 MC_B (contains other mouse handlers)

then both A and B's handlers will work.

thanks,

Martin

Kent Humphrey wrote:
What I can never manage to do is put buttons inside the revealing MC. 
Even a simple test like trace(this) does nothing. I think it's because 
the (rollOver)/(rollOut) script on the parent of the button is 
conflicting with the event being sent by the child. The mouse cursor 
certainly remains the same (finger) over the whole revealed shape.






--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] checking combinations

2006-01-26 Thread Martin Wood

one reason, you get type checking when you declare the handlers

handlers[some string] : contents of 'some string' arent checked

handlers[STATE_A | STTE_B] : Compile error : STTE_B is not declared.

the other reasons are habit and familiarity :)

Im used to seeing and working with code for handling states that uses all that 
bitwise stuff because of working in other languages where its more common (e.g. 
c++). If you feel more comfortable with string based solutions thats all good, 
but like i said, the one point where they differ is that the compiler doesnt 
check the contents of a string, so a typo can go un-noticed.


thanks,

Martin


Andreas Weber wrote:

Nice!
And I was determined not to post again, but at a certain stage my mental
block irresistibly kicked in again:
why ingeniously bit-wise encode the combinations just to later decode them
for better readabilty?

Why not drop this altogether as we won't do any encoding:
static var STATE_A:Number = 1; //  1  0

Define the handlers like
handlers = {};// or type it/ make it a class
handlers[STATE_A] = Delegate.create(this,handleAOnly);
// etc.

And finally:

 public function handleUpdate(a:Object,b:Object,c:Object,d:Object)
 {
state = 'STATE_';
if(a.selected){ state += 'A'};
if(b.selected){ state += 'B'};
// etc.

handlers[state]();
 }

What's the benefit of encoding/decoding numbers? Please enlighten me!

Cheers!
--
Andreas Weber
motiondraw.com


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] checking combinations

2006-01-25 Thread Martin Wood
i've got to go out now so cant give the full answer i have in my head, 
but one way of tackling it is to make each state variable's value a 
power of 2


a = 1
b = 2
c = 4
d = 8

then you know that any combination of them has a unique value. (its 
basically a 4 bit number)


then to handle the dispatch depending on the state combination you can 
build a function table.


functionTable = new Array();

// create a handler for the combination a + b
functionTable[a + b] = Delegate.create(this,combinationAB);

and when you check the variables just call the function directly from 
the table :


// a,b,c,d are just passed as boolean flags here
function handleUpdate(a:boolean,b:boolean,c:boolean,d:boolean)
{
// taking advantage of a true being 1 in flash
// and ideally you would setup these numbers
// as static class variables
var state = a + (b * 2) + (c * 4) + (d * 8);

// call the defined function
functionTable[state]();
}

of course you could do a check first to see if the function is defined 
and do something like log a warning or whatever is appropriate for your 
situation.


hope that makes sense.

martin

eric dolecki wrote:

I have 4 variables I need to check the states of routinely... and
combinations thereof.

I am assuming that if I have a counter, and interogate and += them values, I
can then check the value of the counter to determine the combinations.

psudeo-code:

var counter:Number = 0;
if ( a ){ counter += 2; }
if ( b ){ counter += 3; }
if ( c ){ counter += 6; }
if ( d ){ counter += 12;}

if ( counter == 2 ){
 // only a was true
} else if ( counter == 3 ){
 // only b was true
}  ...

Which is fine, but thats gonna be one honkin' if else statement to catch all
the combinations.




Is there a better way of doing this that will catch all the possible
combinations in an elegant way?

- edolecki
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: SV: SV: [Flashcoders] Microsoft Sparkle

2006-01-25 Thread Martin Wood
   Oh, and your rant about forcing people to use PC hardware, WTF? What 
platform *doesn't* use PC hardware these days?


you mean intel chips? or the usual pc architecture?

things like phones and other mobile devices, non microsoft gaming 
platforms for example.


anyway, its a sparkle thread again, im a bad boy for even joining in.

maybe a new list 'sparkleflames' is in order. :)
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flex expires... what then?

2006-01-22 Thread Martin Wood

they have said there will be a public beta (on the flexcoders mailing list)

martin.

matti bar zeev wrote:

hey list,
I was just wondering, my Flex Builder 1.0 alpha is about to expire, as, I
guess, most of yours are.
my question for Adobe is: are you gonna release a new imporved version? are
you gonna release another version at all? are you gonna prolong the
expiration date?
what are the plans?

thnx,
flashmattic.


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Documenting my code

2006-01-19 Thread Martin Wood

I hope that NaturalDocs does get around to supporting JavaDoc, because in my
test of doc tools over the last week or so it looks like the best fit for me
- it actually runs on my Linux server, whereas most other things are either
Mac or PC based or, like as2api, just cause me server errors. I'm trying to
integrate a doc-tool in to our SVN setup (so that nightly up-to-date docs
are built) and am having no luck at all. At the moment I'm having to run
something scheduled on my Windows box to achieve it.


out of curiosity how are going about this on the linux box?

I implemented a system a while ago to do nightly documentation builds on 
a linux box, but my system was based around CVS / Doxygen.


Basically, I wrote a python script that was called as a cron job which 
checked out all the projects from CVS, ran doxygen on them and copied 
the output to a local web server..


Unfortunately i dont have access to the code anymore because it was 
built for my previous employer but im keen on getting something working 
for myself that uses SVN and produces docs for AS2 code (as well as 
Java, even if that means using seperate tools..)


the nice thing about using doxygen (after a bit of configuration work) 
was that the documentation for seperate projects was linked together.
e.g. If project B depended on project A (a library) then you could 
follow links from B to the relevant places in A. (and you got diagrams 
for free..)


I'd be interested to see if anyone has some configs for doxygen that 
work well with AS2, or if you think that a specific AS2 module for 
doxygen is needed..


thanks,

martin.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Scope Chain in AS2

2006-01-16 Thread Martin Wood
basically in AS3 you dont need to use Delegate, so you can do things 
like pass method references to other objects which will be called within 
the correct scope. I think the same applies to declaring anonymous 
functions (like the classic myXML.onLoad = function() {...})


e.g.

class SomeClass
{

private var x:Number = 20;

function someFunc():Void
{
// handlerFunc method will be called with the correct scope.
// So no need for delegate.
someObject.addEventListener(handlerFunc);
}

function handlerFunc(event:Event):Void
{
// Can call doSomething and manipulate x because we were called
// with the correct context.
this.doSomething();
this.x += 20;
}

function doSomething():Void
{

}

}

does that help? or have i misunderstood?

martin

Judah Frangipane wrote:
   From what I've read, it appears that Action Script 2.0 follows the
implementation.  But the information at the link below keeps me from 
adopting this description.


quote,
Event handling is simplified in ActionScript 3.0 thanks to its built-in 
delegation. In ActionScript 2.0, method closures would not remember what 
object instance they were extracted from, leading to unexpected behavior 
when the method closure was invoked.
http://labs.macromedia.com/wiki/index.php/ActionScript_3:overview#Delegation 



Can someone please put this into context?

Best Regards,
Judah Frangipane


--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Alpha fading a dynamic text field

2006-01-15 Thread Martin Wood

just remember to embed the font :)



Adrian Lynch wrote:

I can't for the life of me remember if I've done this before, and if I had
problems with it in the past.

Can you programatically fade a dynamic text field, for example with
tf._alpha = 50?


--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Adding Texfield to MovieClip via Composition Class

2006-01-12 Thread Martin Wood

looks like you need to make tab_mc a member variable of the class.

then if you are having problems try tracing tab_mc as soon as its 
created, as well as the other parameters that you are passing in. Make 
sure they all have the correct values.



Martin

Dennis Hart wrote:

I am having a problem with adding a text field to an attached movieClip
through a class construct using composition.

For example:

class Tab {
public var label_txt:TextField;
public var tab_fmt:TextFormat;


--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Creating An OOP MC Via Composition

2006-01-11 Thread Martin Wood

passing the target into the constructor.

martin.

Chris Kennon wrote:

Hi,

I attempting to create a mc, then attach a textField via composition,  
instead of extending the movieClip class. Could someone point out  what 
I missed?


--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] flv - avi/mov/mpg ?

2006-01-09 Thread Martin Wood

come down from there at once Hubert...


youre just a sticky river.

:)


 Hubert Cumberdale wrote:
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] XML GALLERY

2005-12-20 Thread Martin Wood

looks like your xml and your code dont match.

the debugger says your xmlnode has attributes thmb and main, your code 
says 'swf' and 'link'


?

maybe thats it.

martin


Jose Maria Barros wrote:

ups..sorry..forgot..well...it doesnt download the thumbnails..here is
the code in the debugger

Variable _level0.picHolder = [object #6, class 'XMLNode'] {
foto thmb=imagens/img3.jpg main=imagens/img3.jpg /
  }
Variable _level0.thumbHolder = [movieclip:_level0.thumbnails.thumbnail8]
Variable _level0.thumbLoader = undefined

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Scaling text using ActionScript

2005-12-17 Thread Martin Wood

You have to embed the font to manipulate it in that way.

martin

Chris Gaelic wrote:

I can get it to work if I use a truetype font like Arial set up as static
text. The text then stretches inside the movie clip. However, if I change
the text type to Dynamic - because I want to change it using ActionScript -
then it no longer stretches with the movie clip.

Thanks, Chris  


--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Who wants MIDI in the Flash Player?

2005-12-14 Thread Martin Wood
I urge you to get someone to have a good read through the discussion. 
There was a lot of good input and i think improving the audio 
capabilities of flash would be a huge step forward for what i consider 
to be the most neglected aspect of flash.


Or, if all else fails then persuade adobe to buy these guys

http://www.fmod.org/

:)

Thanks. In the recent rush I haven't been able to read Who wants 
MIDI? much less abstract it.


Were you able to get a sense from the whole list of (a) which specific 
MIDI (or MIDI-like) features  implementations are most desired; and 
(b) how much they'd be willing to pay for this in player size?


Do you know what size of MIDI engine would work best for you, for 
which MIDI abilities, for instance?



--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Class SimpleDateFormat

2005-12-13 Thread Martin Wood

theres one here

http://osflash.org/openclasslibrary

Scott Hyndman wrote:

Macromedia did. I just can't remember where to get it or find any reference to 
it on their website.

Can anyone remember or find information?

Scott

-Original Message-
From:   [EMAIL PROTECTED] on behalf of Wade Arnold
Sent:   Mon 12/12/2005 2:55 PM
To: Flashcoders mailing list
Cc: 
Subject:[Flashcoders] Class SimpleDateFormat

Has anyone ever implemented a similar class to the SimpleDateFormat in 
actionscript? I am working on a validator input text component and 
would love to have some of these java classes?!!? Please let me know if 
you have seen anything like this.


http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html

--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Version control software?

2005-12-13 Thread Martin Wood
I do all of my work remotely and have setup SVN access for all the 
people involved in the project.


After a 10 minute guide to tortoise svn all the non-programmers were 
happy, and they have now got out of the habit of having mutiple copies 
of files with incremental names like schedule_rev23 because the 
revisions are managed automatically.


We use it for everything project related, specification documents, 
schedules, code, .fla's.


Its great having https access as well so if someone needs to just view 
one or two files i can send them a link and some guest account details.


If you are thinking of setting up an SVN server yourself i personally 
prefer using debian. And this page can get you up and running in no time.


http://www.geocities.com/arhuaco/doc/subversion/apache-subversion-in-debian.html

although i use a slightly different config in apache (the SVNParentPath 
directive, to allow easy control of multiple repositories)


something like this :

Location /svn
DAV svn
SVNParentPath /opt/svn
AuthType Basic
AuthName My SVN
AuthUserFile /opt/svn/.dav_svn.passwd
Require valid-user
/Location

thanks,

Martin

Ian Thomas wrote:

Hi Danny,
  SVN and CVS work happily for remote access, too...

Cheers,
  Ian

P.S. Bought the book, by the way - just haven't had time to read it. :-)

On 12/13/05, Danny Kodicek [EMAIL PROTECTED] wrote:


We've been quite happy with FTPVC, which is a system based on your FTP
site.
It's very useful when you're working with freelancers and others who need
to
be offsite. A few quirks, but it's cheap, it works pretty well and has a
decent UI too.

Danny



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Custom Comboboxes

2005-12-12 Thread Martin Wood

you might like tinyurl.com :)

it turned that into this :

http://tinyurl.com/athba

Ben Smeets wrote:

Anybody know if the kind of comboboxes used in this productselector MM
thingie:

http://www.macromedia.com/cfusion/store/index.cfm?store=OLS-EUview=ols_
prodcategory=/Software/Server/StandAlones/FlashRemoting#loc=en_xeurang
eUpper=6%2C0%2C65%2C0HTMLVerRedirect=truereturnURL=%2Fcfusion%2Fstore%
2Fhtml%2Findex%2Ecfm%3Fstore%3DOLS%2DEU%26event%3DdisplayProduct%26categ
oryPath%3D%2FSoftware%2FServer%2FStandAlones%2FFlashRemotingstore=OLS-E
Uview=ols_prodcategory=/Software/Server/StandAlones/FlashRemotingview
Name=Macromedia%20Products%20Store%20%2D%20EuropepageNotFound=0

(wow what a url...) are creatable with v2 components in the flash 8 ide?
Or are these kind of comboboxes only present with flex builds? 


Any examples to styled comboboxes would also be appreciated. Tx in
advance :)

Ben
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Custom Comboboxes

2005-12-12 Thread Martin Wood
oh, not quite, it didnt like the line breaks, anyway it ended up at the 
same page :)


Martin Wood wrote:

you might like tinyurl.com :)

it turned that into this :

http://tinyurl.com/athba

Ben Smeets wrote:


Anybody know if the kind of comboboxes used in this productselector MM
thingie:

http://www.macromedia.com/cfusion/store/index.cfm?store=OLS-EUview=ols_
prodcategory=/Software/Server/StandAlones/FlashRemoting#loc=en_xeurang
eUpper=6%2C0%2C65%2C0HTMLVerRedirect=truereturnURL=%2Fcfusion%2Fstore%
2Fhtml%2Findex%2Ecfm%3Fstore%3DOLS%2DEU%26event%3DdisplayProduct%26categ
oryPath%3D%2FSoftware%2FServer%2FStandAlones%2FFlashRemotingstore=OLS-E
Uview=ols_prodcategory=/Software/Server/StandAlones/FlashRemotingview
Name=Macromedia%20Products%20Store%20%2D%20EuropepageNotFound=0

(wow what a url...) are creatable with v2 components in the flash 8 ide?
Or are these kind of comboboxes only present with flex builds?
Any examples to styled comboboxes would also be appreciated. Tx in
advance :)

Ben
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders





--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Who wants MIDI in the Flash Player?

2005-12-11 Thread Martin Wood
One thing that i think could be added to the Sound class now which would 
help in creating audio applications in flash is to have a 'polyphony' 
setting.


if i make a new sound object and want to control how many voices it uses 
it would be great to just say :


var snd:Sound = new Sound();
snd.polyphony = 1;

and know that every time i call play it will automatically cut the last 
playing sample, rather than having to call stop.


Similarly i could use a higher polyphony to control how many channels 
that sound object can use before it starts to re-use old ones when play 
is called.


The problem is that when too many samples are playing the whole audio 
system just shuts down.


Also what would be handy is to get a report on how many channels are in 
use and how many are spare, maybe a couple of static functions


Sound.channelsInUse and Sound.availableChannels

so at any time i can find out :

var spare:Number = Sound.availableChannels - Sound.channelsInUse;

and limit the creation of sound channels to have certain polyphony so i 
dont overload the system.



just some more ideas that would help in making audio applications :)

thanks,

Martin

Thank you everyone for the great response.  I will put together a 
summary of

this conversation and respond or post it to my blog for your approval.  I
want to make sure it's a fair and unbias (as much as possible)
representation of the developer community before I send it off.

Thanks again!

Tyler


--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3 and duplicateMovieClip

2005-12-08 Thread Martin Wood

youre absolutely right. at last you can re-parent clips :)

Sascha Balkau wrote:
Thanks for pointing me to the migration section! I see now theres all 
kinds of methods replaced by OOP structuring. And I guess that means 
that movieclips can be duplicated to anywhere beyond it's own container 
in AS3! Correct me if I'm wrong!


Sascha




--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Who wants MIDI in the Flash Player?

2005-12-08 Thread Martin Wood

This is another side which would be great to open up.

It would be amazing to integrate flash with MIDI controllers and audio 
software. I've thought of many interfaces to control audio which would 
be a lot easier to create in flash.


Also i can imagine some amazing interactive work combining flash and the 
jazz mutant lemur.


mmm, the lemur...

http://www.jazzmutant.com/lemur_overview.php



Jason Cunliffe wrote:

oops, I forgot to include links to the I-CUBEX set of MIDI sensors

http://infusionsystems.com/catalog/all_categories.php?osCsid=540ddd8aa0ac63e6fb8054c988afefd4 



and to Alcorn McBride Show Control equipment
http://www.alcorn.com/products/showcontrol/index.html


Jason

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Who wants MIDI in the Flash Player?

2005-12-08 Thread Martin Wood
Sure, it can already be done without binary sockets using a simple xml 
socket based server which translates whichever protocol to and from XML, 
for instance theres already flosc, a flash / java solution for OSC 
communication, and the same idea can be done for MIDI...but it would 
just be nice to minimise the number of pieces in the puzzle. :)


still, my main interest is still in getting better sound in flash itself.

I agree with you in that i see no reason not to allow access to the 
sound buffer of flash itself. Its no different from writing bitmap data.


thanks,

Martin

hank williams wrote:

Of course, in thinking about this, with the new binary socket
functionality, midi control could all be done by just writing a simple
localhost to midi gateway. This would be pretty simple to do, and is
probably what is needed anyway to deal with different drivers etc. And
it makes total sense that if you want to control some local hardware
that you need to download a piece of software.

problem solved!!  :)

Regards
Hank

On 12/8/05, Martin Wood [EMAIL PROTECTED] wrote:


This is another side which would be great to open up.

It would be amazing to integrate flash with MIDI controllers and audio
software. I've thought of many interfaces to control audio which would
be a lot easier to create in flash.

Also i can imagine some amazing interactive work combining flash and the
jazz mutant lemur.

mmm, the lemur...

http://www.jazzmutant.com/lemur_overview.php



Jason Cunliffe wrote:


oops, I forgot to include links to the I-CUBEX set of MIDI sensors

http://infusionsystems.com/catalog/all_categories.php?osCsid=540ddd8aa0ac63e6fb8054c988afefd4


and to Alcorn McBride Show Control equipment
http://www.alcorn.com/products/showcontrol/index.html


Jason

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Who wants MIDI in the Flash Player?

2005-12-07 Thread Martin Wood
Interesting question, although ive made use of midi everyday for, well, 
too long now :), im really not sure if making it part of the player as a 
single functional unit would be the best move.


Personally i would rather see a more open, low level approach to sound 
in the player upon which MIDI and other implementations could be developed.


Now that the player (8.5 and onwards) will have much better binary data 
handling, theres nothing to stop me or you from creating a MIDI file parser.


Thats one side of the equation, obviously the more intricate side is 
audio playback.


I've been moaning about the audio capabilities of the flash player for 
longer than i can remember, and would dearly love for it to become much 
more capable.


The options i can think of so far are (and they arent exclusive)

1. An api for accessing midi devices on the user system, much like 
accessing a webcam, where you can query for which devices are present, 
then get a handle to a device and start manipulating it, something like:


var midiDevice:MidiDevice = Audio.getMidiDevice(1);
var instrument:Instrument = midiDevice.createInstrument();
instrument.setChannel(1);
instrument.setProgramNumber(34);
instrument.setController(23,44);
instrument.noteOn(velocity);
etc...

2. ACCESS TO THE SOUND BUFFER. Please. :)

This would open up a lot more possibilities for audio generation, 
manipulation etc..


The 8.5 player already has a Loader.loadBytes feature where you can send 
binary data locally, i.e. you can create a jpg in the player and then 
load it into a movieclip without sending it to a server. This is great, 
but I think a similar scheme for audio would be fantastic.


With a simple sound.setBuffer(binaryData) you could do a huge amount of 
interesting things.


Sound synthesis, generation.

	From musical applications, to game sound effects, or just sound 
notifications within applications. All of this could be done with a 
minimal impact on filesize. No need for .wav's , mp3's etc..


Sound capture

	You could capture audio from mic and allow the user to edit it and 
process it. You could build annotation tools, voice messaging, musical 
applications etc..


	Also if you can get a handle on the audio stream before it hits the 
audio device you could have live control over streamed audio, tone 
controls, reverb, delays, echo cancellation, noise reduction. etc..


So, personally I would rather see the components available to us as 
developers, upon which we can build a variety of applications. MIDI 
playback being just one particular application of the feature set.

Also other similar systems like OSC could be used.

anyway, im glad you are asking and i'll happily contribute anything to a 
document you will put forward requesting audio related capabilities.


thanks,

Martin


Tyler Wright wrote:

The Flash Player has evolved through the ages to provide the most needed
functionality.  Through each version there have always remained a few common
goals.  What I have found is that:

Flash is small -- from the player itself to the swf file format to the
assets it is optimized to load, focus has been placed on small file sizes
(this of course is not as apparent in many websites that are heavy in
multimedia)

Flash supports standards -- the player supports many web and multimedia
formats standard in the industry, such as jpg, mp3 and xml

Flash is interactive -- the players greatest strength is the dynamic
behavoir through ActionScript to allow user interactivity

MIDI, a music standard format that most computers support today, fits all of
these categories (like a glove).  In fact there's an opensource project
being developed to allow MIDI through Flash, though it requires an
additional download and install to the user apart from the Flash Player
itself (seen at osflash.org)


--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Who wants MIDI in the Flash Player?

2005-12-07 Thread Martin Wood

On another note I also think, particularly with the speed of 8.5, that
it would be great to give us direct access to the sound buffer. I am
not sure how fast 8.5 math will be but if you can do a good FFT we
could be making actual synthesizers and audio processors in flash. To
me that would be cool.


absolutely,

the 8.5 player already has an FFT (aka sound spectrum) function built 
in, but i think its buggy (this is what i have read, ive not tried it yet)


Now, if they would add an inverse FFT as well then it would be 
fantastic. It would definitely take a load off the actionscript 
processing required if they were implemented natively.


but at the very least access to the sound buffer would open up a whole 
new world.


:)

martin
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] flash and ASP.NET

2005-12-07 Thread Martin Wood

does it have to be asp?

you can run php on IIS and php has ODBC libraries

http://us2.php.net/odbc

so flash - amfphp - ODBC

bingo.

:)

also you can run apache on windows, you dont have to run IIS.

It depends on what your constraints are i suppose.


martin

Serge Jespers wrote:

Have a look at http://www.openamf.org
Don't know if this can help you but it's also a third party remoting  
solution.




I need to create a Flash application for a small non-profit can't  
afford the

$999 price tag of MM's Flash Remoting gateway. Is there a third party
remoting solution like AMFPHP that I could use? Essentially I need  to 
read

and write to an Access database on a Windows web host.

Thanks for any suggestions and pointers to examples for this.

Michael
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Who wants MIDI in the Flash Player?

2005-12-07 Thread Martin Wood



hank williams wrote:

Why bother with compression. This just creates more processor
overhead. a minute of cd quality sound should be 10mbytes. This is not
so bad. I dont know if flash would have any memory issues with this
but I doubt it. In any case it could be chunked. But then the issues
is whether it is possible to effectively sync separate tracks. Because
if it is then You dont have to worry about doing one big sound file
which would reduce memory needs.


good point, for some mistaken reason i was thinking that you couldnt put 
uncompressed audio data in a swf. im getting old and my memory isnt so 
good these days. :)



But I am really curious about this loader thing. I am not really aware
of it. It sounds like a huge deal.


see the link to Guy's page, also from the docs :

loadBytes Method

public loadBytes(bytes:ByteArray) : Void
Loads from binary data stored in a ByteArray object.

Parameters
	bytes:ByteArray — A ByteArray object. The contents of the ByteArray can 
be any of the file formats supported by the Loader class: SWF, GIF, 
JPEG, PNG.


from http://livedocs.macromedia.com/labs/1/flex/langref/index.html

i think its a really significant addition, lots of possibilities :)

now all we need is an actionscript API for creating SWF's in the player.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Targeting when using for loop

2005-12-01 Thread Martin Wood

i think you might need to lose the first .

my_pane.content[product_+i][color_+j].loadMovie(someUrl);

martin

Mike Boutin wrote:
I am trying to target an object inside my scrollpane.  This is what im 
trying to achieve:


my_pane.content[product_+i].[color_+j].loadMovie

What is the correct way to target a movieclip in this way?


Thanks!
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] warp dynamic text in flash 8 with filters or script

2005-11-30 Thread Martin Wood
maybe a good idea to say what you currently know how to do, and if you 
are after a specific technique or just a general guide to manipulating 
bitmaps.


generally I think you would probably take the route of creating a bitmap 
from a dynamic textfield and then processing and filtering the bitmap data.


Theres info in the docs here about bitmaps in flash 8

http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=1527.html

http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=1942.html

and a tutorial from Guy Watson here

http://www.macromedia.com/devnet/flash/articles/image_api.html

thanks,

Martin

rishi wrote:

Hi

I want to warp dynamic text in flash 8 with filters or script

Regards
Rishi



--
Martin Wood

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Blitting, Double-Buffering, and Other Bitmap Methodologies

2005-11-23 Thread Martin Wood

There's a good series of articles on gamedev.net :)

http://www.gamedev.net/reference/list.asp?categoryid=45#200

The Game Programming Genesis series.

In a lot of cases the 'magical render' is performed by a render manager, 
the entities themselves dont do rendering, they are maintained in a list 
(perhaps in a World class) and the render manager just redraws whatever 
is on the list.
Or you could set it up so the renderer orchestrates the rendering of the 
entities, i.e. it scans the active display list and calls draw() on an 
entity that survives the clipping tests.


martin

JesterXL wrote:
...here's where things break down for me.  I'm not used to coding like this, 
so don't really know the best pratice ways to go about it.  For example:

- how do I handle depth?  last draw wins, so do I manage depth myself?
- how do I handle move, and x and y change operations?  They don't affect 
the bitmap the sprite is blitting to, but they do affect the one they are 
on... events the parent listens to maybe?

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Xml editor

2005-11-22 Thread Martin Wood
for anything thats part of a project I use Eclipse and the free version 
of XML Buddy


http://xmlbuddy.com/

if i just need a quick edit then i use editplus (for any type of text file)

http://www.editplus.com

martin

Patrick Matte wrote:
What software do you people use for editing xml for your flash projects ? 



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--
want to know what i think? probably not

http://relivethefuture.com/choronzon
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


  1   2   >