Re: [Flashcoders] TLF: Questions... My situation... Your thoughts?

2011-04-18 Thread Henrik Andersson

Kevin Newman skriver:

... I don't think they are loaded from Adobe's servers


Check the publish settings, the exact url list for each RSL is listed 
there. TLF defaults to being loaded from Adobe's servers.

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


Re: [Flashcoders] TLF: Questions... My situation... Your thoughts?

2011-04-18 Thread Henrik Andersson

Micky Hulse skriver:

Thanks for all the additional information Kevin and Henrik!

Just out of curiosity, do you guys (or others on the list) use TLF
text boxes much?


I have yet to need it. I don't to such projects.

Besides, I find it fun to work with the direct flash.text.engine classes.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] TLF: Questions... My situation... Your thoughts?

2011-04-17 Thread Henrik Andersson

Micky Hulse skriver:

Does TLF text add much additional Kb to a document?



Some people think so. It's a few hundred kb. But with the RSL preloader 
that cost is offloaded to the Adobe hosts. You only pay for the 
preloader that is just a few kb.

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


Re: [Flashcoders] TLF: Questions... My situation... Your thoughts?

2011-04-16 Thread Henrik Andersson
Long story short, the TLF library is implemented in actionscript. Said 
library is hosted on adobe's servers.


In order to use the library, the player must have loaded it. The default 
solution to this used by Flash is to wrap the main movie in a separate 
preloader movie.


This system is called RSL, or runtime shared libraries.

The preloader will load the embedded swf file (it uses the 
DefineBinaryData swf tag for that) and the swz file. This is done 
because otherwise you would get some nasty verify errors when the movie 
tries to refer to a class that isn't defined at that point.


The effect is that your main movie is no longer the main movie, 
removing luxuries like being able to use the stage before the 
constructor finishes.


It also complicates the code for loading such a movie into another 
movie. You have to get thru the preloader movie in order to access the 
main movie.


Luckily, this mess is solved for you by Adobe, use the SafeLoader class 
that they have written. It will pretend to be a normal Loader that loads 
a normal movie, letting you ignore the RSL preloader stuff.

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


Re: [Flashcoders] Simulating image in textfield in AIR

2011-04-06 Thread Henrik Andersson

Mattheis, Erik (MIN-WSW) skriver:

 For AIR content in the application security sandbox,


You don't have to run in the application security sandbox.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] useCapture = true is faster?

2011-04-05 Thread Henrik Andersson

Capture happens before bubbling.

Go for the capture phase if it works for you and you need to shave a few 
microseconds.


Just remember that the capture phase does not extend to the actual target.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Reusing an Image

2011-03-29 Thread Henrik Andersson

Kevin Holleran skriver:

then do something like this?


Good start, but I suggest using a vector here to make the code simpler.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Reusing an Image

2011-03-28 Thread Henrik Andersson

You might want to have a look at the Bitmap.bitmapData property.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] IE not releasing memory after unloading Flash object

2011-03-16 Thread Henrik Andersson

Karl DeSaulniers skriver:

Hi Chris,
I was rummaging around in one of my php.ini files and found this nifty
little tid bit.
Take a look.


; After this number of seconds, stored data will be seen as 'garbage' and
; cleaned up by the garbage collection process.
session.gc_maxlifetime = 1440


Seems you can set a max lifetime for your garbage collection in your
php.ini file. (Depending on your server I am guessing)
Don't know if you have investigated that option, but if you haven't...

Best,
Karl


Uhm, that's not even remotely relevant. That is the cleanup threshold 
for abandoned sessions on the server. It has nothing to do with client 
side memory allocations.

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


Re: [Flashcoders] Simple encapsulation question

2011-03-16 Thread Henrik Andersson

Mattheis, Erik (MIN-WSW) skriver:

I have a typical tabbed layout and am trying to figure out the simplest/best 
way to reset the focused state on the focused tab when another is clicked.

Classes:

Tab - contains graphics and a public variable referencing the MovieClip of the 
over state.

Header - creates tabs, adds event listeners, contains array of references to 
tabs and a function to loop through them and remove the over state child.

Is there a better way - to somehow add an event listener to each tab listening 
for a click on each other tab? Even if I don't know how many tabs there will be?

_ _ _
Erik Mattheis | Weber Shandwick
P: (952) 346.6610
M: (612) 377.2272
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




The last time I did a tab system I used a different approach. I let each 
tab worry about the drawing, but I let the container manage what tab is 
selected. This way it is easy for the manager to just tell the previous 
tab that it is no longer selected and to tell the new tab that it is 
selected.

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


Re: [Flashcoders] Duplicate varibale definition

2011-03-16 Thread Henrik Andersson
The way I would do it is to assign each clickable object the url it 
needs to go to in a property and then use a single event listener that 
reads the property to know what url to use.


If I was in a really fancy mood I would look into using a component 
definition to allow the url to be easily set without scripting.

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


Re: [Flashcoders] Getting Data into my SWF

2011-03-14 Thread Henrik Andersson

Developer skriver:

Wouldn't it also be helpful to have the server-side script verify
(validate) the data the swf is sending back up?
That way if someone manually triggered the date, the server would not
accept it because it doesn't match it's system date.

Don.




You have a point. The server can reject anything that the client sends.

But at the same time you also fail to get it. The client doesn't have to 
care for what the server does. So what if the server doesn't like the 
date? The client has no obligation to care about that.


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


Re: [Flashcoders] Getting Data into my SWF

2011-03-14 Thread Henrik Andersson

Kevin Holleran skriver:

Thanks to everyone for all of your responses.

What is going to happen, is the application is going to hold a coupon.  That
coupon will be retrieved from a database and passed into the Flash
application.  I guess as I am writing this, the script will just check the
date and if it is not correct, it can simply not return the coupon.  My
question revolved around a user manipulating the date passed into the flash
application and causing the coupon to show up before the countdown is really
up.



Well, in that case the server has a chance to withhold data until it is 
satisfied, so that should be perfectly hacking proof.

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


