Re: [FlashCoders] Delegates and performance

2006-10-24 Thread janosch

 The same conclusion though, as long as you clean up your references to
 delegates, which means no object.addListener (click, 
Delegate.create())

 constructions, you'd be fine and there is no need to get all paranoid:).

Thats exactly what i think.

In most cases, there is even no problem using addListener with Delegate 
because

1) the listener is never removed, because it is always needed
2) the dispatch object itself is removed

cheers, Janosch



Hans Wichman schrieb:

Lol ok, checking your links, it seems Dimitrios posted his problems on 
his

game performance back then when he had the issues, and most of whom have
responded now, responded back then as well, myself included.

The same conclusion though, as long as you clean up your references to
delegates, which means no object.addListener (click, 
Delegate.create())

constructions, you'd be fine and there is no need to get all paranoid:).

cheers
JC


On 10/24/06, Hans Wichman [EMAIL PROTECTED] wrote:



Sorry Muzak last time I checked your links didnt work, but forgot to
report it.
Ill check m now.


 On 10/24/06, Muzak [EMAIL PROTECTED] wrote:

 As I mentioned earlier, this is a really old discussion:
 http://www.peterjoel.com/blog/?archive=2004_08_01_archive.xml
 
http://chattyfig.figleaf.com/pipermail/flashcoders/2005-June/140994.html


 http://muzakdeezign.com/flashcoders/?q=delegate
 http://muzakdeezign.com/flashcoders/?q=remove%20delegate

 etc..

 regards,
 Muzak

 - Original Message -
 From: Hans Wichman [EMAIL PROTECTED]
 To: Flashcoders mailing list  flashcoders@chattyfig.figleaf.com
 Sent: Tuesday, October 24, 2006 1:52 PM
 Subject: Re: [FlashCoders] Delegates and performance


 Hi,
 i agree, but it is only true, as long as there is a reference to the
 inline
 function.
 The text seems to suggest that although the reference to the inline
 function
 is gone, it still stays on memory.

 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


Re: [Flashcoders] TextInput Component display problem

2006-08-16 Thread janosch

Hello,

ComboBox-Instances are not removed instantly, because they use the 
onUnload-Event, which takes one frame to be executet. (see ComboBox.as 
line 661)
You can either fix this by modifing the Component or MonkeyPatching it, 
or you can wait one frame between the first form step, and the second one.


Janosch




Patrick Matte schrieb:


Hi, I am building a 2-step form with flash 8 components. For the first step,
I¹m attaching a MovieClip which has a few instances on stage of TextInput,
ComboBox, RadioButton and CheckBox.

For the second step, I remove the step 1 movieclip using removeMovieClip and
replace it with a second movieclip which has only TextInputs. Everything
looks normal except that the text inside won¹t show up.

The problem seems to come from the RadioButton and ComboBox from Step 1
because the step 2 TextInputs show up nicely if I delete them.

Is there an issue with the TextInput component used with RadioButton or
ComboBox?

Anybody ever went through a similar problem ? Any idea welcome.

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

2006-08-11 Thread janosch

Hello,

some time ago i postet at flashforum.de how this can be done, without 
drawbacks to the rest of the application:

http://www.flashforum.de/forum/showthread.php?t=207998
Its in german but the code is more or less internation :)

Janosch





Matthias Dittgen schrieb:


Hello list,

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

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

Thanks,
Matthias
___
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] x,y coordinates of a character

2006-08-02 Thread janosch
When using Flash 8, you can use the Method 
BitmapData.getColorBoundsRect, that will be faster.


Janosch



Robert Gordon schrieb:


Hey List!

I'm trying to find a way to determine the stage coordinates of a character
within a dynamically constructed text field (multiline, wrapping, html
formated). I've experimented with Erik's TextFieldExtension - but the html
formatting  wrapping seem to throw it off. Anyone have another solution?
One thought I had was to recolor the field to white, colour the character of
interest to non-white, convert to a bitmap object and walk it pixel by
pixel. Can't imagine that's going to be very efficient though...

Thanks in advance for any suggestions,

r o b


| Robert Gordon
| The Article 19 Group Inc.
| phone: 514.938.8512
| email: [EMAIL PROTECTED]
| http://www.article19.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] Array Empowerment

2006-07-26 Thread janosch

uniq is the appropriate function

Janosch



Mike Mountain schrieb:


Yup good to see, an optimised remove duplicate items would be good, or
have I missed it?

 


-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Hans Wichman

Sent: 26 July 2006 10:41
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Array Empowerment

Hi Steven,
awesome, very welcome additions.
Would addIfNotPresent (in want of a better name), 
getRandomItem(with the option of deleting that randomItem), 
randomizeOrder , make any sense to add as well? Or am I 
missing something (with respect to the code that is).


greetz
Hans


   


___
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] Can I assign a Class to the main timeline?

2006-07-21 Thread janosch

This is a very nice explenation, thanks!

Janosch



Mark Winterhalder schrieb:


On 7/21/06, JulianG [EMAIL PROTECTED] wrote:


Thanks you Patrick and Weyert!

I tried Patrick's approach and it worked.
I had never used this __proto__ thing before.
Besides this, what do you use __proto__ or prototype for? I never use
it. Maybe I'm missing something.



__proto__ is a property every object has (except Object.prototype, I
guess), pointing ot its prototype. It's the way inheritance works in
the Flash VM, the Prototype Chain.

Say you have Foo extending Bar. Then any instance myFoo of Foo will
have myFoo.__proto__ == Foo.prototype, and Foo.prototype.__proto__
will point to Bar.prototype. Since Bar only inherits from Object,
Bar.prototype.__proto__ will point to Object.prototype.

Now, when you try to access a property of myFoo, the VM will first
check if your instance has it itself. If not, it will check its
__proto__, than the __proto__ of the __proto__, and so on, until it
eventually ends up at Object.prototype. If that doesn't have it,
either, it will call myFoo.__resolve() and pass a string with the
identifier of what had been tried to be accessed as an argument, and
use what you return as its value.

So, if you do...:

var myFoo = new Foo();
myFoo.__proto__ = Foobar.prototype;

then you modify the inheritance, your myFoo will have all the methods
an instance of Foobar would have.

Think of how it used to be done in AS1 (still works, BTW). You'd
create a class by declaring a constructor function:

function Foo () {
  this.text = hello world!;
}

to inherit from Bar, you'd create a new instance of Bar and assign it
as Foo's prototype:

Foo.prototype = new Bar();

Some didn't like to instantiate an instance of the parent class to
inherit from, so they did this instead (causing lots of interesting
discussions whether or not to stick with documented features, as
__proto__ was undocumented back then):

Foo.prototype.__proto__ = Bar.prototype;

To add methods (or properties), you'd attach them to that prototype:

Foo.prototype.sayHello = function () {
  trace( this.text );
};


So, instead of myFoo = new Foo(), you could also do:

var myFoo = {};
myFoo.__proto__ = Foo.prototype;
myFoo.__constructor__ = Foo;
Foo.apply( MyFoo );

Which is precisely what you're doing right now, except for the last
line which calls the constructor.

HTH,
Mark
___
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] Difference between null and undefined?

2006-07-19 Thread janosch

little error in !foo, correct like this:

if (!foo) {
// This will never run.
trace('foo');
}




Mike schrieb:


You can actually just use (!var) in most cases.

if (!undefined) {
// This will always run.
trace(undefined);
}
if (!null) {
// This will always run.
trace(null);
}
if (!false) {
// This will always run.
trace(false);
}
if (!0) {
// This will always run.
trace(0);
}
if (!) {
// This will always run.
trace('');
}
if (!.length) {
// This will always run.
trace('.length');
}
if (!foo) {
// This will always run.
trace('foo');
}
if (![].length) {
// This will never run.
trace([].length);
}
// Conversely...
if (!foo.length) {
// This will always run.
trace('foo.length');
}
if (!true) {
// This will never run.
trace(true);
}
if (!1) {
// This will never run.
trace(1);
}
if (!-1) {
// This will never run.
trace(-1);
}
if (!(Math.random() + 1)) {
// This will never run.
trace(Math.random() + 1);
}
if (!{}) {
// This will never run.
trace({});
}
if (![]) {
// This will never run.
trace([]);
}
--
T. Michael Keesey

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rifled
Cloaca
Sent: Wednesday, July 19, 2006 8:00 AM
To: Flashcoders mailing list
Subject: [Flashcoders] Difference between null and undefined?

FlashCoders,

I've recently been upgrading some old Flash MX code to Flash 8, and have
been running into issues where properties return 'undefined' instead of
'null'.  I seem to recall that undefined was introduced in Flash 7.
I've
always been confused about when something is undefined versus null, so I
always check for both. { (var != undefined  var != null) }

