Re: [Flashcoders] AIR native extension - Windows debugging

2014-09-05 Thread Henrik Andersson
The rumors of Flash dying are overblown. The Flash and AIR runtimes are
still great at what they do.

Apple pulled a stunt to shame Flash, but the truth is that they just
wanted to protect their appstore. They didn't want to kill Flash. They
wanted to kill Flash apps in the browser. They have succeeded, within
their target market. Developers obeyed the dictators and moved to the
appstore. The runtime remains great.

John McCormack skriver:
 Very comprehensive!
 I suppose these are the hooks that Microsoft uses when a program crashes.

 Henrik, I noticed that your subject has AIR native extension.

 Are you of the opinion that AIR still has a long life ahead of it?
 I ask because I like AS3 and would like to write some app's for
 delivery in AIR but am afraid to go down a dead end.

 John




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


Re: [Flashcoders] AIR native extension - Windows debugging

2014-09-05 Thread Henrik Andersson
The problem here is developers not stating what runtime they use for
their apps. What can be done is checking existing apps for obvious signs
of the runtime. Shouldn't take long for someone to crawl the appstore
and check all the apps for the fingerprint of the runtime.

John McCormack skriver:
 There may have been some merit in Apple's battery argument since
 greater cpu activity, for Flash's vector format, might incur a greater
 energy cost.

 Although Flash is having a hard time I was thinking more of using AIR,
 which I think has more life left in it.

 The thing is, I have no idea how active developers are with app's
 delivered via AIR.
 Are there many AIR app's being produced?



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


[Flashcoders] AIR native extension - Windows debugging

2014-08-28 Thread Henrik Andersson
Ever wanted to play with classics like ReadProcessMemory in
Actionscript? Now you can!

I have written an ANE that exposes the Windows debugging API for use in
ActionScript. It comes with a asdoc reference manual for easy API learning.

It allows access to everything you'd expect from a basic debugger as
well as from an advanced debugger. You can control memory, work with
breakpoints, deal with debugging events and more! The underlaying C code
exposes a shocking 56 functions for use in actionscript. This is the
complete debugging solution.

It's still beta, but please check it out.

http://www.henke37.cjb.net/windebug/

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


Re: [Flashcoders] Html coding: video for iPad and Flash on one page

2014-07-27 Thread Henrik Andersson
This assumes that all mobile devices are incapable of Flash. That's
patently false. It also ignores the issue of non-mobile devices that
doesn't support Flash.

natalia Vikhtinskaya skriver:
 Here is the code that I use (thank you Karl) and it works. Maybe it will be
 useful for somebody. I try now to find way to change look of a controls
 panel so the panel don't cover bottom of the video and text.
  If anybody solved this task please give me advice. Thank you for all your
 help.

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


Re: [Flashcoders] Html coding: video for iPad and Flash on one page

2014-07-25 Thread Henrik Andersson
You got the priorities wrong. He wants to use Flash if possible, with
the video as the fallback.

Karl DeSaulniers skriver:
 Hi Natalia,
 Looks like this is your best solution and doesn't involve any javascript.

 video width=100% height=100% controls
   source src=jack_giant.mp4 type=video/mp4
   source src=jack_giant.ogg type=video/ogg
   source src=jack_giant.webm type=video/webm
   object data=jack_giant.mp4 width=100% height=100%
 embed src=jack_giant.swf width=100% height=100%
   /object 
 /video

 [Source]
 http://www.w3schools.com/html/html_videos.asp

 You'll have to work it into what your doing.
 I think someone earlier mentioned this though.
 HTH,

 Karl DeSaulniers
 Design Drumm
 http://designdrumm.com



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


Re: [Flashcoders] Projector positioning (centering)

2014-04-19 Thread Henrik Andersson
John R. Sweeney Jr. skriver:
 Hi all,
 
 I need to center a Flash projector on both MAC and PC. Not center the stage, 
 but literally, when you double click the app or exe, it opens in the center 
 of the monitor.
 

Which monitor? Believe it or not, but there are people who have more
than one.


---
Detta epostmeddelande innehåller inget virus eller annan skadlig kod för avast! 
antivirus är aktivt.
http://www.avast.com


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


Re: [Flashcoders] Air Windows installed app

2014-03-01 Thread Henrik Andersson
natalia Vikhtinskaya skriver:
 This is code in app
 var appDirectory:File =
 File.applicationDirectory;//File.applicationStorageDirectory
 var fileString:String = appDirectory.nativePath;
 var appFile:File = File.documentsDirectory;
 var
 setsFile:String=fileString+File.separator+data+File.separator+sets.xml
 
 function initLoadXML():void{
 
 var XMLfile:File = File.applicationDirectory.resolvePath(setsFile);
 
 var myXMLLoader:URLLoader = new URLLoader(new URLRequest(XMLfile.url));
 
 myXMLLoader.addEventListener(Event.COMPLETE, setsLoaded);
 }
 function saveXML():void{
  var newFileStream:FileStream = new FileStream();
 appFile =
 appFile.resolvePath(fileString+File.separator+data+File.separator+sets.xml);
 
 newFileStream.openAsync (appFile, FileMode.WRITE);
 newFileStream.writeUTFBytes(xmlSets);
 newFileStream.close ();
 }
 Maybe here is something wrong with path or I store data in a wrong place.I
 have xml in the  folder data in the same folder as exe file with app.
 

Yes, there is something wrong: you are violating all the guidelines
about correct filesystem use.

Ask the user where to save data when reasonable, and default to a sane
location.

And never ever attempt to write to a location reserved for program
files, only installers are allowed to touch those folders.


---
Detta epostmeddelande innehåller inget virus eller annan skadlig kod för avast! 
antivirus är aktivt.
http://www.avast.com


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


Re: [Flashcoders] Air Windows installed app

2014-02-17 Thread Henrik Andersson
natalia Vikhtinskaya skriver:
 Hi to all.
 I solved all problems with xml editor in flash. I created AIR app that
 loads and saves xml after editing. I created Windows installer app. It
 works well on XP and Win 8. But when the user installs it on his pc (I
 think he has no AIR program on it) app plays but not saves files . What do
 you think is possible problem?
 Thank you in advance.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 

Code please.

---
Detta epostmeddelande innehåller inget virus eller annan skadlig kod för avast! 
antivirus är aktivt.
http://www.avast.com


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


Re: [Flashcoders] Read and save xml file on disk

2014-02-10 Thread Henrik Andersson
Just use File.separator, it will get you the correct one if you care.