Re: [Flashcoders] Getting Data into my SWF

2011-03-14 Thread Henrik Andersson

Jordan L. Chilcott - Interactivity Unlimited skriver:

Unless the client is actually displaying a countdown, it has no need for the data. All 
the client needs in this case is a polling mechanism to occur on a set interval, whether 
or not it intends to display any countdown down. No data needs to be pass back to the 
server. All the client is essentially asking is coupon?. Server either gives 
a coupon or something else that is of no use for anyone to manipulate.

jord


To elaborate on that idea:

Client asks the server and the server either sends the coupon or the 
time left. The client then acts differently depending on the received 
data. This way there is only one request made in either case.

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


Re: [Flashcoders] Getting Data into my SWF

2011-03-11 Thread Henrik Andersson

Glen Pike skriver:

Hello,

The parameters that you pass to the SWF in your HTML are different to
communicating with a back-end system.

If you look at URLLoader in actionscript. This enables you to load data
as you would load a web-page.

You would use URLLoader with your server-side code, e.g. PHP to do GET
and POST type requests:

This way, your users cannot inject their own date and it is also
possible to have login type facilities.



You clearly haven't heard of HTTP request sniffers. With something like 
Fiddler http://www.fiddler2.com/ I can easily override the reply from 
any server.


And no, SSL does not help there. I can authorize any certificate 
authority I feel like, including my own one.


And for any other checksum/validation I can always just edit the swf 
file to skip the check.


In the end it is the same ages old trusted client problem. You just 
can't protect code that runs on the client.

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


Re: [Flashcoders] Getting Data into my SWF

2011-03-11 Thread Henrik Andersson

Merrill, Jason skriver:

Then you need to provide each user with a computer controlled by you and a 
competent guard
You clearly haven't heard of


And he's clearly new to this stuff as he said is his original post, so lay off 
 play nice.  There's no reason to respond to people like that. The whole reason for 
these forums is so people can ask questions about things they don't know about, and 
they shouldn't have to feel intimidated.



Point taken. My briefness makes me sound rude. I need to watch my 
wording and remember to include enough facts to support my comments for 
the unexperienced people.


I've stopped counting how many times I've done this kind of mistakes. My 
apologies to everyone involved. Rest assured that no harm was meant. My 
urge to ensure that people on the Internet are right makes me do 
mistakes once in a while.

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


Re: [Flashcoders] Getting Data into my SWF

2011-03-10 Thread Henrik Andersson

Kevin Holleran skriver:

 I am not
concerned with the user SEEING the data, I just don't want them to be able
to load the SWF in a way that they would be able to pass in their own
values.


Then you need to provide each user with a computer controlled by you and 
a competent guard to prevent the user from tampering with the hardware.

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


Re: [Flashcoders] newbie class question

2011-03-09 Thread Henrik Andersson

Kian Chang skriver:

Hi all, thanks for taking the time to read this and help a newbie out.
I'm just getting my feet wet with AS3 as I've finally decided to
abandon the AS2 way of life.

I'm trying to use CustomOrientation.as, and I keep getting 3 errors in
my main .fla file, error 1180: Call to a possibly undefined method
addFramScript.

1067: Implicit coercion of a value of type Class to an unrelated type
flash.display.StageOrientation

5000: The class 'CustomOrientation' must subclass
'flash.display.MovieClip' since it is linked to a library symbol of
that type

In my main.fla file I call CustomOrientation and I have the line:  new
CustomOrientation(stage, true, true, false, false); in the code in the
first key frame, any help would be greatly appreciated.



The first one means that you need to subclass MovieClip if you use any 
framescripts. Either move the framescripts to the class or extend MovieClip.


The second one means that you somewhere are trying to use the 
StageOrientation class as an instance of it. I am not sure where that 
error is, but you should be getting a good linenumber in the compiler 
error list.


The last one is just garbage caused by the other errors. Ignore it, it 
will disappear when the rest of the errors goes away.

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


Re: [Flashcoders] Rendering limitation? Bitmap goes poof.

2011-03-04 Thread Henrik Andersson
Filters rend to bitmaps. Said bitmaps have maximum sizes. You actually 
get a trace entry when this limit is hit.

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


Re: [Flashcoders] Automatic quality toggle

2011-03-03 Thread Henrik Andersson

Kevin Newman skriver:

I have pretty good experience exporting to QuickTime right from Flash -
though others swear it's problematic (maybe they are doing it wrong?).



Maybe they are using actionscript?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Automatic quality toggle

2011-02-26 Thread Henrik Andersson

Christoffer Enedahl skriver:

It sounds like it's time to encode the flash animation to video.



For some of the cases, yeah. You are right in that encoding to video 
would solve the issue for local playback. Give me a shout when you find 
a tool that actually can do it properly.


But it is not acceptable for online distribution. I myself hate people 
uploading video encodings of their vector animations. It's needlessly 
big files and the quality just isn't as good as the source material.

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


[Flashcoders] Automatic quality toggle

2011-02-25 Thread Henrik Andersson
I have been thinking a lot about the problem of optimizing animation 
playback. I know that some people here are unfamiliar with working with 
real animations and have been doing applications instead. Please 
consider this aimed at real animations like in movies and games.


While the best solution is to simply make the animation simpler so that 
it is easier to render, that is far from an easy, or even possible solution.


Instead the idea is to dynamically adjust the rendering quality. But as 
I will explain, it is far from a simple task.


Please excuse any too easy for me explanations, I aim for a post that 
any developer can read and understand.



As most of you know the Flash player have three main rendering quality 
options, low, medium and high quality. There is also the option to go 
for best, but that is largely the same as high.


What the rendering quality control mainly controls is the subpixel 
rendering. When flash detects that a shape has an edge on a non integer 
position it will do subpixel rendering for that pixel.


The subpixel rendering is surprisingly simple, flash just scales up the 
area (factor 2 for medium, 4 for high) and renders the new pixels. It 
then takes the average value of the pixels and uses that as the value of 
the real pixel. Low quality skips subpixel rendering completely.