Is there an explanation somewhere regarding the difference between
undefined
and null, and when to expect which?  If not, can someone who understands
explain it?

Thanks in advance!

-rc
___
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] Difference between null and undefined?

2006-07-19 Thread janosch
Thats very strange, but in usual case  you do not check for the pure 
value, but for the value, saved in a variable:

a = foo;
trace(!a); // false

Janosch




Mike schrieb:


That's what I thought, too, but when I did the test, !foo evaluated as
true.

trace(!foo); /// Outputs true.
--
T. Michael Keesey

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of janosch
Sent: Wednesday, July 19, 2006 9:39 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Difference between null and undefined?

little error in !foo, correct like this:

if (!foo) {
// This will never run.
trace('foo');
}


___
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] Shared fonts : method with 2 files seems faster that method with 1 file

2006-07-12 Thread janosch

 1) You have total control over which glyphs are
 included directly in the Flash IDE without having to
 use a 3rd party tool like SWFmill.
 Completly opposite on this.
opposite to your opposite :)

I wanted to embed all japanese characters of a font, how do you do this 
with swfmill? I don't want to define them all in the glyphs attribute, 
but i also don't want to embed the whole font.


So my solution for this was:
1) embed the needed characters with Flash
2) decompile the generated swf with swfmill
3) changing the xml so it works as shared font library (adjusted the 
font name)

4) recompile with swfmill.

Greets,
Janosch



erixtekila schrieb:


The shared lib isn't loaded twice.
You just have to wait for a delay frame, in order to
use it.
That's all.


Actually I'm pretty sure it does load twice but I'd be
glad to hear that I'm wrong. Let me show you what I
mean.



Good observation, but wrong tools, IMHO.
I wouldn't want to rely too much on the bandwidth profiler to make 
good  assumptions.
But perhaps the behavior (that I have observed following your test) 
can  perhaps only be for offline use ?


Following your line, I've hosted Zarate's file on a web server.
Requesting the files with firefox and livehttpheaders.
That don't give the same results as yours.
And I would preferably rely on those tools instead.

Here are an output of the session :
---
http://www.v-i-a.net/t/
GET /t/ HTTP/1.1
Host: www.v-i-a.net
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US;  
rv:1.8.0.4) Gecko/20060603 Firefox/1.5.0.4
Accept:  
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/ 
plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive

HTTP/1.x 200 OK
Date: Wed, 12 Jul 2006 14:33:40 GMT
Server: Apache
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html
Content-Encoding: gzip
Content-Length: 567
--
http://www.v-i-a.net/t/index.swf
GET /t/index.swf HTTP/1.1
Host: www.v-i-a.net
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US;  
rv:1.8.0.4) Gecko/20060603 Firefox/1.5.0.4
Accept:  
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/ 
plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.v-i-a.net/t/

HTTP/1.x 200 OK
Date: Wed, 12 Jul 2006 14:33:41 GMT
Server: Apache
Last-Modified: Wed, 12 Jul 2006 14:22:12 GMT
Etag: 18a8b8e-37c-44b50594
Accept-Ranges: bytes
Content-Length: 892
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Content-Type: application/x-shockwave-flash
--
http://www.v-i-a.net/favicon.ico
GET /favicon.ico HTTP/1.1
Host: www.v-i-a.net
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US;  
rv:1.8.0.4) Gecko/20060603 Firefox/1.5.0.4

Accept: image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive

HTTP/1.x 404 Not Found
Date: Wed, 12 Jul 2006 14:33:41 GMT
Server: Apache
Keep-Alive: timeout=15, max=97
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1
--
http://www.v-i-a.net/t/Quadaptor.swf
GET /t/Quadaptor.swf HTTP/1.1
Host: www.v-i-a.net
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US;  
rv:1.8.0.4) Gecko/20060603 Firefox/1.5.0.4
Accept:  
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/ 
plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive

HTTP/1.x 200 OK
Date: Wed, 12 Jul 2006 14:33:41 GMT
Server: Apache
Last-Modified: Sat, 02 Apr 2005 13:48:40 GMT
Etag: 18a8b8f-1b47-424ea2b8
Accept-Ranges: bytes
Content-Length: 6983
Keep-Alive: timeout=15, max=97
Connection: Keep-Alive
Content-Type: application/x-shockwave-flash
--