Jim Hayes skriver:
 Or use a /  which I think works both on PC and the mac (which \ will not, 
 that will only work on windows)
 Forgive me if I'm wrong on that one.
 
 From: flashcoders-boun...@chattyfig.figleaf.com 
 [flashcoders-boun...@chattyfig.figleaf.com] on behalf of Jim Hayes 
 [j...@primalpictures.com]
 Sent: 10 February 2014 15:26
 To: Flash Coders List
 Subject: RE: [Flashcoders] Read and save xml file on disk
 
 you need to escape the \   like so \\
 
 appFile = appFile.resolvePath(fileString+\\personnel.xml);
 trace(fileString+\\personnel.xml)


---
Detta epostmeddelande innehåller inget virus eller annan skadlig kod för avast! 
antivirus är aktivt.
http://www.avast.com


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


Re: [Flashcoders] static const singleton GC?

2013-09-20 Thread Henrik Andersson
There is no such thing as calling a constant. And static properties are
only initialized once.

Your approach only serves to delay the construction of the instance to
the moment it is first accessed, as opposed to when the runtime decides
to initialize the constant.

What OP needs is a singleton that can be destructed. The problem here is
that the constant that is holding a reference to the instance never
leaves scope and can't be changed not to point at the instance.

The way I would do it would be to either fix the scheduler to correctly
terminate the flash player or to reuse the flash player instead of
spawning a new one each time.

In fact, I doubt that OP actually means flash player, but rather means
a random swf file that I load every so often. That would be a prime
example of where reuse is the correct approach.

Peter Ginneberge skriver:
 That's not a singleton, as every time you call the public static
 constant, it creates a new instance.
 
 The static var should be private and the class needs an access point
 method, usually called getInstance();
 
  private static var INSTANCE:AppApi;
 
  public function AppApi():void {
   if (INSTANCE != null ) {
throw new Error(Only one instance allowed.  +
 To access the Singleton instance, use getInstance().);   }
  }
  
  public static function getInstance():AppApi{
   if(!INSTANCE) INSTANCE = new AppApi();
   return INSTANCE;
  }
  
 
 Then elsewhere in your app you refer to the singleton with:
 AppApi.getInstance();
 
 

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


Re: [Flashcoders] Mailing Lists and Tools

2013-05-23 Thread Henrik Andersson
Kerry Thompson skriver:
 Take it easy, Oren. There is no spam I've seen. It looks like something got
 corrupted in my reply, but that's hardly spam. I'm posting from a Caribbean
 island, and there might be some transmission problems-- this is a small,
 less-visited island.

Isn't TCP supposed to prevent that? It will either fail the transfer or
correct the error, never let corrupted data pass.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3 finally..

2013-05-19 Thread Henrik Andersson
Hans Wichman skriver:
 
 That said, AS3 is much more about (strong) typing than AS2 was.
 In that line of thinking, you need to specify exactly what types of
 parameters go into a method/function and what it returns, even if that
 what is nothing.
 The type of Nothing is this respect is void.
 

Need and need, it is good practice. So good that some compilers will
raise a warning if you fail to do it.

The point of void here is twofold, to let the compiler check that the
return statement doesn't try to return anything and to let the compiler
check that the caller isn't expecting a return value. Other types have
similar checks.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: Air is dead (was Flash is dead)

2013-05-10 Thread Henrik Andersson
They would offer the flash runtime as a linkable library if they were
serious about being middleware.

Have you seen the ANE stuff? Complete rubbish compared to real native
classes! They don't trust people to actually have access to all the
useful stuff the runtime has. And it's not a matter of encapsulation,
it is flat out refusing to expose important parts. Do they seriously
think that we developers are too incompetent to implement a class with
native methods?

Then there is the complete lack of support for running the runtime
inside your own executable. Not as a way of embedding a plugin in a
webpage, but as a real call this function each tick and get the output
in this memory buffer library.


And you are fully correct in that premium just means people who wants
to pay. DRM is rubbish and they know it. Their FMS marketing is more or
less only about how it is impossible for people to rip the video streams.

Finally, you nailed it when you say that they aren't serious about
expanding the market. Adobe has forgotten what Flash was made to do in
the first place: vector animation. They spend exactly zero dollars on
that angle in both PR and development.

And to add to the pile of problems, the development has stagnated, both
for the authoring tool, the build system and the player. They could have
added a lot of things by now, but they didn't. Anyone remember the demo
when they had a steering wheel? The API for that has been out for years
now, but they still haven't bothered publishing a player that implements it.


Kevin Newman skriver:
 The video performance in AIR on desktop is horrendous (no hardware
 accell - even through webkit), and on mobile it's only better if you go
 through stagevideo. For heavier lifting you'll need to use an ANE. Once
 you are down that road, why not just go all native, or look for a better
 cross-platform framework like Xamarin?
 
 When Adobe says premium video they really mean we aren't going to
 pull the plug on our DRM partner and customers (yet). Their premium
 gaming narrative was similar, though in the case of Unity3D (one of
 their premium gaming partners) it did fall apart once they canned AVMNext.
 
 Adobe is not serious about expanding their Flash market. They don't seem
 to be interested in being a middleware provider. Even for gaming at Max
 (I'm not there, but word on the street is) talk is all about gaming in
 HTML5, and the only real Flash presence is third party vendors - those
 partners and customers that the premium label applies to - with not
 much from Adobe themselves. My customers, and from the looks of it, many
 others', have gotten the right message. It's time to move on.
 
 Kevin N.
 
 
 
 On 5/9/13 12:09 PM, Randall Tinfow wrote:
 It depends.  If you are developing video centric applications, I don't
 see a platform that comes close.  WatchESPN is the perfect example. 
 
 ___
 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


Re: [Flashcoders] Adobe Flash future

2013-05-08 Thread Henrik Andersson
Liu, Peter skriver:
 Why can't Adobe make HTML5 as one of the publishing options, then we can 
 continue to use Flash without the need to learn another program?
 

Because HTML5 doesn't do a good job at vector animation. The Flash
runtime is quite powerful. And it is difficult to replicate so much
work, even if you aren't aiming for content compatibility.

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


Re: [Flashcoders] AIR installer

2013-01-22 Thread Henrik Andersson
Windows will show it as an unrecognized file type and present the usual
shall we go to a website and fail to find anything useful? question.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Exhibition type kiosks

2012-11-30 Thread Henrik Andersson
Glen Pike skriver:
 We built an AIR shell loader so we could run the App in browser etc.

Tell me more. I have not heard how to do this.

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


Re: [Flashcoders] pull in html section to Flash

2012-11-21 Thread Henrik Andersson
natalia Vikhtinskaya skriver:
 Thank you Karl
 Some more questions:
 1.What Flash function can pull in basic html to flash?
 2.And what Flash function can get access to the database?
   I suppose that can not be done directly from flash. And how to
 manage that dynamically with new url each time?
 

You have the URLStream, URLLoader and Socket classes if you want to load
data in ActionScript.

You can load html with either of them.

The Socket class can be used to implement a database client, but it is
not recommended, due to depending on the db to secure the connection as
well as having the end user client manage the database login credentials.

The Socket class is the only option for push based protocols. HTTP is by
design a pull based protocol and is as such ill suited for realtime
communication.

I recommend that you think about what data you need to load, not in
which format you have the data right now.

The best setup is to pick a format that does not contain display
details, but only the actual data. HTML tends to contain plenty of
design details.

Most people end up sending the data stored in the database as is to the
client, letting the client decide how to format the data at display time.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] PSA: Monocle in open beta