Now, this does change the rendering cost quite a lot. As such, it is the 
stock option for controlling rendering cost in the player.



What some people may not know is that the Flash renderer is smart enough 
to skip frames. What this means is that if it detects that it is too far 
behind it will simply skip the drawing step and move directly on to the 
next frame. This can happen multiple times in a row in severe cases.


This is rather easy to detect. If the drawing skip is skipped, so is the 
Event.RENDERED event. Just by checking if there was one between 
Event.ENTER_FRAME events it is possible to see if the previous frame was 
skipped.


Similarly you can get a good estimate of how long the frame took to draw 
by computing the time between the Event.RENDERED event and the 
Event.ENTER_FRAME event. It is not perfect since it includes the wait 
after the rendering, but that is not a problem in practice.



Now we define the problem. We want to draw the graphics at the highest 
possible quality, but without forcing Flash to skip frames. To do this 
we have the option of changing the current rendering quality before each 
frame is rendered.


In more specific situations we also have the option of changing various 
effects, but for easy discussion we will stick to just the rendering 
quality.


So the question becomes, what is the condition for changing quality?


A naïve option is to change the quality if the previous frame took too 
long to render.


A slightly better option is if we can pre-render each frame and get the 
rendering cost on a reference machine. Then we can scale the reference 
value to the current machine based on a known reference point, a 
previously rendered frame.


However, this approach has the issue of the rendering cost not scaling 
linearly between machines. The largest reason is that different machines 
might be displaying the animation at different sizes. As rendering in 
different sizes can change cost geometrically this makes it hard to 
scale properly.



A different idea that I have been thinking about is to use the frameskip 
amount as a deciding factor. However, I think that it may lead to 
similar results as the rendering time.



Furthermore complicating things is the fact that changing the rendering 
quality invalidates the dirty region caching that the player does. While 
the effect of this differs depending on the animation being suitable for 
the dirty region system, it is a possible cost. There is also the issue 
of it being jarring to the user when the quality does change.


The solution to that seems to be hysterics, that we have a threshold 
before changing back.



Overall, this is a complicated matter and I am requesting feedback from 
people with experience dealing with this issue.

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


Re: [Flashcoders] Automatic quality toggle

2011-02-25 Thread Henrik Andersson
You bring up a lot of valid points, but you fail to focus on the main 
concern here, how to deal with the graphics being the most heavy part.


Please keep in mind that I am trying to focus on how to deal with 
animations that can't be simplified much. I am looking for a generic 
solution to the issue of the graphics taking too long to draw.


Reducing complexity is of course a good idea. And yeah, filters are 
expensive and provide little benefit most of the time.


But what can you do when you have exhausted your options to edit the 
content? You only got the quality setting left to use.



With that said, you bring up some important points about how much 
frameskip can be tolerated.


Also, thanks for reiterating my own points about how to capture 
performance statics.


That part is easy. But it is what to do with the gathered data that I 
worry about. How do you decide on the thresholds? Can you successfully 
predict when it is worth to change the quality?

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


Re: [Flashcoders] Automatic quality toggle

2011-02-25 Thread Henrik Andersson

Ktu skriver:
 But what can you do when you have exhausted your options to edit the
 content? You only got the quality setting left to use. - maybe then
 you've got to re-evaluate what you are doing or use the quality settings.

  How do you decide on the thresholds? Can you successfully predict when
 it is worth to change the quality? - Trial and error will probably be
 the only way,... ?

  I am looking for a generic solution to the issue of the graphics
 taking too long to draw. - Your solution will have to be based off of
 your requirements. A totally generic solution probably won't be
 actualized until more specific solutions are gathered, anaylized and 
merged.


 If your render phase of the elastic racetrack is consuming more than the
 entire frame/slice, then I think you will have a serious problem on your
 hands.

   If you share your requirements, maybe an appropriate solution could be
 determined.


Well, I am aiming for a solution for animators. They don't have any code 
running. They are just animating. Often they aren't doing anything 
wrong. It is just too much.


I got some rather stupid heavy animations if you want to see them, I 
can't say that they are doing anything wrong. The load just becomes 
unbearable in fullscreen.


And when I say animations I mean stuff worthy of showing on TV. The 
original task that Flash dealt with.


I want to find something to help animators who have some heavy scenes. 
They just love drawing detailed animations. And I just love watching the 
results, they are quite nice looking.


I just wish that more people had things like vcams and as such, I aim to 
make the best tools. The remaining thing is a simple quality auto toggle.

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


Re: [Flashcoders] flash.filesystem not in Flash?

2011-02-23 Thread Henrik Andersson

Merrill, Jason skriver:

Or if you switch to a Flash wrapper tool like mProjector or Zinc.



Wrappers are lame compared to AIR if you ask me.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] flash.filesystem not in Flash?

2011-02-23 Thread Henrik Andersson

Merrill, Jason skriver:

i think AIR has negated the need for these windowless flash wrappers - are 
these still in production?


Yes, the tools are still out there. AIR requires installation of the AIR 
runtime first.  The wrappers do not, they are standalone .exes.  For first time 
user, it would be a two-step installation to run an AIR app. So it depends on 
what your client needs/wants and what the user can do.  For example, AIR is not 
an approved tech in our environment, so if this were us, we'd have to look at 
other options.



Because it is much easier to get a random wrapper approved than AIR. Oh 
wait, it shouldn't be.


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


Re: [Flashcoders] how to get a byteArray of multiple sounds?

2011-02-17 Thread Henrik Andersson

Pierrick Pluchon skriver:

Hi List,

I'm currently working on a little musical app with multiple sounds. Think of
it like a piano - each key plays a different note. What i'm trying to do is
to record my whole composition as a byteArray and to export it as wav file.
The export is ok, i get good results when I play one note at a time, but
when I play more than one note at a time, the notes come out separately,
instead of as a chord.
I thought i could use SoundMixer.computeSpectrum(), but it doesn't work, or
at least i get a really shitty sound.
Any suggestions?


Sound.extract combined with your own mixing.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] how to get a byteArray of multiple sounds?

