RE: [Flashcoders] E4X, it's just not my day.

2010-02-05 Thread Alan Watts

Your artistBio closing tag is /artist, making it invalid XML.

Hope it helps!
Alan




OK, why is this happening?

var artData:XML = new XML(

an artist
He sucks
She rocks

);


var lastName="Agrafiotis";

// undefined
var a = artData.bios.artistBio.(@s==lastName);

// correctly finds the Peter Agrafiotis node
var b = artData.bios.*.(@s==lastName);

What am I missing in the difference between the two lines?

- Michael M.

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


[Flashcoders] Toon Fu!

2009-11-22 Thread Alan Watts

Hi all,

I have been working on an AS3-based animation app and finally have  
made a version public:


http://www.toonfu.com/help/

Anyone interested in some beta-testing?  There are still some bugs,  
but it's stable and usable.  I'd love to get feedback from some folks  
who are animators.


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


[Flashcoders] RE: Input textfield's Event.CHANGE doesn't fire for backspace?

2009-09-30 Thread Alan Watts
What if you use the KeyboardEvent.KEY_UP event instead?  I don't know  
what you're trying to accomplish, but I've always used the  
KeyboardEvents for textfield interactions.


Alan


Hey List,

Consider something like this:

//inputTextField is multilined and wordWrapped
inputTextField.addEventListener(Event.CHANGE, changeHandler);

//All this does is trace when fired
function changeHandler(e:Event):void {
   trace("fired");
}

I expected this to fire when backspacing over a carriage return (ie,  
when
pressing backspace reduces the number of lines in the textfield by  
one), but

it doesn't. To try for yourself:

1. Type "Hello", then press enter, then type "world". You should  
have 2

lines of text.
2. Press backspace 5 times (so that "world" is gone, but the cursor  
is still

on line 2). The changeHandler should fire all 5 times.
3. Press backspace one more time (so that the cursor is at the end  
of line
1). ... Am I the only one who isn't getting a changeHandler fired at  
me?!


Note: It works fine in the opposite direction - ie, if you're using  
the
delete key rather than the backspace. But I really need to be able  
to detect
backspace so I can rearrange the y positions of other things on my  
stage.


If anyone has any suggestions or comments, it would be most  
appreciated!


Thanks!
CB.


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


[Flashcoders] RE: Rather urgent advice on how to track the cause of a crash

2009-09-05 Thread Alan Watts

fdb?

http://livedocs.adobe.com/flex/3/html/help.html?content=debugging_03.html

It's a good way to trackdown elusive bugs.  Hopefully you can recreate  
the error though, because you'd be the only one who can do the  
inspection.


Alan



On Sep 5, 2009, at 11:00 AM, flashcoders-requ...@chattyfig.figleaf.com  
wrote:


I have created a game in Flash CS3 which is being published for  
Flash 8 AS2.
My client is reporting it crashing periodically on his XP PC. I have  
also
managed replicate this on my Vista Ultimate PC with the following  
error:


"A problem caused the program to stop working correctly. Windows  
will close

the program and notify you if a solution is available"


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


[Flashcoders] Security.showSettings() freak-out

2009-09-02 Thread Alan Watts

Hi all,

I'm building an audio recording app and the Security settings window  
is acting totally bizarre.


http://podaroo.org/record/

This swf is a direct build of the SecurityExample from the  
SecurityPanel class documentation in the AS3/Flex Language Reference.   
I downloaded the latest flex_sdk to make sure I'm all up to date.   
Viewing on OSX 10.5.7 + FP 10,0,22,87.


Anyone have this issue before?

Thanks,
Alan

 
 
___

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


[Flashcoders] Security.showSettings() freak-out : solved

2009-09-02 Thread Alan Watts
It turns out that setting a low '-default-script-limits' in mxmlc was  
causing the freaking out.  Strange.


Alan


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


[Flashcoders] static vs singleton

2007-09-14 Thread Alan Watts

hi all,

I have a model class that contains xml data for a file I am  
manipulating.  What would be the difference between setting it up as  
a singleton and just accessing it via static vars and methods?