2012-10-25 Thread Henrik Andersson
I know that this is a bit late, but since noone else has posted it I
guess I will.

http://www.bytearray.org/?p=4858

You can now register and instantly get access to the Monocle profiling tool.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3

2012-10-24 Thread Henrik Andersson
Karl DeSaulniers skriver:
 Thank you Cor!
 The buttons are MCs placed on the stage. At first they were Buttons, but
 when they wouldn't change even the states within the Button, so I
 converted them to MCs.
 Also, what does the
 
 , false, 0, true);
 
 do? Does it have to do with removing the listener?
 uhg im not going to sleep well tonight.
 


It doesn't do anything in practice. It only matters if the listened to
object is alive when the source of the listener isn't. Which almost
never happens unless you are listening to the stage.

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


Re: [Flashcoders] AS3

2012-10-24 Thread Henrik Andersson
Karl DeSaulniers skriver:
 Thanks Henrik,
 Well for this, there are two buttons on stage.
 When you hover over one it makes a message appear, if the other another
 message appears.
 So if I dont use those, your saying that when I roll out, the listener
 is removed automatically?
 


I am saying that the last argument to addEventListener becomes
irrelevant. the argument only matters if the listener function has
captured a reference to its original scope
(shown as savedThis in the debugger) (the class instance it came from)
AND the original scope has no more live references to it AND the
listened to object is live.

This is irrelevant, since in nearly all cases the original scope was the
one who created the listened to object in the first place and as such
both will die at the same time.

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


Re: [Flashcoders] Actionscript lives on.

2012-09-18 Thread Henrik Andersson
Tom Gooding skriver:
 thanks - had seen Machinarium - will take a look at Wonderputt, thing that 
 worries us specifically with AIR is the networking stack; running robust / 
 low-latency socket connections for multiplayer games (which we do fine in 
 browser flash).
 

I say that AIR is even more suited for this than the Flash player, since
it provides a full socket API and not just outgoing TCP connections.

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


Re: [Flashcoders] Actionscript lives on.

2012-09-17 Thread Henrik Andersson
John McCormack skriver:
 One thing that Apple issue seemed to miss was that any significant
 download of pixels, no matter what the delivery language, is going to
 use a similar amount of battery life. So it really had little to do with
 Flash. More to do with control of the market.

I beg to differ. Flash with the vector graphics is quite relevant since
vector graphics can vastly reduce the transfer size for the art.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Actionscript lives on.

2012-09-17 Thread Henrik Andersson
Jon Bradley skriver:
 Of static art and of limiting complexity. The moment complex vectors are 
 used, the data requirements balloon and once motion is taken into 
 consideration (data for per-control point manipulation) the argument is far 
 out the window.
 
 Either way, it's a moot argument.
 

Do you know of any studies about this? Because it would be interesting
to see just how vector animation compares to traditional content.

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


Re: [Flashcoders] Actionscript lives on.

2012-09-17 Thread Henrik Andersson
Ross P. Sclafani skriver:
 http://www.adobe.com/devnet/flash/articles/optimizing-mobile-performance.html
 

That discusses runtime performance, not how big the data is. And it does
not provide any concrete research results. Just unscientific individual
observations.

I want concrete numbers that discuss how vector graphics impact the size
of the animation.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Actionscript lives on.

2012-09-17 Thread Henrik Andersson
Paul Andrews skriver:
 Adobe has said for years that mobile platforms should use bitmaps to
 conserve processor utilisation. The other real problem with flash is
 that some developers use inefficient processing loops that eat up
 processing power - I can often see it on my laptop when the fan suddenly
 kicks in after I've launched a flash app.
 

I am of the opinion that things can be stored as vectors and then cached
as bitmaps at runtime. The issue here is that the built in caching is
limited to just one version of each object and objects can't share caches.

Flash needs a more powerful caching system for rasterized vector art.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3 read serial data over USB on Mac

2012-08-29 Thread Henrik Andersson
Eric E. Dolecki skriver:
 I have some hardware that sends serial data over USB. Any good proxy app to
 use with Sockets to read that data in an AS3 app?
 

Have you tried an AIR native extension?

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


Re: [Flashcoders] Converting a flash game to facebook app

2012-05-31 Thread Henrik Andersson
The idea is obviously to let your server be the one who asks the
Facebook servers for the data, meaning that the only possible attack
points are the server itself and the connection. If your server is
compromised then you have fail security. If the connection is
compromised then SSL failed. SSL is much less likely to fail.

Point is, the client never sees the key.

Hans Wichman skriver:
 Hi Ben,
 
 if you put the keys on your server, can't they be sniffed anyway or am i
 missing something?
 tnx
 H
 


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


Re: [Flashcoders] Accessing FlashVars

2012-05-02 Thread Henrik Andersson
Bob Schmitt skriver:
 It is now:
 
 http://www.w3schools.com/html5/html5_new_elements.asp
 
 embed  Defines a container for an external application or interactive
 content (a plug-in)
 

HTML 5 is not a standard. It has yet to be finalized.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Accessing FlashVars

2012-05-01 Thread Henrik Andersson
Kerry Thompson skriver:
 That's one way of doing it, but the embed tag has been deprecated. Well,
 maybe not officially deprecated, but it's considered obsolete.
 

Well, you can't deprecate something that has never been in the standard
to begin with.

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


Re: [Flashcoders] Should I use BlazeDS for this?

2012-03-20 Thread Henrik Andersson
Steven Loe skriver:
 I'm confused... I would like to control the flash apps on ~1000 machines by 
 sending occasional server messages to them. If I use remoting, seems I need 
 1000 persistent tcp connections from server to clients. That seems like a lot 
 of connections. Would remoting be less scalable than plain old polling in 
 this scenario?
 