2011-02-17 Thread Henrik Andersson
You need to do your own mixing. First you need a way to get each note 
and then a way to know when each note should play.


With that information you can start mixing, read the value of the first 
sample from each note currently playing and add them together, this is 
the mixed value. Now write that out and you have mixed one sample worth 
of audio.


Repeat a few million times, but with the next samples and you are done.

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


Re: [Flashcoders] Quick greeting

2011-02-16 Thread Henrik Andersson

John R. Sweeney Jr skriver:

TestŠ

TestŠ

Is this mic on?



Nope. Try this one:
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] OTish MP3 files for a piano scale

2011-02-08 Thread Henrik Andersson

Kerry Thompson skriver:

... and volume controls wouldn't be able to emulate different attacks.


Yes they could. Who is to say that you can't make the control change 
based on the frequency?

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


Re: [Flashcoders] OTish MP3 files for a piano scale

2011-02-08 Thread Henrik Andersson

Kerry Thompson skriver:

Henrik Andersson wrote:


... and volume controls wouldn't be able to emulate different attacks.


Yes they could. Who is to say that you can't make the control change based
on the frequency?


Of course you could base the volume control based on the frequency.
You could emulate louder notes, but I'm not talking about a
good-enough sound. I'm talking about a realistic piano sound.

There is much more that goes into the attack than volume, though.
There are overtones; noise (the hammer hitting the strings, for
example); the speed of the rise and fall, which vary by note, and
affect the harmonics differently; and other factors.

The attack, sustain, and decay are much too complex to be accurately
reproduced by simple volume control.



Accepted, no _simple_ volume control would do. The overtones and the 
noise would have to be properly simulated too. It's just a matter of how 
much effort you want to put into it.


But I think that we can agree that he is not asking for something even 
close to what you'd tolerate.

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


Re: [Flashcoders] OTish MP3 files for a piano scale

2011-02-07 Thread Henrik Andersson

Kerry Thompson skriver:

Maybe one of the musical geniuses on the list knows. In the meantime,
I'll ask some of my musician/computer friends.



I'd try the classical software synth approach. Pianos are pretty close 
to sine waves with an envelope filter controlling the amplitude and some 
reverb I've read.

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


Re: [Flashcoders] OTish MP3 files for a piano scale

2011-02-07 Thread Henrik Andersson

Kerry Thompson skriver:


I would use midi, then. Midi capabilities are pretty much universal
these days, and you'll need a lot smaller download. Plus, mp3's have a
lag on startup--not bad, but it gets annoying pretty quickly. Midi
won't have that problem.



Except for the tiny detail that Flash doesn't do MIDI.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Events for setChildIndex, swapChildren, swapChildrenAt

2011-02-06 Thread Henrik Andersson

ekameleon skriver:

Sorry... I forget :

or handle the added events with addEventListener( Event.ADDED , .. or
addEventListener( Event.ADDED_TO_STAGE



That's not enough, what about stuff getting removed? What about two 
things swapping positions? Is there even an event for the last thing?

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


Re: [Flashcoders] Screen rendering problem

2011-01-28 Thread Henrik Andersson

Karl DeSaulniers skriver:

Also, if I am not mistaken, you should never cacheAsBitmap on any
moving objects.
I believe this is a no no on the processing end of flash as it has to
cache it every time it moves.
Unless it is a very small graphic.. but then why would you need to cache
it. :)

Best,
Karl


The idea is to draw the object once and reuse the already drawn copy. It 
is ideal for when the object remains unchanged but has moved to a new 
position.


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


Re: [Flashcoders] Call method by name: A few questions...

2011-01-15 Thread Henrik Andersson
You want the getDefinitionByName function, not the dynamic property 
access syntax.


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


Re: [Flashcoders] Flash Player 10.2 RC

2011-01-12 Thread Henrik Andersson
(About fullscreen with multiple monitors) I can't believe that they are 
claiming that fixing a on-and-off bug for the last couple of years is a 
feature.

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


Re: [Flashcoders] How to utilize this code:public staticconst: Needhelp understanding...

2011-01-12 Thread Henrik Andersson

Ivan Dembicki skriver:

Hello Merrill,


This message w/attachments (message) is intended solely for the use of the 
intended recipient(s) and may contain information that is privileged, 
confidential or proprietary. [...]


- are you sure? this list is public.


Yeah, people need to turn off their boilerplate signatures.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] test

2011-01-11 Thread Henrik Andersson

Mendelsohn, Michael skriver:

Test: is the list alive?



No, it died, the funeral is on feb 29.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Problems when converting to Number

2010-12-19 Thread Henrik Andersson

Anthony Pace skriver:

trace(Number('1992.2'));

//why does it output 1992.3
//I am assuming I am missing something pretty obvious


First it is parsed to binary floating point, losing accuracy and then it 
is output as decimal form again, losing accuracy again.

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


Re: [Flashcoders] problem with adding two digits

2010-12-14 Thread Henrik Andersson

tom rhodes skriver:

yup interesting that the old AVM gives you what you'd think...


Pure luck, you might have compiled against something that happened to 
drop the decimal instead .


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


Re: [Flashcoders] Components With Pure ActionScript

2010-12-13 Thread Henrik Andersson

it...@aol.com skriver:

Hello,

Am wondering whether it is possible to generate the basic Flash components
like buttons, checkbox and scrolling fields with pure ActionScript (no
Flex),  i.e., without placing them in the Flash IDE library.

Thanks,

Daniel A



No.

They need their skin symbols. And they need their swc too, without it 
they can't be included by the compiler. Putting the component in the 
library links in the swc in addition to copying the skin symbols.


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


Re: [Flashcoders] fscommand Issue.

2010-12-12 Thread Henrik Andersson

Omar Fouad skriver:

Hello all,

I'm trying to call a function in JavaScript from a SWF file (AS3).
fscommand(start, 1);
This function works fine. However, when I pass a variable to the fscommand
parameters argument, JavaScript doesn't work:
fscommand(start, myString); // this doesn't work.