You'll notice that the shared font lib is requested only once.
As to conclude that the loading appears twice offline and once 
online,  I can't.



On the topic of faux fonts, could you please send me (privatly) a swf  
containing fonts with the Ivan and Bernard technic.

I'll try to figure what permit this behavior.
Shouldn't be to hard.
Perhaps a swfmill not yet implemented feature ?



So that's why I was king of leaning forward the 2 SWF
file per shared font methods used by Ivan and Bernard
because even though there are 2 files instead of one
by shared font:
1) You have total control over which glyphs are
included directly

Re: [Flashcoders] Shared fonts : method with 2 files seems faster that method with 1 file

2006-07-12 Thread janosch

 Simpler than that, omit the attribute glyph of the swfmill's font tag.

No, i already wrote, that i don't want to embed the whole font (this 
would result in +2MByte chinese characters)


Greets, Janosch


erixtekila schrieb:


 1) You have total control over which glyphs are
 included directly in the Flash IDE without having to
 use a 3rd party tool like SWFmill.
 Completly opposite on this.
opposite to your opposite :)

I wanted to embed all japanese characters of a font, how do you do 
this with swfmill? I don't want to define them all in the glyphs 
attribute, but i also don't want to embed the whole font.


So my solution for this was:
1) embed the needed characters with Flash
2) decompile the generated swf with swfmill
3) changing the xml so it works as shared font library (adjusted the 
font name)

4) recompile with swfmill.


Simpler than that, omit the attribute glyph of the swfmill's font tag.

Please refer to swfmill mailing-list for further discussions of that 
**genious** tool.


Best.
---
erixtekila
http://blog.v-i-a.net/

___
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] improving ScrollPane performance

2006-07-10 Thread janosch
Before you start implementing pages, try out to load all the content 
into a simple masked MovieClip and check the performance.


Janosch




André Goliath schrieb:


Andy and Eric,

thanks for your responses :)

Unfortunatly you confirmed what I was afraid of ;)

cacheAsBitmap reveales the problem that the text fields look messy and get
crippled after scrolling or even editing.

A kind of draw only if neccessary would also be impossible to me since the
pane is a kind of editor,
and therefore I do not know what the user wants to see or edit. I would run
into scrolling issues too.

I guess I have to go with plan B 1/2:Implement a pageing system then,...

Thanks,


André

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andy Stone
Sent: Monday, July 10, 2006 5:05 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] improving ScrollPane performance

That might be too much for Flash to handle. You might be able to only load
the MCs that are near the visible area by making a grid and get the
ScrollPane position? -A



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of André
Goliath
Sent: Monday, July 10, 2006 10:59 AM
To: 'Flashcoders mailing list'
Subject: [Flashcoders] improving ScrollPane performance

Hi List,

I´m using Flash 8´s ScrollPane to dynamicly load up to 400 MCs in it. Each
of the loaded MCs gets instanciated from the library and then filled with
some data via AS. The loaded MC contains some HTML textfields and another
movieclip which loads a JPEG using loadMovie directly off-disk (it´s an exe
projector).

Now, once the ScrollPane is populated it takes incredibly long for scrolling
and even typing few chars in the textfields tooks about 5 secs until they
finaly appear.

is there anything I could do to improve the performance of the Scrollpane?
Or is that jsut too much data for Flash to handle?
My plan B would be to break the 400 loaded MCs up into pages but I´d
rather not do that.

Or is there any other component that performs better and could be used as a
drop-in replacement for the original Scrollpane?

TIA

André 


___
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] weirdness passing string to text field

2006-07-05 Thread janosch

Danny Kodicek schrieb:


Chris: Thanks for elaborating on the restrict issue. Looks like I won't
need to explore it just yet, but it's good to know about. (Since I'm
very new to the Flash/Actionscript thing and am learning 'on the job'
with a project deadline looming I'm being pragmatic and just learning
the bits of AS that I need to make the project work. I'll flesh out my
knowledge afterward).
   



Just to clarify: I'm pretty sure the restrict property only affects
user-typed input, not text that you add dynamically with code.

Danny


Thats correct:

_root.createTextField(txt, 1, 0, 0, 100, 100);
_root.txt.type = input;
_root.txt.restrict = abc;
_root.txt.text = hallo; // complete hallo is written into the TextField