TCP connections are pretty cheap when idle. Unless you are running into
a limit on the number of concurrent connections you shouldn't need to worry.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AIR Screensaver?

2012-03-12 Thread Henrik Andersson
David Hunter skriver:
 Hi All,
 
 Anyone have any advice on making screensavers from Flash? I have seen some
 decent looking software
 http://www.screentime.com/software/flash-screensaverto convert an swf
 into a screensaver but it is quite pricey, I didn't have
 any luck with a mac open source alternatives, so I was wondering if it was
 possible with AIR? I would need it to function fully as a screensaver eg.
 be activated by user idle timeouts / hot corners etc...
 
 Thanks,
 
 David
 

Make a projector that automatically enters fullscreen at start and exits
at input. Then rename it to *.scr, done.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AIR Screensaver?

2012-03-12 Thread Henrik Andersson
David Hunter skriver:
 That doesn't seem to work on my mac. System Preferences  Desktop  Screen
 Saver not picking up my renamed projector file. Is it Windows only?
 
 Thanks Henrik.
 

Yup, windows only.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Should I use BlazeDS for this?

2012-03-09 Thread Henrik Andersson
Steven Loe skriver:
 I have a flash project that polls a php server every 10 
 seconds to check for commands. I have 1200 machines running this on a 
 local network.
 

You want push, not pull.

And http can't provide push. You need a different protocol.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] MVC - ScreenManager

2012-03-08 Thread Henrik Andersson
Terry Riney skriver:
 Would like to pass a score/time/damage to client will stick with
 score/damage right now:
 
 package observer{
 import observer.Observer;
 
 /**
  * A Java-style Observable class used to represent the subject
  * of the Observer design pattern. Observers must implement the
 Observer
  * interface, and register to observe the subject via addObserver().
  */

Congratulations on reinventing the EventDispatcher class. I hope you had
fun reinventing the wheel.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] MVC style Correction

2012-02-27 Thread Henrik Andersson
Ross Sclafani skriver:
 An MVC Example
 
 FLVPlayback is an interesting MVC  component:
 
 it holds a NetStream as a model of the video
 
 it holds a Video as a view of the Video
 
 It acts as controller to set the model in motion by connecting it to a stream
 
 the ui is also a view of the video: the percent elapsed is represented n the 
 scrub bar, ther is a play button while paused, a pause button while playing, 
 then there are the time readouts..
 

Sadly, that is not true.

First sentence of the manual page for the FLVPlayback class:
 FLVPlayback extends the Sprite class and wraps a VideoPlayer object.

I don't have enough time to figure out how much this matters, but I
assume that if you care you are better of reading the source code anyway.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] MVC style Correction

2012-02-26 Thread Henrik Andersson
John McCormack skriver:
 Kevin mentions...
 ...need to transform the format to fit the view, you would do that in
 the controller
 
 Henrik mentions...
 The data changing should be done in an adapter that the controller puts
 in between the model and the view.
 
 So the problems arise because the data that isn't quite what the model
 stores, or isn't quite what the views use.
 
 At the same time the controller shouldn't know about requirements of the
 model and views, but in this world of isolation and 'not knowing' about
 other things we need adapters that do know the details of other parties.
 
 Do all systems need adapters that convert data into the appropriate format?
 

It is fine for the controller to know the identity of the formats
involved. But understanding them is probably overkill.

A well designed system will often have situations where the view and
model use the same format, meaning that there is no need for any adapter.

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


Re: [Flashcoders] Importing A Button or Other Component Dynamically With Pure AS 3

2012-02-26 Thread Henrik Andersson
Please don't tell us what the error is.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] MVC style Correction

2012-02-25 Thread Henrik Andersson
Kevin Newman skriver:
 On 2/25/2012 8:00 PM, Paul Andrews wrote:
 Who is then? 
 
 The model - but it depends on what you really mean by manipulate - if
 you are storing it (such as in a database) to be retrieved by the model
 at a later time, the model should do it. If you are channeling the data
 to a generic view, and need to transform the format to fit the view, you
 would do that in the controller.
 
 Kevin N.
 

I disagree. The data changing should be done in an adapter that the
controller puts in between the model and the view.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash Platform roadmap released - time to start learning HTML 5 unless you make games.

2012-02-22 Thread Henrik Andersson
James Merrill skriver:
 http://www.adobe.com/devnet/flashplatform/whitepapers/roadmap.html
 
 A new version of AS3 will be nice, it's just too bad no one wants Flash
 anymore. Flash player is basically dead in the water, with its future usage
 being hardcore gaming. How many of you guys/gals are doing that?
 
 
 

I find this lacking.

Let me break down the promised features:

11.2:
* Mouse lock: rather trivial, but a real new feature.
* Right and middle mouse-click support: Stolen right from AIR, not new
* Context menu disabling: Almost the same thing as the previous point,
it is just a logical consequence. And it is also stolen right from AIR
and not new at all.
* Hardware-accelerated graphics/Stage 3D support for Apple iOS and
Android via Adobe AIR: Not a new feature, just improving the
implementation of an existing one.
* Support for more hardware accelerated video cards: Ditto
* New Throttle event API: I thought that this was already in the
shipping players?
* Multithreaded video decoding pipeline: more performance improvements
that isn't a feature

So in total: one genuinely new feature. One and a half feature stolen
from AIR.

Cyril:
* Keyboard input support in full-screen mode: Stolen from AIR and was
just an intentional limitation
* Improved audio support for working with low-latency audio: Personally
interested in this
* Ability to progressively stream textures for Stage 3D content: Sounds
fun for the 3d people
* LZMA compression support for ByteArray: I think this one is stolen
from AIR. And it is a trivial feature too, just some misc headers IIRC.
* Frame label events: Because framescripts are evil (they are not)

Much better total here: 3 new, 2 stolen.
Running total: 4 new, 3½ stolen.

Dolores:
* ActionScript workers (enables concurrent ActionScript execution on
separate threads): Yay threading! It might help a bit with those long
running tasks, but really, it is not as much of a game changer as you'd
think. It is of course important to be able to max out all cpu cores,
but really, there is a lot of details you have to keep in mind there.
* Support for advanced profiling: To vague to be deemed a feature
* Support for more hardware-accelerated video cards: Again? Just read
what I wrote above.
* Improved ActionScript performance when targeting Apple iOS: To vague
and not even close to a new feature.
* Performance index API to inform about performance capabilities of
current environment: Vague, but still enough to call a new feature
* Release outside mouse event API: Pathetic, but a genuine feature

And we are back with mostly trivial stuff, but the threading pulls the
big load here. 3 new features, none stolen
Running total: 7 new, 3½ stolen.