Am I missing something?



How about the ExternalInterface class?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] RE: swf not compiling

2010-12-11 Thread Henrik Andersson

David Benman skriver:

I've had intermittent problems compiling on with CS4 on Mac OS X. I think its 
usually something with the IDE environment rather than the specific Flash 
project. These are things I try.


You forgot the classic of nuking the profile directory.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Masked mc and total size

2010-12-08 Thread Henrik Andersson

Glen Pike skriver:

mc.mask.width?


What if the maskee is smaller? What if the mask and the maskee only 
partially overlaps?

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


Re: [Flashcoders] Masked mc and total size

2010-12-08 Thread Henrik Andersson

natalia Vikhtinskaya skriver:

Mask is 100px width. Image is 200px width. Putting 3 masked mc in one
container don't give 300px width.



True, but if you put the image at (0,50) the visible size is 50 pixels. 
That is, assuming that the image has the registration point in the top 
left corner. And that the mask covers the region (0,0) to (100,100).


My point is that you can't just take the width of the mask or the maskee 
but have to actually check how they intersect.


Good luck if the mask/maskee isn't rectangular and/or rotated.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Masked mc and total size

2010-12-08 Thread Henrik Andersson

natalia Vikhtinskaya skriver:

How I can check how they intersect? Can you explain at this example
how I should calculate total size?



You can find the bounding boxes with the getBounds method and take it 
from there. But it is still only the bounding boxes. And things do get 
complicated when things are scaled, rotated or otherwise transformed.

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


Re: [Flashcoders] E4X strangeness

2010-12-06 Thread Henrik Andersson

Mendelsohn, Michael skriver:

Hi list...

For some strange reason (and I mean REALLY strange), the second statement below 
depends on the first statement.  As far as I can tell, the two lines have 
nothing to do with each other.  When c runs, clickedOne returns an XMLList.  
When c is commented out, clickedOne returns null.

var c:XMLList = topicData[0].descendants(*).(hasOwnProperty(@title)  @title == 
String(u[info][text]));
var clickedOne:XMLList = topicData[0].asset.(hasOwnProperty(@title)  (@title == 
String(u[info][text])));

Could it somehow be that initializing var c creates something that's next 
needed for the var clickedOne to evaluate properly?



I can't see any reason how this should happen. But my gut instinct says 
that you should decompile the output and see how the generated loops 
look like.

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


[Flashcoders] Deep diving into playerglobals.swc

2010-12-02 Thread Henrik Andersson
I am sure that most people here know what playerglobals.swc is, but I 
might as well explain it anyway.


The playerglobals.swc file is used by the compiler to know how the flash 
player api looks like. It lists all the classes, packages and so on.


What may not be immediately obvious is that it includes everything, not 
just the documented features. But it also exposes some code that is real 
normal actionscript code.


By unpacking the swc (just a renamed zip) and decompiling the contained 
swf you can see all of this.


Some of the highlights are the ExternalInterface class and the URLLoader 
class. They are nearly completely made out of normal actionscript code.


But there is also several plain undocumented features. Let me list what 
I know of:


* adobe.utils.ProductManager - AIR application manager thing, also 
related to the flash player self updating.
* flash.trace.Trace - No idea what this is, but the source code to the 
class is in the tamarin repository.
* Object._propertyIsEnumrable, Object._setPropertyIsEnumrable - 
Prototype inheritance stuff.
* flash.automation.* - My guess is that this is related to the 
colaboration with google regarding automated spidering of swf files.
* flash.display.AVM1Movie - It has some unusable features to actually 
talk to the movie.
* flash.display.MovieClip - I hope that you all know of the 
addFrameScript method by now.
* flash.system.Security - The disableAVM1Loading and sandboxType 
properties. Rather self explanatory properties.
* flash.system.System - The nativeConstructionOnly method. No idea what 
this one is for. But it seems to want something constructible.

* flash.system.Capatibilites - The _internal property.
* flash.ui.MouseCursorData - A new one for 10.2 I believe. It allows you 
to provide your own real os level mouse cursor. Also see the new 
Mouse.registerCursor method. It is rather self explanatory how to use it.

* flash.utils.SetIntervalTimer - Not sure what the point is for this one.

I wonder if there is anything else that I may have missed. In any case, 
it would be fun to have some clarity in the less understood parts.

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


Re: [Flashcoders] Getting bitmap data after successfully loading a swf file

2010-12-01 Thread Henrik Andersson
There are several ways to get at the assets. The most obvious one is to 
simple ask the code in the loaded swf to give you what you want. You can 
use all the fancy factory patterns that you've been reading about this way.


Personally I keep it simple and just store each thing in an object that 
I can then read from the main swf.


But you don't need any code in the loaded swf at all, you can just use 
the getDefinitionByName function.

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


Re: [Flashcoders] Testing display object if its MovieClip or BitMap?

2010-12-01 Thread Henrik Andersson

Micky Hulse skriver:

trace(getQualifiedClassName(loadedDisplayObject));
Would that be the best way to test for MovieClip or Bitmap?


It fails the empty base class test. It is an extremely bad way.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Testing display object if its MovieClip or BitMap?

2010-12-01 Thread Henrik Andersson

Karim Beyrouti skriver:

attached a class that does that, hope it helps...


The mailer ate it.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Getting bitmap data after successfully loading a swf file

2010-11-30 Thread Henrik Andersson

SWF files are not bitmaps. Stop trying to treat them like bitmaps.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Advice on calling subscriber script on another server

2010-11-25 Thread Henrik Andersson

Paul Steven skriver:

I realise this is probably something that requires a crossdomain.xml file on
the other server but this is not possible.


Why not? Did you even ask the people responsible for the server? Either 
they are going to fix it quickly or they are going to turn you down.


And if they turn you down, then you shouldn't be doing this to begin with.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Advice on calling subscriber script on another server

2010-11-25 Thread Henrik Andersson

Paul Steven skriver:

Therefore [I] doubt...


Quit being so lazy and contact them already.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Advice on calling subscriber script on another server