Janosch
___
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] Textfield clearing on Enter key

2006-07-04 Thread janosch

Hello,

the text length is 0, becaus at this time, there is no linebrake in the 
textfield.

The Key-Listener is faster than the textfield.
Try this:

_root.createTextField(txt, 1, 0, 0, 100, 100);
_root.txt.type = input;
_root.txt.multiline = true;
_root.txt.wordWrap = true;

_root.clearText = function(id) {
   clearInterval(_root.clearTextIntervalId);
  
   _root.txt.text = ;

};

_root.keyListener = new Object();
_root.keyListener.onKeyDown = function() {
   if (Key.getCode() == Key.ENTER) {
   _root.clearTextIntervalId = setInterval(_root.clearText, 10);
   }
};

Key.addListener(_root.keyListener);


Janosch




Danny Kodicek schrieb:


God knows why this is such a hassle:

I have a chat app that sends messages when the user hits enter. The
input field is multiline (and needs to be, for the sake of elegance).

Hitting enter inserts a line break in the text regardless of what i do
right now. The method reads something like this:

function clearText() {
chat_input.text = ;
trace(chat_input.text.length);
}
kl = {};
Key.addListener(kl);
kl.onKeyDown = function() {
if (Key.isDown(Key.ENTER)) {
clearText();
}
};

After clearText, The input field has 2 blank lines and a text length of
0. I'm hugely confused here, and kind of freaked out.
   



If it's got a text length of 0 maybe it doesn't actually have two blank
lines, it's just not reset its height to where it was before clearing the
text. Try storing its _width and _height and resetting those as part of your
clearText function.

Danny
 


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] Any tools for testing flash applications?

2006-07-03 Thread janosch

Hello,

at osflash you can find a project called AutoTestFlash, which can be 
used for GUI-tests.


Janosch




Vipin schrieb:


Hello All,

I am new to this mailing list and this is my first mail.

We are a company which makes desktop flash/director applications(both
desktop and online).
If there is any reliable tools using which we can automate testing the
applications.

We tried a tool called 'Test Smith', but found not reliable.

Any suggestions? links? which can help us



___
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] the Function class and messing with it

2006-06-22 Thread janosch

Hello,

in AS2 this is not possible, Functions are compiled, local variable 
names get lost, so in the final flash movie, the function does not exist 
the way, you coded it.


Don't know about AS3 ...

Janosch




Meinte van't Kruis schrieb:


Hi folks,

In common javascript it's possible to alert a function and 'see' the
function
as it is.

function test(){
   alert(A);
}

Prints out in javascript excactly as it is, in actionscript you get 
'[Type

Function]'.

Is there any way to somehow to see the internals of a function in
actionscript (2.0, though im curious
bout 3.0 as well)?

It would be fun to do, because one could alter functions run-time that 
way.

I've tried using
external interface to kick a function to javascript, but this won't 
do, just

throws a javascript
error. I also tried Function.valueOf() instead of toString(), but this 
won't

do either.

Anyone has an idea on this one?

thanks!

Meinte
___
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] getTextExtent weirdness

2006-06-22 Thread janosch

Hello,

i always use textfield.autoSize, and it works fine.
But you have to be carefull, to set the correct styles to the textfield, 
before measuring.


Janosch




Danny Kodicek schrieb:



I've noticed a post about this in the archives, but it was described 
as a
Mac issue and I'm getting it on a PC. I'm trying to use 
TextFormat.getTextExtent() to do some image calculations, but I'm 
getting enormous values. I suspect it's because my text includes 
newline characters, but that's just a guess.


The docs say the function is deprecated, but the liveDocs 
emphatically deny this. Anyone got any suggestions?



I've found a few more posts in the archives about this. Everyone says, 
essentially, don't use it - and it looks like it won't solve my 
problem in any case, because it essentially returns the same values as 
field.textHeight / textWidth.


Maybe someone can offer some alternative suggestions. I need to get a 
bitmap representing a menu. It will contain n lines of text, and needs 
to be resized automatically to the extent of the text. So far so 
simple. But the problem I'm having is that field.textWidth (and 
autosize too) crops the text too close, with the result that the top 
and bottom lines of text are both hard up against the edge of the 
image, so that the size of the image is not equal to n* the line 
height, as I need. And without getTextExtent I can't see any simple 
method for finding the height of the line - and in other circumstances 
I might not even know how many lines there are, although of course if 
I know the lineHeight I can get this by ceil(textHeight/lineHeight)