Next:
* Refactoring and modernizing the current core Flash runtime code base
* Work on the ActionScript Virtual Machine
* Updates to the ActionScript language

This is just really a work list, not a feature list. But there is a
feature like list for the last entry.

* Stringent static typing as default, with optional dynamic typing:
dynamic stuff just hurts developers more than it helps. Get rid of the
easily abused stuff and keep the dynamic features properly walled off.
* Type inference: Someone must have looked at the new c++ standard and
fallen in love with the auto keyword.
* Hardware-oriented numeric types: a bit vague, but a step in the right
direction. Lets just hope this doesn't turn into the mess of c and c++
primitive types.

So in total, there isn't a lot of new features being listed here. There
is a few good ones, some stolen from AIR and some trivial ones. Overall,
it is nothing too major.

What disturbs me is the complete lack of animation related features.
Adobe seems to have abandoned all the animation features in Flash since
CS 5. They don't believe in their own product (for this purpose) anymore.

Anyone remember Flash 8 when they added brand new drawing features? Now
that was a step in the right direction for the animation. The player
hasn't gotten any animation related feature since then.

Pixelbender doesn't count, since it is badly implemented and poorly
supported. No real animator is going to use it. Only programing geniuses
like me will ever use that.

If you ask me, Adobe needs to get the animation part back on track
before the competition runs past them.

Of course, Adobe can't ignore the fact that Flash is more than an
animation tool either. They are doing (mostly) the right things for
those parts. But they are forgetting where it all began.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash Platform roadmap released - time to start learning HTML 5 unless you make games.

2012-02-22 Thread Henrik Andersson
Henrik Andersson skriver:
 James Merrill skriver:
 http://www.adobe.com/devnet/flashplatform/whitepapers/roadmap.html

 A new version of AS3 will be nice, it's just too bad no one wants Flash
 anymore. Flash player is basically dead in the water, with its future usage
 being hardcore gaming. How many of you guys/gals are doing that?


Oh and, there is a curious lack of support for game controllers. I don't
get it, why would they even make that an AIR exclusive feature? And for
TVs only? WTF?

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


Re: [Flashcoders] Flash Platform roadmap released - time to start learning HTML 5 unless you make games.

2012-02-22 Thread Henrik Andersson
Matt S. skriver:
 On Wed, Feb 22, 2012 at 3:37 PM, Henrik Andersson 
 he...@henke37.cjb.netwrote:
 If you ask me, Adobe needs to get the animation part back on track
 before the competition runs past them.

 
 Everything Adobe is doing suggests that they think that particular horse
 has already kicked the gate down and bolted, and that their best bet to
 keep Flash as a profitable part of the Adobe family is by focusing on Video
 and Gaming.

But what they fail to realize is that great animation tools are
important for gaming. Games these days are more than just 3D worlds and
pixelated nostalgia. There is a real use for plain old classic 2D vector
animation.

And the fact remains, Flash is still a serious option for plain old
animation, even if Adobe has stopped believing in it. Millions of real
users of all sizes know this. There is the amateurs that makes movies
with stickmen, there is hobbyists who makes awesome short movies and
there are real companies that are making real tv shows with it.

Flash for animation is a technology proven in real projects and it is
insane to throw all of this away.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash Platform roadmap released - time to start learning HTML 5 unless you make games.

2012-02-22 Thread Henrik Andersson
Karl DeSaulniers skriver:
 If I had anything to say about the future of flash, it would be, sell it
 back to Macromedia if you can't fill the position.

Adobe didn't buy Flash. They bought Macromedia.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash Platform roadmap released - time to start learning HTML 5 unless you make games.

2012-02-22 Thread Henrik Andersson
Karl DeSaulniers skriver:
 Ok, then sell it/give it back to the guys who started Macromedia.
 

It seems like they already have positions in the top Adobe management.

http://www.adobe.com/aboutadobe/pressroom/executivebios/davidwadhwani.html

http://www.adobe.com/aboutadobe/pressroom/executivebios/kevinlynch.html
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AIR Socket.readObject received in multiple ProgressEvents?

2012-02-16 Thread Henrik Andersson
Mattheis, Erik (MIN-WSW) skriver:
 I'm not understanding something here - in the following excerpted and 
 simplified example, I'm trying to send a ByteArray of length 170 and there 
 seem to be 173 bytes received. Where are the extra bytes coming from and 
 and is that the reason readObject returns null? (tracing _socketData.toString 
 shows that the object properties I want to work with are in the ByteArray):
 

As I said before:

 This means that you MAY get more than one object in one go and that
you MAY get only a part of the object(s) at the ends of the buffer.

It is highly possible that multiple writes was stuffed into one read,
even if you don't flush between the writes.

The three left over bytes could be the first three bytes of the length
of the next object.

Your code must be able to deal with the crazy situation that it got a
full length int, the encoded object and only three quarters of the
length int for the next object in one go.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AIR Socket.readObject received in multiple ProgressEvents?

2012-02-16 Thread Henrik Andersson
Mattheis, Erik (MIN-WSW) skriver:
 On 2/16/12 4:20 PM, Henrik Andersson he...@henke37.cjb.net wrote:
 It is highly possible that multiple writes was stuffed into one read,
 even if you don't flush between the writes.
 
 The three left over bytes could be the first three bytes of the length
 of the next object.
 
 I left out some of the code in which I'm trying to account for receiving the 
 object during separate ProgressEvents - my my ProgressEvent handler:
 
 _socket.readBytes(_socketData);
 if (_socketData.length  _messageLength) {
   // more data coming, exit the event handler and wait for the next 
 ProgressEvent
   break;

Is it possible that _messageLength is not correctly initialized at this
point? I suspect that it may contain a stale value. The correct value
when waiting for the length is 4.

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


Re: [Flashcoders] AIR Socket.readObject received in multiple ProgressEvents?

2012-02-16 Thread Henrik Andersson
Ross Sclafani skriver:
 Henke!
 Have we met on IRC ? I operate there as butter. Used to hit up actionscript 
 and papervison3d on freenode but it's been a while.
 

Quite likely, since I do hang on ##actionscript@Freenode all the time.
It must indeed have been quite a while, since I am afraid I don't recall
you. It's just kinda hard to remember everyone when you see someone new
each week.

Feel free to drop by, all of you on the list. We have so much great
people that you'd love to hear from.

-- Best Wishes, one of the IRC channel managers.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AIR Socket.readObject received in multiple ProgressEvents?

2012-02-15 Thread Henrik Andersson
Basic TCP rules says that you are sending an octet stream.

All socket APIs are optimized for bulk access to avoid silly performance
issues due to lots of function calls (and possible mode switches).

This means that you MAY get more than one object in one go and that you
MAY get only a part of the object(s) at the ends of the buffer.

You need to separate data manually. You have three strategies:
* Fixed size (easy, not flexible)
* Terminator (slightly tricky with buffers, flexible, possible escaping
issues, slight overhead)
* Transmitted size (easy with buffers, flexible, slight overhead)
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AIR Socket.readObject received in multiple ProgressEvents?

2012-02-15 Thread Henrik Andersson
Mattheis, Erik (MIN-WSW) skriver:
 If I have to do this without looking at functional examples, how would one 
 transmit a terminator byte or byte size while using Socket.writeObject()?

Write the object to a ByteArray, measure the size of that and send the
size of that before the contents of the ByteArray.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] am i loaded by another swf?