2010-11-25 Thread Henrik Andersson

Paul Steven skriver:

Thought I could get some help here not labelled lazy!



You do realize that it takes just as long to simply ask the site in 
question right?

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


Re: [Flashcoders] ARgb to Rgb

2010-11-23 Thread Henrik Andersson

Karim Beyrouti skriver:

Thanks Karl,

had seen that one, but it slightly confused me, i go this out of it which is 
kindof wrong:

private function ARGBtoRGB( argb : uint ) : uint {
var alpha:uint = (argb  24  0xFF );
return alpha % argb
}


My head hurts from trying to figure out what that is supposed to do.

Here is the one liner that you want:

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


Re: [Flashcoders] Iterating internal list of definitions

2010-11-23 Thread Henrik Andersson

Tom Gooding skriver:

Hi- does anyone know if it's possible to access the list of definitions 
available by 'linkage' in an external swf?


Short of manually parsing the file, nope.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How to detect for modifier (alt/ctrl) keys

2010-11-19 Thread Henrik Andersson
I am curious, does the key say Alt or AltGr? They are not quite the 
same.

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


Re: [Flashcoders] Set HTTP cookies with navigateToURL()

2010-11-13 Thread Henrik Andersson

Alexander Farber skriver:

My problem is, that I can't find the way to set HTTP cookies
through the navigateToURL() method. Please advise me


Normally it would be the same as any other http header, it's part of the 
URLRequest class.


However, the cookie related headers are on the blacklist. Adobe very 
specifically says that you may not set it.

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


Re: [Flashcoders] How to view and edit alternate content

2010-11-12 Thread Henrik Andersson
Run the flash player uninstaller? They actually provide one, just for 
cases like this.

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


Re: [Flashcoders] Actionscript 4?

2010-11-09 Thread Henrik Andersson
They don't need a new major version. They need a new minor version. A 
little bigger than the Vector addition.

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


Re: [Flashcoders] MAX

2010-10-26 Thread Henrik Andersson

Merrill, Jason skriver:

And don't forget the free Droid 2s they gave us and Martha Stewart paying a  
visit. :)



I didn't those parts where important enough to mention.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: Removing movieClip from memory

2010-10-26 Thread Henrik Andersson

Jeremy Hicks skriver:

We've created a class for tracking what is in memory. It doesn't add any 
cleanup functions but it gives a good indicator what's there so you can see if 
your efforts are having a positive effect.



Can't you use the flash.sampler package to track things automatically?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Removing movieClip from memory

2010-10-25 Thread Henrik Andersson

Objects can not be destroyed explicitly.

You need to do your own cleanup work and then wait for the garbage 
collector to reclaim the memory.


The garbage collector is unpredictable and may or may not run at all. If 
you need any specific work done at a specific time, do it yourself.



Also, the stopAllSounds method is a bad hack. It really does stop all 
the sounds. Even ones that you may have wanted left alone. I never use it.

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


[Flashcoders] MAX

2010-10-25 Thread Henrik Andersson
For those that missed the keynote, let me do a quick summary of the 
Flash relevant stuff:


* Hardware accelerated 3D
* Hardware accelerated Video
* The Flash platform has more devices, including settop boxes, blueray 
players and tvs.

* Game controller support

Watch the rerun on http://max.adobe.com/online/monday/ if you want to 
see the full thing.

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


Re: [Flashcoders] Converting fla to mov

2010-10-24 Thread Henrik Andersson

Karl DeSaulniers skriver:


Oh and any Movieclips you have that play content inside them,
move their content to a new layer on the main timeline.


Unless you need them to be scripted. Like perhaps it's a particle 
effect. Or even worse, a virtual camera.

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


Re: [Flashcoders] Converting fla to mov

2010-10-23 Thread Henrik Andersson
The built in exporter is crap and doesn't deal with actionscript. You 
might get better luck with a 3rdparty solution.

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


Re: [Flashcoders] Converting fla to mov

2010-10-23 Thread Henrik Andersson
I would rather use a dedicated tool. Googling swf to video should find 
most of them.

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


[Flashcoders] RFC: Performance monitor

2010-10-22 Thread Henrik Andersson

I have been working on a little tool to detect lag.

It simply draws a little square with a number showing how long the last 
frame took to rend. The square changes color depending on the detected 
frameskip. Anything over some flashes of yellow is grounds for concern.


Is there anything about this that I can improve? Or even worse, did I 
make any mistakes?


