Re: [Flashcoders] objects can't delete themselves right?

2007-05-25 Thread Jonathan Fung

Actually, the output makes perfect sense.
The object foo was only storing a reference to the unnamed function that
traces I still exist.
When you called delete on foo, you only deleted the reference and not the
unnamed function. It is NOT orphaned because you previously assigned bar to
the same unnamed function. Even so, why bother? flash's GC is capable of
sweeping orphaned unnamed functions. (every time you call
some_movieclip_mc.onEnterFrame = undefined; for example)

I'm not sure if the delete operator works on function objects, but by all
means try delete _root.foo.hello instead...

and for more about flash's GC see
http://www.kaourantin.net/2005/09/garbage-collection-in-flash-player-8.html

Jonathan

On 5/25/07, Steven Sacks [EMAIL PROTECTED] wrote:


Correct me if I'm wrong, but I thought objects could not delete
themselves, and if you delete an object with a function and store a
reference to that function before you delete it, that function is
orphaned and will never be cleaned up by the GC.  Am I wrong?

I have a trivial test to demonstrate what I'm seeing.  I create an
object (foo) and have a method of foo delete foo.  Before it does,
though, I create a reference (bar) to another method of foo (hello).
After I call foo.bar, it says the object and its functions are
undefined, but the reference to the function still works.


foo = {};
foo.del = function()
{
delete _root.foo;
};
foo.hello = function()
{
trace(i still exist);
};
bar = foo.hello;
trace(foo =  + foo);
trace(foo.bar =  + foo.del);
trace(foo.hello =  + foo.hello);
foo.del();
trace(foo =  + foo);
trace(foo.bar =  + foo.del);
trace(foo.hello =  + foo.hello);
bar();


Outputs --

foo = [object Object]
foo.del = [type Function]
foo.hello = [type Function]
foo = undefined
foo.del = undefined
foo.hello = undefined
i still exist


I'm not understanding what's going on here.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


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

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


[Flashcoders] DropShadowFilter failure

2007-04-11 Thread Jonathan Fung

Hey List,

I recently had DropShadowFilters that randomly failed when applied via AS2
to a MovieClip with a BitmapData attached.
It looks like if I had about 4 or 5 BitmapData images attached, one random
MovieClip with the filter wouldn't show anything at all until it was forced
to redraw by messing with xscale and yscale.

I worked around it by applying the filter to the BitmapData directly, but
I'm curious as to the cause... anybody encounter something similar?  Was I
maxing out flash player's bitmap memory limit or something?  (for the time
being I'm blaming the resource hog / kernel hack called norton internet
security 2007 that management insisted on installing... =P)


thanks,
Jonathan
___
[EMAIL PROTECTED]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: [Flashcoders] Site Check [dm9ddb.com.br]

2007-03-26 Thread Jonathan Fung

Very slick :)

another quick observation - some items get overlapped
since placement appears random, i can't provide a reliable example

might be a good idea to hide/fade out items that are less than an arbitrary
distance from the viewer's position to avoid this.

On 3/26/07, Wagner Amaral [EMAIL PROTECTED] wrote:


Just a tip?

http://blog.deconcept.com/swfobject/

It's nice, anyway
(e vai brasil! =P)



On 3/26/07, Mauricio Furtado Massaia [EMAIL PROTECTED] wrote:

 Hi guys,

 Wagner Paula and I have worked on DM9DDB´s WebSite and we are really
proud
 of this job.
 The navigation and design are a little bit oldskool. In fact everything
on
 this site was made by OOP Classes and Standard code what really makes me
 happy about that.

 I would like to get some comments about how is it for you guys.

 Looking forward for your comments.


 http://dm9ddb.com.br

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

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

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

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


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

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


Re: [Flashcoders] Flashpaper - removing a flashpaper mc properly seems impossible

2006-11-23 Thread Jonathan Fung

that's correct -  i simply loadclip using the old mc. same code as
adobe's tutorial. but i reiterate - never tried it on a large document
so i dont know if it'll work in your case

On 11/23/06, Tom Shaw [EMAIL PROTECTED] wrote:

I have altered my code but I dont seem to be having much luck.  Would you
care to share some code for your loading process?  Do you just loadclip over
the old flashpaper mc and the rest as per the help files?

Cheers,
Tom


On Wed, 22 Nov 2006 11:08:27 -0500, you wrote:

I'm facing exactly the same problem developing a content browser
(viewing hundreds of single FP pages) in flash 8... My load times jump
from 300ms to 10 seconds if i try to unloadMovie() first. I haven't
found a solid fix, but I do have a partial workaround - don't unload
the flashpaper. At least with my single pages I've managed to keep it
from taking more than 500ms in subsequent loads. If this scales to
your 90 pages (maybe) you could shave off a good portion of those 30
extra seconds if you just load the clip over the existing one.


hope that helps,
Jon

On 11/22/06, Tom Shaw [EMAIL PROTECTED] wrote:
 Im on flash 8 Pro creating a projector to view Flashpaper documents.  I
have tried various methods to remove a Flashpaper instance from memory.
Sure the document goes off screen and gets deleted from the mc tree but the
memory is still occupied by the flash player.
 The problem gets worse the next time you try to load up a Flashpaper
document.  You take a massive performance hit loading a document up after
removing a previous one.  The documents I am talking about here are 90 or so
pages, one document is about 4mb.  When loading these documents the first
time round it only takes a few seconds for them to load.  thesecond time
round it can take as much as 30 seconds to load up the document introducing
the warning about scripts running slowly.

 Can anyone suggest a better way to entirely get rid of a Flashpaper
document once its been loaded into the stage?

 Cheers,
 Tom

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

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

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

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


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

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


Re: [Flashcoders] Flashpaper - removing a flashpaper mc, properly seems impossible

2006-11-23 Thread Jonathan Fung

well darn... i'll make sure i give that a try on monday for my project
as well...

On 11/23/06, Eric_Tibo [EMAIL PROTECTED] wrote:

I'm using this component with no problems...

http://www.digitalflipbook.com/archives/2006/07/flashpaper_comp_3.php

I've set all the possible listeners as in the help doc and unloading any
FP before loading a new one and everything is fine...

Tell me if it works for you...

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

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


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

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


Re: [Flashcoders] Flashpaper - removing a flashpaper mc properly seems impossible

2006-11-22 Thread Jonathan Fung

I'm facing exactly the same problem developing a content browser
(viewing hundreds of single FP pages) in flash 8... My load times jump
from 300ms to 10 seconds if i try to unloadMovie() first. I haven't
found a solid fix, but I do have a partial workaround - don't unload
the flashpaper. At least with my single pages I've managed to keep it
from taking more than 500ms in subsequent loads. If this scales to
your 90 pages (maybe) you could shave off a good portion of those 30
extra seconds if you just load the clip over the existing one.


hope that helps,
Jon

On 11/22/06, Tom Shaw [EMAIL PROTECTED] wrote:

Im on flash 8 Pro creating a projector to view Flashpaper documents.  I have 
tried various methods to remove a Flashpaper instance from memory.  Sure the 
document goes off screen and gets deleted from the mc tree but the memory is 
still occupied by the flash player.
The problem gets worse the next time you try to load up a Flashpaper document.  
You take a massive performance hit loading a document up after removing a 
previous one.  The documents I am talking about here are 90 or so pages, one 
document is about 4mb.  When loading these documents the first time round it 
only takes a few seconds for them to load.  thesecond time round it can take as 
much as 30 seconds to load up the document introducing the warning about 
scripts running slowly.

Can anyone suggest a better way to entirely get rid of a Flashpaper document 
once its been loaded into the stage?

Cheers,
Tom

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

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


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

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


Re: [Flashcoders] looking for win app to parse SWF header

2006-11-22 Thread Jonathan Fung

swfdump from swftools (www.swftools.org)

you get output like this
[HEADER]File version: 6
[HEADER]File is zlib compressed. Ratio: 85%
[HEADER]File size: 6389517 (Depacked)
[HEADER]Frame rate: 20.00
[HEADER]Frame count: 52
[HEADER]Movie width: 327.25
[HEADER]Movie height: 400.00