2012-02-15 Thread Henrik Andersson
Ktu skriver:
 Hey List,
 
 I'm building a swf, and i want to set the stage.scaleMode and align ONLY IF
 my swf is the top level swf, and was not loaded by another swf.
 
 anyone know how to find out if a swf was loaded by another swf?
 
 need more info?
 
 thanks
 

You can't know in the general case, but here is a good enough guess:

function isFirstMovie():Boolean {
return stage  root==stage.getChildAt(1);
}

There is however one specific case where you can know: During the
construction of the first frame (that includes the document class
constructor). Check if you are on the stage during that. Only the first
loaded movie will be, any subsequently loaded movies will not be.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] am i loaded by another swf?

2012-02-15 Thread Henrik Andersson
Ktu skriver:
 sorry now, what if the loader is already in a display list when it runs
 that first frame?
 is it still not aware of the stage?
 

If a movie is loaded by a Loader that is on the display tree of the
stage the loaded movie DOES NOT have access to the stage.

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


Re: [Flashcoders] am i loaded by another swf?

2012-02-15 Thread Henrik Andersson
Karl DeSaulniers skriver:
 Is there no reference in AS3 like AS2 where you can look with _level0
 for the top level MC?
 

The equivalent to levels would be the display list of the stage itself.

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


Re: [Flashcoders] Flash + jQuery

2011-11-04 Thread Henrik Andersson
You sure that you need javascript to access the server? Flash is
perfectly capable of making http requests on it's own.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] swf 2 pdf on the fly

2011-10-28 Thread Henrik Andersson
You could just read up on the pdf file format specification.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] tips for designing games for kids with special needs

2011-10-25 Thread Henrik Andersson
I can only point at the normal design guidelines. They still apply no
matter who the target audience is.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash Player 11 and Flash Professional CS 5.5 (11.5)

2011-10-20 Thread Henrik Andersson
Right now.

You need the correct playerglobals.swc file and a simple xml file to
tell Flash about the new player.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Nice looking bit map scaling in flash

2011-10-20 Thread Henrik Andersson
Flash has bitmap smoothing that will blur the image so that the scaling
artifacts are less visible. Try it out.

At least it is better than making things look pixelated.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS2 open pps file from flash project

2011-10-05 Thread Henrik Andersson

As 2 might not be able to do it.

As 3 on the other hand can open any file, as long as you write the 
needed code to parse the file.

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


Re: [Flashcoders] Flash on top of flash

2011-09-21 Thread Henrik Andersson
You won't get much luck overlaying anything on top of a flash player. 
Not even another flash player.


I think that the correct solution here is to use just one flash player 
that loads both movies.

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


Re: [Flashcoders] SWF size reduction

2011-09-17 Thread Henrik Andersson
The issue here is that the compiler does not know that they will remain 
unused and can not assume they will.


Why? Because if another swf file accesses the first file at runtime then 
the second file may need the features.

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


Re: [Flashcoders] timer confligt

2011-09-12 Thread Henrik Andersson
Timers doesn't run while their listeners run. This gradually skews their 
position.

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


Re: [Flashcoders] array problem,loop.plot

2011-08-23 Thread Henrik Andersson
I say, store no pints what so ever. Store the formula needed to compute 
each point. Then you can just compute the point when actually needed. 
This way you can plot the graph at any zoom level without sacrificing 
any quality.


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


Re: [Flashcoders] array problem,loop.plot

2011-08-22 Thread Henrik Andersson
Use a reasonable amount of points. Don't draw more points than the graph 
is wide.


Consider using curveTo to get smoother lines.

Consider using the bulk drawing to reduce the cost of telling flash each 
point. One method call vs one per point can make a difference.

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


Re: [Flashcoders] rotation cw ccw

2011-08-19 Thread Henrik Andersson
You can't unless you assume that the maximum rotation speed is less than 
180 degrees per update. This is due to the aliasing problem.


This is, assuming that you don't actually know the rotation speed and 
are calculating the angular difference between two positions.

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


Re: [Flashcoders] Simplify XML Call

2011-08-13 Thread Henrik Andersson

There is still no eval function.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Simplify XML Call

2011-08-12 Thread Henrik Andersson
ActionScript 3 is a compiled language. There is no such thing as an eval 
function in as 3.

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


Re: [Flashcoders] CS5 text problem

2011-08-11 Thread Henrik Andersson
It is a very common problem. You need to embed the font in a different 
way that is not automatically dealt with.


Just find the textfield on the stage, select it and click on the embed 
button in the properties inspector panel to add the correct symbol for 
the font.


Flash will then automatically embed glyphs used on the timelines while 
allowing you to list additional glyphs in the font embedding dialog.

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


Re: [Flashcoders] Simplify XML Call

2011-08-11 Thread Henrik Andersson
While you have the right spirit I think that it would be a better idea 
to check the length of the array instead. That way you won't 
accidentally step out of bounds there.

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


Re: [Flashcoders] Question: Fullscreen but want to retain a movieClip's width and height

2011-08-09 Thread Henrik Andersson

It depends on the set scaling mode of the stage.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] NativeProcess On Mac

2011-07-29 Thread Henrik Andersson

Glen Pike skriver:

Hi,

Unless you can use /usr/sbin/diskutil as your File name and pass the
other elements of the command line as separate arguments, then you
might have to be more creative with your approach.

1. Write a shell script that encapsulates this command and call that.

2. Capture the output of the first command and use Regular expressions
to extract the UUID yourself?

Glen



I am with the second option, no need to let some other program do the 
string juggling that you can do yourself.



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


Re: [Flashcoders] Using BitmapData.draw() with masked items

2011-07-28 Thread Henrik Andersson
Sounds like the classical mask not being in a display list issue, but 
in a new variation.