Thoughts welcome
Danny
___
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] Sort within an object

2006-06-19 Thread janosch

Hello,

is Track an array?

Janosch

Mendelsohn, Michael schrieb:


Hi list...

Is there any way to sort within an object:

Track[1][score]
Track[2][score]
Track[3][score]
Track[4][score]
Track[5][score]

All the tracks have different score numeric values.  What's the most
efficient way of getting them in order?  It seems sort and sortOn only
work on arrays.

Thanks,
- Michael M.

___
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] Flash Physics Engine

2006-06-13 Thread janosch

http://www.cove.org/flade/

Janosch

Oliver Lecher schrieb:


Hi,

i am looking for a free flash physics engine.

MFG

Oliver




___
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] Object Listener?

2006-06-12 Thread janosch

No, such thing does not exist.

Perhaps you can use __resolve or getters and setters to hook in the 
getting of properties, and invalidate then your object. But with this, 
you will lose type-safety.


Greetings,
Janosch


Doug Coning schrieb:


Greetings,



Is there an object listener that will trigger if ANY item within the
object is modified?  I know watch will trigger if a specific attribute
is modified, however, I want to trigger an event if any of the
attributes within an object is modified.



My Object is a complex object.  I contains arrays that contain more
objects, that contain more arrays.  I don't want to have to add event
listeners for each array and item within my object. 




Does a single object listener exist that will recognize any change
within an object, no matter how deep it is?



Thank you very much!



Doug Coning 


Senior Web Development Programmer

FORUM Solutions, LLC

This e-mail and any attachment(s) are intended for the specified recipient(s) only and 
are legally protected.  If you have received this communication in error, please 
reply to sender's e-mail address with notification of the error and then 
destroy this message in all electronic and physical forms.
___
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] changing the width of a dynamic text field

2006-06-08 Thread janosch

Oh, thanks a log for [strg] + [shift] + [z], this helps a lot!!!

Janosch

Lanny McNie schrieb:

You don't necessarily need to create it with Actionscript, just remove 
the

transform on it in the IDE.  Text fields that are scaled in the IDE
(stretched) will measure their width adjusted with their scale.

So if you have a 100px wide text field (not stretched), and stretch it to
200px in the IDE (with the transform tool or numerically), the _width 
of the
field is 100px*2.  If you then set the _width with AS to 200px, the 
result

will be 400px (200px*2).

It seems to me that this is an odd way for flash to handle text field
scaling, but if you understand whats happening, its easy to 
circumvent.  As

a developer who frequently receives scaled assets from designers,
CTRL-SHIFT-Z (remove transform) is my best friend :)


On 6/8/06, Phil Glatz [EMAIL PROTECTED] wrote:



At 04:14 AM 6/8/2006, João wrote:
I think is something related to the name of your
textField, if it was created in the designing or programming mode
I got this sample from the ActionScript manual, tested it and it works
fine
   this.createTextField (my_txt,
 this.getNextHighestDepth (), 10, 40, 160, 120);
   ...

Yes; I created it in design mode, rather than
from actionscript.  Your suggestion works
perfectly, so I will use actionscript to create the field.

Why wouldn't it work either way?  I have a
feeling these is something I must do in actionscript before changing the
width.

thanks for your suggetsion, Phil


___
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] relative path issue

2006-06-08 Thread janosch

I don't know why, but this email cam to me like this:

Hello all, 
Painful discovery.  This technique works great on a PC, not on a
MAC.  
Any ideas?

-- Michael




Michael A. Jordan schrieb:

Hello all, 




   Painful discovery.  This technique works great on a PC, not on a
MAC.  




   Any ideas?



-- Michael





___
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] scrollPane

2006-06-06 Thread janosch
User scrollPane.content instead of scrollPane.contentPath to get the 
content-MovieClip.


Janosch

eric dolecki schrieb:


I have a scrollPane inside an accordion - and I'm trying to build up a mc
with UI and have it placed inside the scrollPane... I used to do this 
in the

past, but I forgot how exactly...

some of the code:

child2.genres_sp.contentPath = emptyHolder;   // works no problem
var mc = child2.genres_sp.contentPath.attachMovie(genreSection,
genreSection_+i, i );
// build up clips here...
child2.genres_sp.invalidate();

However,
___
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