At least test it with your own content, it might be able to give you 
valuable insight on where you have rendering issues.
package HTools {

import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;

public class PerformanceMonitor extends Sprite {

private var logFile:ByteArray;

private var renderTime:uint;
private var exitTime:uint;
private var enterTime:uint;
private var prevEnterTime:uint;

private var saveRef:FileReference;

public var logging:Boolean=false;

public var totalSkippedFrames:uint;
private var tempFrameSkip:uint;
public var lastFrameSkip:uint;

public var checkTimeline:MovieClip;

private var label_txt:TextField;

private var realtime:Boolean=true;

public function PerformanceMonitor() {
addEventListener(Event.ADDED_TO_STAGE,init);
logFile=new ByteArray();
label_txt=new TextField();
var format:TextFormat=new TextFormat();
format.align=right;
label_txt.defaultTextFormat=format;
label_txt.selectable=false;
label_txt.width=25;
label_txt.x=-4;
addChild(label_txt);

contextMenu=new ContextMenu();

var logEntry=new ContextMenuItem(Log);

logEntry.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,doLog);
contextMenu.customItems.push(logEntry);
}

private function init(e:Event):void {
addEventListener(Event.EXIT_FRAME,exit);
addEventListener(Event.RENDER,render);
addEventListener(Event.ENTER_FRAME,enter);

addEventListener(MouseEvent.CLICK,toggle);
buttonMode=true;
}


private function redraw():void {

graphics.clear();

if(logging) {
graphics.lineStyle(1,0xFF);
} else if(realtime) {
graphics.lineStyle(1,0xFF00FF);
} else {
graphics.lineStyle(1,0x00);
}

label_txt.textColor=0x00;//set each frame so that 
it can be overriden eventually later

switch(lastFrameSkip) {
case 0:
graphics.beginFill(0x88);
break;

case 1:
graphics.beginFill(0xE0E000);
break;

case 2:
graphics.beginFill(0xFF6600);
break;

default:
if(lastFrameSkip=stage.frameRate) {
graphics.beginFill(0x00);
label_txt.textColor=0xFF;
} else 
if(lastFrameSkip=(stage.frameRate1)) {
graphics.beginFill(0x00);
label_txt.textColor=0xFF;
} else 
if(lastFrameSkip=(stage.frameRate2)) {
graphics.beginFill(0x7E);
} else {
graphics.beginFill(0xFF);
}
break;
   

Re: [Flashcoders] (no subject)

2010-10-21 Thread Henrik Andersson

John Goodman skriver:


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



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


Re: [Flashcoders] FileReference

2010-10-21 Thread Henrik Andersson

Lehr, Theodore skriver:

1061: Call to a possibly undefined method save through a reference with static 
type flash.net:FileReference

Why would it work in one but not the other?


Because only one of them targets FP 10 where the method was added.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Actionscript 3 and Flashplayer 8

2010-10-19 Thread Henrik Andersson

Beatrix Krümmer-Frau skriver:


Am 18.10.2010 14:08, schrieb Henrik Andersson:

The old flash player will ignore the swf tags related to as 3.

This means: as long as I write AS3 syntax without as 3 specific classes
it can work?


No, not only would that be completely useless practically, but it's not 
even possible. The old player does not have the new vm. They don't 
understand the bytecode and they don't know of the tags related to it.



New players will ignore as 2 related tags when the swf declares that
it is as 2.


I dont think this is true, as even new players detect as 2 and play it.


Please pay more attention, I explicitly stated that they only do it when 
the swf is declaring that it uses as 3.


The fact that I have already tested this should be evidence enough.



I actually asked a guy I know (nickname jan_flanders) to make a tool
to create a swf with both as 2 and as 3 code. It's not that useful in
practice, but at least I can prevent the main timeline from running
wildly on way too old players and can show an version error screen.

But if you want to code the application twice (u mad?), the tool is
designed to be able to do it.

I am mad on the fact: 80% of my customers want and use as2.

Thanks a lot in advance, and still searching adobe site for
documentations


They don't document this. And the tool is not publicly available. I am 
happy to send it to whoever asks for it, but it is not for people who 
doesn't even understand what it does.


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


Re: [Flashcoders] Actionscript 3 and Flashplayer 8

2010-10-18 Thread Henrik Andersson

Beatrix Krümmer-Frau skriver:


Hi all,

I am searching informations about using Actionscript 3 for projects,
which have to run in old, old Flash Versions. I need arguments for
customers who still work with Actionscript 2.
Any suggestions are welcome, will do a paper on this issue.

Thanks in advance



The old flash player will ignore the swf tags related to as 3.
New players will ignore as 2 related tags when the swf declares that it 
is as 2.


I actually asked a guy I know (nickname jan_flanders) to make a tool to 
create a swf with both as 2 and as 3 code. It's not that useful in 
practice, but at least I can prevent the main timeline from running 
wildly on way too old players and can show an version error screen.


But if you want to code the application twice (u mad?), the tool is 
designed to be able to do it.

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


Re: [Flashcoders] Actionscript 3 and Flashplayer 8

2010-10-18 Thread Henrik Andersson

strk skriver:

I disagree. There is NO _free_ player supporting AVM2 movies.
Free player means virtual support for _any_ platform.



You must be using some definition of free that doesn't involve beer.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash CS4 to Flash CS5: Size Problem

2010-10-08 Thread Henrik Andersson
Save as XFL and report back what files are taking up the majority of the 
size.

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


Re: [Flashcoders] Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray

2010-10-03 Thread Henrik Andersson

Dave Watts skriver:

I'm trying to compress XML data being exchanged via Socket with a Perl
backend and after taking several hurdles, I'm stuck at this error message:

1061: Call to a possibly undefined method inflate through
a reference with static type flash.utils:ByteArray.


In your code, if there's nothing to read, your exception handlers fall
through after calling handleTcpError. At compile time, the compiler
has no guarantee that there'll be anything in the byte array.



So what? That is no grounds for throwing a compiler error. It's your job 
to ensure that stuff is setup properly at runtime.


A runtime issue will never raise a compiler time error.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Call to a possibly undefined method inflate through a reference with static type flash.utils:ByteArray

2010-10-03 Thread Henrik Andersson

Alexander Farber skriver:

On Sun, Oct 3, 2010 at 7:44 PM, Henrik Anderssonhe...@henke37.cjb.net  wrote:

Dave Watts skriver:

In your code, if there's nothing to read, your exception handlers fall
through after calling handleTcpError. At compile time, the compiler
has no guarantee that there'll be anything in the byte array.



So what? That is no grounds for throwing a compiler error. It's your job to
ensure that stuff is setup properly at runtime.

A runtime issue will never raise a compiler time error.


No, I think Dave has a valid point - if my ByteArray _bytes
is null - because a socket read has thrown an exception,
then the compiler might be able to recognize it (same is in Java).


The compiler does not know that an exception has been thrown. That's 
runtime events. Exceptions are not checked in actionscript, so the 
compiler MAY NOT raise any errors.



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


Re: [Flashcoders] AIR 2 / 10.1 + Microphone

2010-10-02 Thread Henrik Andersson
Trust me on this one, computeSpectrum is not useful for anything but 
music visualization. It provides no gurantees that it wont miss samples, 
in fact, it is highly likely that it will.


That makes it unacceptable for any serious use.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] FLV audio doesn't stop

2010-09-30 Thread Henrik Andersson

Off the display list does not mean not playing.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] CS5 where to put tween engines etc?

2010-09-30 Thread Henrik Andersson

That's the answer to the wrong question.


The truth is that the option is exactly where you are looking, just look 
again.

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


Re: [Flashcoders] RS-232 triggered by Actionscript

2010-09-28 Thread Henrik Andersson
The flash player has no such feature. In fact, most modern OSes doesn't 
even let applications bitbang hardware ports directly.

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


Re: [Flashcoders] correct path

2010-09-28 Thread Henrik Andersson

Misconception correction time!

Read my article:
http://www.actionscript.org/resources/articles/943/1/Actionscript-and-timelines/Page1.html
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Inheritance and abstract classes

2010-09-25 Thread Henrik Andersson

I want it to match examples as:
Bathroom HAS-A Baththub.
Cat IS-A Feline.
Cat IS-NOT-A Simalian, but Cat HAS-A Simalian owner.
MovieClip IS-A Sprite, but a Sprite can HAVE-A MovieClip child.
Loader HAS-A Sprite accessible by the content property.
Bitmap HAS-AN associated BitmapData.
Socket IS-AN IDataOutput, but Socket IS also AN EventDispatcher.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Downloading a .swc library

2010-09-23 Thread Henrik Andersson
SWC files are zip files with swf files inside them (and some other misc 
stuff). The flash player does not know how to deal with them.


You would have to unpack the zip, read the metadata and feed the stored 
swf to Loader.loadBytes.


Or you could just load a swf like everyone else...

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


Re: [Flashcoders] Inheritance and abstract classes

2010-09-23 Thread Henrik Andersson

Glen Pike skriver:


has a (interfaces) than is a (subclass),


That's wrong. HAS-A is not used for interfaces, it is used for reference 
properties and other forms of containment. Both interfaces and classes 
use the IS-A relation.


You don't say Picture HAS-A IDrawable, you say Picture IS-A IDrawable.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] multi audio channel mp4 video

2010-09-21 Thread Henrik Andersson

https://bugs.adobe.com/jira/browse/FP-3550
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash On The Beach 2010

2010-09-20 Thread Henrik Andersson

David Hunter skriver:

Anyone going to Flash On The Beach next week in Brighton?


Buy me the tickets and I will be there ;)
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] locating point on object