Ensure that both the mask and the maskee is in the container passed to 
the draw call.

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


Re: [Flashcoders] Re: secure sockets?

2011-07-24 Thread Henrik Andersson

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


Re: [Flashcoders] Incorrect XML from PHP to Flash {RESOLVED}

2011-07-21 Thread Henrik Andersson

Cor skriver:

OK, so when I change the output line in my PHP from:
print  $response;
to
print returnString=$response;

So flash expects a key-value pair!!!



Now the real question is, why is Flash expecting that format to begin 
with? You shouldn't change your php code. You should change the 
actionscript code.

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


Re: [Flashcoders] Incorrect XML from PHP to Flash {RESOLVED}

2011-07-21 Thread Henrik Andersson

Cor skriver:

Thank you.

I have:
var myXML:XML =  XML(e.target.data.returnString);


You should have XML(loader.data).
Use the URLLoaderDataFormat.TEXT mode, not the 
URLLoaderDataFormat.VARIABLES mode.


As for the ordering, did you request any specific order at any time in 
the chain? You did not in the sql query, you did not attempt to reorder 
things in php and you did not attempt to reorder things in actionscript.


Ask for the items in the table in a specific order in the sql query.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Incorrect XML from PHP to Flash

2011-07-20 Thread Henrik Andersson

Your php code is broken then.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Incorrect XML from PHP to Flash

2011-07-20 Thread Henrik Andersson

Did you even look at the code he posted? The code already does that!

As for the code itself, while I do not aprove of using string 
concatenation to build xml, that seems to be ok.


You seem to have some sort of dodgey filter running somewhere later in 
the chain. I recommend using a http request sniffer, like Fiddler, to 
check when the incorrect encoding is performed.

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


Re: [Flashcoders] Incorrect XML from PHP to Flash

2011-07-20 Thread Henrik Andersson

Karl DeSaulniers skriver:

Hi Cor,
I think you will want to put htmlspecialchars() around what comes out of
the database.



More like using a proper XML generating library. I recommend the DOM php 
extension.

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


Re: [Flashcoders] Calling native code from Flash

2011-07-19 Thread Henrik Andersson
Embed the flash player in your own native application. Then add stuff to 
the api using high level magic and there you go, new stuff for 
actionscript to use.

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


Re: [Flashcoders] AIR app - possible to dynamically unzip?

2011-07-14 Thread Henrik Andersson
First of all, there is no protection in the current design. And you can 
never make one that will do squat.


Second, there are libraries to work with zip files. I have used one 
myself, not too hard.

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


Re: [Flashcoders] scrolling webpage with flash

2011-06-30 Thread Henrik Andersson
Set the embeding code to use a dynamic size, such as 100 %. Then use the 
Stage.stageWidth and Stage.stageHeight properties to do your layout.

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


Re: [Flashcoders] scrolling webpage with flash

2011-06-30 Thread Henrik Andersson

Kevin Newman skriver:

On 6/30/11 4:40 PM, Eric E. Dolecki wrote:

document.getElementById(divName).style.height =valPassedByFlash

You can even do that completely from within flash:

function onResizeHandler(event:Event):void {
if (ExternalInterface.available)
ExternalInterface.call(function(){document.getElementById('divID').style.height
= ' + stage.stageHeight + px';});
}
stage.addEventListener(Event.RESIZE, onResizeHandler); // I think


Of course, that may or may not get nerfed in the future, since it wasn't 
supposed to be a full fledged javascript eval style function.

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


Re: [Flashcoders] E4X: reading CDATA

2011-06-20 Thread Henrik Andersson
CDATA is just an encoding trick to force the parser to not parse the 
data as containing tags.


It represents plain old text so treat it like plain old text.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] E4X: reading CDATA

2011-06-20 Thread Henrik Andersson

Merrill, Jason skriver:

var kids = xmlData.children(); // gets me the CDATA content without the![CDATA[ 
or ]]
var kidscdata:String = kids[0].toString();


That seems unnecessary unless I don't understand your question.  Wouldn't  var 
kids:String = theXMLNode.text() work?


The text method returns an XMLList just like the children method. It 
just is limited to the text nodes.

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


Re: [Flashcoders] Stage video

2011-06-16 Thread Henrik Andersson

John R. Sweeney Jr skriver:

Everything I've found on the web about stage video is Flex examples. Has
anyone used this new class with Flash? If so, any links to examples of usage
would be greatly appreciated. I've searched my drive and don't appear to
have the class files for things like StageVideoAvailabilityEvent, so now I
want to be sure I'm not barking up an empty tree. :)



It is in playerglobals.swc, it is not a separate as file.

You need an updated version of flash in order to use StageVideo.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Stage video

2011-06-16 Thread Henrik Andersson

John R. Sweeney Jr skriver:

I have the 10.3 plugin and Flash CS5. I haven't installed CS5.5 yet, but a
friend has it and he doesn't have the playerglobals.swc file either.



He isn't looking hard enough then. All versions of flash comes with 
several playerglobals.swc files, one for each player version.

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


Re: [Flashcoders] Detecting if line crosses movie clip

2011-06-16 Thread Henrik Andersson

Glen Pike skriver:

Hi,

Can you measure the vector distance between the centre of the polygon
and the centre of the ball? If that is 0,0, and the diameter of the
circle is less than the smallest of width / height of the box, then you
are inside.

Glen



Not in all cases:
http://img694.imageshack.us/img694/8197/horseshoeq.png
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] RE: HTMLLoader not loading [SOLVED]

2011-06-14 Thread Henrik Andersson
I think that this is likely due to the quoted requirements. It can not 
be scaled, rotated, filtered, color transformed or anything of that fun 
stuff. Somehow the root had something on that list.


Mendelsohn, Michael skriver:

OK, after two days of total stress, I figured I'd document the solution I just 
found, for the public good:

The HTMLLoader instance gets listener Event.COMPLETE prior to the load() call.

// rootReference is my document class, extending Sprite

// works:
rootReference[stage][addChild](rootRef[docViewer]);

// does NOT work:
rootReference[addChild](rootRef[docViewer]);

It turns out the HTMLLoader needs to be added in the topmost possible order, so 
add it to the stage, not just the doc class.

Time for a nap,
- MM




I'm *desperately* trying to figure out why an AIR project's HTMLLoader won't 
load any pdfs, just showing blank.  Web pages load fine.

Based on documented known limitations (below): scaleX, scaleY, and alpha of the 
HTMLLoader are all 1, and rotation is 0. The window isn't transparent.  The 
htmlLoader instance is at the top of the displayList. I set scaleMode to 
NO_SCALE.  A simple test AIR file worked fine.  It's got to be something about 
my file, but what can I double check?