On 11/22/06, Boon Chew [EMAIL PROTECTED] wrote:

Does any of you know of a good simple swf header parser out there that works on 
Windoze?

Looking for a quick way to obtain the swf frame size (height, width), frame 
rate, etc.

Thanks.


-
Sponsored Link

Mortgage rates near 39yr lows. $510,000 Mortgage for $1,698/mo -   Calculate 
new house payment
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


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

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


Re: [Flashcoders] am i stupid?

2006-11-08 Thread Jonathan Fung

use a mouse event listener... you'll be glad you did (especially if
you have other buttons on stage)

On 11/8/06, John VanHorn [EMAIL PROTECTED] wrote:

onMouseDown works fine.which got me to thinking that when your on the
root, onMouseDown and onPress are essentially the same event, since your
mouse is always over the root. that makes sense.

but, at least to me, it doesnt make sense that one works and the other one
doesnt.

On 11/8/06, Carl Welch [EMAIL PROTECTED] wrote:

 what about onMouseDown?


 --
 Carl Welch
 http://www.carlwelch.com
 [EMAIL PROTECTED]
 805.403.4819

 On 11/8/06, John VanHorn [EMAIL PROTECTED] wrote:
  on the root timeline:
 
  this.onPress = function(){
trace(this);
  }
 
  does not work? the _root/_level0 movie does not take onPress or
 onRelease?
  other events like onMouseMove or onEnterFrame work finewhy not
 onPress?
  how have i not run into this before?
 
  --
  John Van Horn
  [EMAIL PROTECTED]
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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




--
John Van Horn
[EMAIL PROTECTED]
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


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

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


Re: [Flashcoders] preventing scientific notation

2006-11-06 Thread Jonathan Fung

That may be true, but flash and any other program is still limited by
the IEEE floating point specs double precision limits. Flash cannot
internally represent 21 digits without resorting to scientific
notation. If you add a stray '1' to your 21 digit number as the least
significant digit you'll find that the number is not changed.
i.e.
var number1 = 10;
var number2 = 11;

trace(number1 == number2); // traces 'true'

depending on how you're communicating with the server, you may have to
stream it in as binary data and write your own 'bigint' (like java)
class to parse it, or use a server side script to parse it into a
string format for flash.

Jonathan

On 11/6/06, Hans Wichman [EMAIL PROTECTED] wrote:

Hi Chris,
thanks for your reply.
According to the manual flash should be able to handle numbers up to
1.79769313486232e+308?
Mine is 1e+21 so it seems i should have a little way to go before i max
out:).

Threading the number as a string isnt possible, since the webservice
interface requires Int64.
If i cast the number i get from the service to a string, my string reads
1e+21

Any ideas?
JC


On 11/6/06, Chris Benjaminsen [EMAIL PROTECTED] wrote:

 Hi Hans

 The numbers you are trying to store are way to large for Flash to handle
 as a number.
 If you however just thread the numbers as strings it should work
 perfectly.

 /Chris

 Hans Wichman wrote:
  Hi list,
 
  i need to talk to webservices which pass me back very large db id's,
  which
  im using again to request more info.
  However when i do (for example):
  var b:Number = 10;
  trace (b);
  it prints 1e+21
 
  Now when I use this value as an argument to this webservice it seems to
  fail.
  When I use a tool like wsstudio2 and copy and paste the long version, it
  works fine.
 
  Any ideas on how to fix this?
  greetz
  JC
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com

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

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

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

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


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

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


Re: [Flashcoders] preventing scientific notation

2006-11-06 Thread Jonathan Fung

oops... i forgot to mention (and the above would be confusing
without), 21 digits exceeds the maximum representable in 32 bits
afterwhich flash resorts to floating point. (flash doesnt support
int64 apparently, otherwise you'd have no problems)

On 11/6/06, Merrill, Jason [EMAIL PROTECTED] wrote:

According to the manual flash should be able to handle numbers up to

Don't believe everything you read in the help docs. ;)

Jason Merrill
Bank of America
Learning  Organizational Effectiveness





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

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


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

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