2010-09-14 Thread Henrik Andersson

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


Re: [Flashcoders] locating point on object

2010-09-14 Thread Henrik Andersson
I think you are expecting too much, it's a mailing-list. Discussion 
boards and similar systems doesn't invite to saying thanks.


I am not against it, but personally, I find saying thank you to be a bit 
like noise. It's not very important, but it's nice I suppose.


Then again, I don't want to be thanked, I want to share knowledge. Sure, 
it's definitively nice if I get a reputation, but I don't do it for the 
reputation. I do it because I want to help people.


I guess I am not just big on manners. I focus on actions instead. Not 
answering my questions hurts me far more than not saying thank you.

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


Re: [Flashcoders] locating point on object

2010-09-14 Thread Henrik Andersson

Merrill, Jason skriver:

I think one of the main benefits of saying thank you is it tells the
rest of the list, problem solved, no need to comment further.  So
people don't keep replying, they know the solutions given worked and
problem solved.


Because that has worked so well in the past...

We are clearly never going of track on some tangent and we definitely 
don't argue about which solution is better.

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


Re: [Flashcoders] Zooming

2010-09-13 Thread Henrik Andersson

Lehr, Theodore skriver:

Is there anyway to zoom into a mc and make sure a certain point on an object 
(just an image converted to a mc in this instance) is always in the center?


Yes, with geometry.

I recommend using a virtual camera, since it will take out a bunch of 
complicated (but far from advanced) math. Then you just need to center 
the camera on the spot using simple geometry.

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


Re: [Flashcoders] Zooming

2010-09-13 Thread Henrik Andersson

Glen Pike skriver:

You should be able to find a nice virtual camera class on Bitey castle
guys website. http://www.biteycastle.com/


I prefer my own one, you can stick a camera in a camera with it and it's 
simpler. But that one isn't half bad either.

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


Re: [Flashcoders] Apple backing off. Why?

2010-09-10 Thread Henrik Andersson

Carl Welch skriver:

I don't believe apple really gives a crap about developers. We can
thank the FTC probe for their sudden change of policy. I still feel
burnt by Mr. Jobs.



I must have missed that, what probe?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Namespaces vs friends

2010-09-10 Thread Henrik Andersson
I have been thinking about namespaces in as and have realized that they 
can be considered a solution to the same problem that friends solve in c++.


I wonder which solution is the best.

Namespaces are defined once and can be used by multiple files, while 
friends needs to be listed fully for each class.


Namespaces are like passwords and friends are like access lists.

Yet namespaces are also like groups.

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


Re: [Flashcoders] Playing With Fire

2010-09-10 Thread Henrik Andersson

You don't want a mask. You want a bitmap with alpha values.
If you really need two bitmaps, you can use the alpha blend mode to 
combine them during rendering.

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


Re: [Flashcoders] Playing With Fire

2010-09-10 Thread Henrik Andersson

George Jones skriver:

Any other thoughts?


Don't try to use the alpha channel on a bitmap that doesn't have one.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Best (fastest/memory efficient) way to animate bitmaps

2010-09-09 Thread Henrik Andersson

allandt bik-elliott (thefieldcomic.com) skriver:

i was always under the impression that the best way of doing that (for games
sprite animations for instance) is bitmap 'blitting' where you use a
tilesheet and then use bitmap draw to pull the current frame you want to
show into your actual sprite


I think that's not the fastest way. It's still copying the pixels. I am 
fairly sure that not copying the pixels is infinitely faster.


My money is on the one Bitmap/multiple BitmapData solution. It should be 
using the least amount of memory and have no data copying at all.


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


[Flashcoders] Apple changes their guidelines

2010-09-09 Thread Henrik Andersson

http://www.apple.com/pr/library/2010/09/09statement.html
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Apple changes their guidelines

2010-09-09 Thread Henrik Andersson

Nathan Mynarcik skriver:

That link is not even a page long...


True, but it's not the actual agreement either.

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


<    1   2   3   4   5   6   >