___
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


Re: [Flashcoders] AS3 is it possbile to show a movieclip before its all frames loaded

2011-06-13 Thread Henrik Andersson

B Shankar PEDANA skriver:

Hi,

Is it possible to show a movieclip before all its frames(say 100 frames) or
when its first frame is loaded?



That is the default, flash will start rendering a swf file as soon as it 
can, only pausing if it gets ahead of itself.


The Event.INIT event will tell you when this happens.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] as3 component screen redraw

2011-06-08 Thread Henrik Andersson
My gut instinct says that something is messing with the delay rendering 
system that the components are using.

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


Re: [Flashcoders] sneaky AIR

2011-06-08 Thread Henrik Andersson

Karl DeSaulniers skriver:

Hello all,
Has anyone here heard of the PrivateEncriptedDatak keychain that Adobe
has?


That's not even spelled correctly. I don't buy it.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Incubator updates

2011-05-22 Thread Henrik Andersson
Since nobody else has done this, I might as well do it. It's old news by 
now, but it doesn't hurt to tell people about it.


The flash player incubator have updated and added new features.

http://labs.adobe.com/technologies/flashplatformruntimes/incubator/

Here is the feature list for those who can't be bothered to check the 
page out.


Media/Real Time Communications

* G.711 audio compression for telephony
* H.264/AVC SW Encode for camera encoding

Language/VM

* JSON (JavaScript Object Notation)
* GC Advice
* Socket Progress Events
* Pause/sleep/resume Events

Security

* Secure random number generator
* TLS (Transport Layer Security) sockets
* TLS socket policy file


Oh and they still got that previous incubator stuff too, like Molehill 
and cubic bezier curves.

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


Re: [Flashcoders] typechecking ActionScript 3.0

2011-05-20 Thread Henrik Andersson
Isn't the playerglobals.swc file part of the player definition? As such, 
it is referenced by an xml file in the 
$flashroot/common/configuration/players folder.

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


Re: [Flashcoders] TypeError: Error #1034:

2011-05-17 Thread Henrik Andersson

Roland López skriver:

hello everyone im having some trouble meaking a php contact form  the error
that returns me is this :

TypeError: Error #1034: Type Coercion failed: cannot convert
fl.controls::Button@2e35f0b1 to flash.display.MovieClip.
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at com.gaiaframework.templates::AbstractBase()
at com.gaiaframework.templates::AbstractPage()
at com.FGaiaLT.pages::FormPage()



Sounds about right, since that class does not extend that other class.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] is there a dsp lib with analysis using zero crossing in as3

2011-05-11 Thread Henrik Andersson

Anthony Pace skriver:

Hello list,

I have been doing some experiments, but although my stuff is working, it
isn't optimized at all, and I would to try a reliable lib that uses zero
crossings for analysis, if one exists.

Any suggestions?

I am really just interested in pitch analysis with very small sample
chunks. Timber is not really necessary, so I, with my limited DSP
knowledge, think the FFT is overkill; however, I absolutely admit I
could be wrong and not seeing something important.

Another thing is that I was thinking a good/cheap way to get rid of some
low level background noise would be to normalize all values within the
time domain with a very high gain factor, and just give max and min
values for the zero crossings( e.g +3, -3 respectively... I know the
numbers would obviously not be these ones). I know know frequency
analysis would have to be preformed in order to remove a voice, but I am
thinking that this could allow me to zero out/ignore, really low
level/really high level background noise. Should I try something different?

Again, I have just started reading through a copy of 'DSP: a computer
science perspective', that someone gave me, and it seems like what I am
talking about would work; yet, if not, and you have experience with
signals analysis, I would appreciate the heads up.

Thank you,
Anthony
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



Try a high pass filter.

Also, here is some additional reading for you:
http://www.dspguide.com/pdfbook.htm

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


Re: [Flashcoders] XMLList Namespace Madness

2011-04-29 Thread Henrik Andersson
Start by throwing away the XMLList wrapper, what you really have is a 
single XML element, stop trying to pretend otherwise.


Once you have the XML instance, just call the namespace method with the 
prefix to get the correct Namespace instance to use.


Or even simpler, create the Namespace object directly from the used url.

With that done it is a simple matter of using the namespace qualifier 
operator 
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/operators.html#name_qualifier.

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


Re: [Flashcoders] f4v video does not play in test mode

2011-04-26 Thread Henrik Andersson
The test player in the IDE is too old. f4v support was added to the 
player after CS 3 was released.

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


Re: [Flashcoders] Something I don't understand about loader

2011-04-24 Thread Henrik Andersson

Steve Abaffy skriver:

what is going on here???


Each DisplayObject can only be on one display list. Trying to add it to 
another one when already on a list will automatically remove it from the 
first one before it is added to the second one.

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


Re: [Flashcoders] Something I don't understand about loader

2011-04-24 Thread Henrik Andersson

Steve Abaffy skriver:

Great then how do I use the same image in two different spots??


In general it is impossible.

But bitmaps are an exception. You see, by using the same BitmapData 
instance with multiple Bitmap instances you can save a lot of memory by 
showing the same data as many times as you want.

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


Re: [Flashcoders] Test if class is attached to document or symbol?

2011-04-21 Thread Henrik Andersson

Micky Hulse skriver:

Basically, I needed a way to test if my class was assigned to the FLA
as a Document Class, or, if it was assigned to movieclip/sprite in
library (export for actionscript) and added to stage manually.



You are missing two cases:

The first one is if it was never added to any symbol.

The second one is if it is assigned to a symbol that has a timeline 
instance.

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


Re: [Flashcoders] Test if class is attached to document or symbol?

2011-04-21 Thread Henrik Andersson

Micky Hulse skriver:

After I posted my code, I changed this line:

public class Test extends Sprite {

... to this:

public class Test extends MovieClip {

I assume that is how I would account for a timeline instance?


Nope. Timeline instances can, but doesn't have to, be Sprites too. And 
the change is in fact useless for the purpose of detecting this scenario.

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


Re: [Flashcoders] Variable scope with asynchronous SQL connection

2011-04-20 Thread Henrik Andersson

Mattheis, Erik (MIN-WSW) skriver:

  1.  The SQLConnection is asynchronous. Is there a possibility the function variable 
sql would get garbage collected before the event handler fires?


It is a local variable. Yes, it is up for garbage collection the instant 
the function returns. So if the event happens after that (as you said it 
will) then the garbage collection may happen before that.

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


  1   2   3   4   5   6   >