myFile.load(This approach works fine, but I haven't used AS3 enough to know if  
this is an obvious memory problem.  But it seems more logical than  
doing:


new myFile();
myFile.getInstance().setFilename()... etc.


Thanks!
Alan
 
 
___

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

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


[Flashcoders] Re: Parse/ Create swf via Actionscript 3.0

2007-08-31 Thread Alan Watts
I was going to start this a few months ago and then found some perl  
modules that do it:


http://search.cpan.org/search?query=swf&mode=all

My project is more suited for server-side swf generation, but these  
could be ported to as3 fairly easily.


hope it helps,
Alan


Curious if anybody knows of a library or is interested in working  
on one for

swf creation via actionscript?

In AS3, via ByteArray manipulations it's possible to read/decompile  
swf file as
a stream of bytes, and also generate create an swf entirely via  
actionscript!

e.g.
http://www.bytearray.org/?p=17 this could be used for generator or  
swfmill like
functionality, embedding graphics instead of having to constantly  
load them,

even web based live preview of the file being created.

I know the swf specification exists in order to figure out. So I  
could figure

it out, but wanted to see if anybody else had started on this first.
https://www.adobe.com/cfusion/entitlement/index.cfm?e=file%5Fformat



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

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


[Flashcoders] Re: Copying an embedded sprite

2007-08-05 Thread Alan Watts
I've never had any problems using this function to return an embedded  
asset as a bitmap which I can then manipulate or attach.


The getQualifiedSuperclassName if-statement is there because I have  
some assets with scale-9 enabled and they are returned as sprites, so  
I convert them first.


public static function getInterfaceAssetasBitmap 
(interfaceAsset:String):Bitmap {

var assetClass:Class = getDefinitionByName(interfaceAsset) as Class;
var returnBitmap:Bitmap;
if ( getQualifiedSuperclassName(assetClass)=="mx.core::SpriteAsset") {  
  
var asset:Sprite = new assetClass();
		var bitmapData:BitmapData = new BitmapData(asset.width,  
asset.height, true, 0x00FF);

bitmapData.draw(asset);
returnBitmap.bitmapData=bitmapData;
	} else if ( getQualifiedSuperclassName(assetClass) 
=="mx.core::BitmapAsset") {

returnBitmap = new assetClass();
}
return(returnBitmap);
}   


Hope it helps,
Alan

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

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


[Flashcoders] JOB: drag and drop product designer app

2007-01-04 Thread Alan Watts

hi all,

Mikons.com is looking for a freelance actionscript developer to  
create a wysiwyg product customizer using the images you create on  
the site.  The app will be heavy on xml exchange and bitmap  
transformation, so AS3 is welcomed (actually preferred).  The  
functionality and interface are complete, so if you're interested,  
send me an email with links to your work and what-not and we can  
discuss the details.


thanks!
Alan


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

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


[Flashcoders] mouseup outside the browser?

2006-12-16 Thread Alan Watts

hi all,

Is there a way to detect a mouseup outside the browser window in  
AS3?  Or are mouse events trapped to the stage?


thanks!
Alan

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

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


[Flashcoders] Re: Good External Actionscript Editor for Mac?

2006-12-13 Thread Alan Watts
I use BBEdit along with a custom Applescript to compile my AS3 with  
mxmlc and then view the resulting build (if successful) in Firefox.   
In BBEdit, I set up Apple-Return to run the script so it's just like  
using the Flash IDE (but better).


Alan




On Dec 13, 2006, at 1:22 PM, flashcoders- 
[EMAIL PROTECTED] wrote:


I'm looking for a good Actionscript editor for the Mac.  I've tried  
Sepy but it seems like its really buggy on a Mac.  Does anyone have  
any other recomendations?


Thanks!
Chris


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

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


Re: [Flashcoders] AS3, BitmapData and domain security

2006-07-23 Thread Alan Watts

I don't see the point of restricting access to BitmapData from another
server when all you have to do to get at it is use a proxy script on
your own server.  Here's an example:

http://www.neave.com/temp/proxy.php?proxy_url=http://www.google.com/ 
intl/en/images/logo.gif


I was doing something similar in Director a few years ago and ended  
up having to rename my php script to proxy.jpg and editing  
my .htaccess file for that directory to execute a .jpg as a php  
script (using AddHandler, IIRC).


Perhaps this is Flash's issue as well...

Alan


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

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


[Flashcoders] using getPixel on a rotated movieclip

2006-06-20 Thread Alan Watts

hi all,

I have a movieclip with an attachedBitmap.  When I rotate the mc, I'd  
like to then be able to use getPixel to find out what rgb value is  
clicked on.  I tried creating a temporary mc that contains yet  
another bitmap with mc.draw(rotated_mc) and a rotated  
matrixtransform, but the resulting bitmap is rendered with a  
different quality so I can't get the proper rgb value.  Is there an  
easier way to do this?


thanks!
Alan

___
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