My original question to Jason was clarification on *why* (--i -(-1))
would run faster than (i--) as it seemed to me that two calculations per
loop would run slower than 1. Since he used an expression I've never
seen before I figured he might might know the reasoning behind the
optimization.
As to why exactly --i -(-1) runs faster in a while loop than i--, well,
it can't be the same exact pcode or it wouldn't be faster so it must be
less pcode. I didn't bother to verify it myself because at the time,
somebody did for me. It's explained somewhere in the archives. If you
dig, you'll
Hi,
check the code. That could mean that currAttr is defined twice, ie:
function() {
var x = 100;
if(true) {
var x = 200;
..
}
}
On 9/18/06, Jorge Antonio Diaz Gutierrez [EMAIL PROTECTED] wrote:
Ron, I'm working with FlashDevelop 2 RC3, this is the code I use:
import mx.xpath.*
http://www.thecodezone.com/downloads/sqlite.html
Maar geen Mac support.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you
My original question to Jason was clarification on *why* (--i -(-1))
would run faster than (i--) as it seemed to me that two calculations
per
loop would run slower than 1. Since he used an expression I've never
seen before I figured he might might know the reasoning behind the
optimization. It
Hey, thanks J! :)
Seriously, I downloaded the new interface, and noticed two things: 1. It's
great (!), 2. It looks like an upgrade of the original interface.
Anyway it's you who rock and Xray rocks :) And anyone on the list who has
no idea what we're talking about is missing out on the best
It's a hell of a lot easier to
read than the fastest for loop syntax.
for (var i = myArray.length; --i -(-1); ) {}
Actually that would be:
var l = myArray.length;
for (var i = l; --i -(-1); ) {}
Then you're not looking up the length on every iteration..
:p
M
Hi Kurt,
Just a thought - instead of looking for the coordinates to highlight the
keyword, replace the keyword with the same keyword hyperlinked (this would
require the text rendering as html), and link it to the glossary. Then when
searching for another keyword, start with a clean copy of the
Unlike to evaluation of a condition, the initial value should be
evaluated only once anyway.
for (var i = initialValue(); icondition(); i++) {}
function initialValue() {
trace(initial value is evaluated);
return 0;
}
function condition() {
trace(condition is evaluated);
you live and learn.
M
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Fumio Nonaka
Sent: 19 September 2006 14:38
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Find item in array
Unlike to evaluation of a condition, the initial value
Yes - read up on asfunction - very handy for hyperlinked text.
Jason Merrill
Bank of America
Learning Organization Effectiveness - Technology Solutions
-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Karina Steffens
Sent:
You Are a Genius!
thank you so much.
I was fixated on getting x and y.
thank you again!
KUrt
At 09:34 AM 9/19/2006, you wrote:
Hi Kurt,
Just a thought - instead of looking for the coordinates to highlight the
keyword, replace the keyword with the same keyword hyperlinked (this would
You're welcome :)
PS: you should be able to use CSS styles on these links quite easily (with
or without a class designation) so that they appear highlighted, with
different colours for backgrounds, text or both.
-Original Message-
From: Kurt Dommermuth [mailto:[EMAIL PROTECTED]
Sorry - I've been in the hospital for a few months, so I forgot how this
works.
In a class, in its init, I have this code:
my_ns.onStatus = function( infoObject:Object ):Void {
if( infoObject.code == NetStream.Play.Stop ){
callFunction();
}
};
I need
This is why Danny is The Math Man!
BTW, love your book Danny. Can't wait for the next. :)
http://www.amazon.com/Mathematics-Physics-Programmers-Game-Development/dp/1584503300/sr=1-1/qid=1158676544/ref=pd_bbs_1/104-0626050-4073525?ie=UTF8s=books
Charles P.
On 9/18/06, Andreas R [EMAIL
Hi,
a few months? ouch...
callFunction will run in my_ns it's scope, if you want to run it in another
scope you can use Delegate or the apply method.
goodluck
JC
On 9/19/06, eric dolecki [EMAIL PROTECTED] wrote:
Sorry - I've been in the hospital for a few months, so I forgot how this
works.
Hi,
I am wanting to use Flash to deliver tutorials by subscription. I will need to
allow temporary access and subsriber access.
Which collection of technologies do I need to know about to handle the to and
fro between SWF and database?
Do I use a Flash generated XML sent via XML socket to a
I'm getting ready to do a project where I need to create a printable
certificate with dynamic info (such as a name pulled from a database)
for users with Flash player 7.
Does anyone have any recommendations on the best way to handle it.
Can I do so relatively easily without the need for
Hi,
I am wanting to use Flash to deliver tutorials by subscription. I will need to
allow temporary access and subsriber access.
Which collection of technologies do I need to know about to handle the to and
fro between SWF and database?
Do I use a Flash generated XML sent via XML socket to a
Hello List.
I have been racking my brain trying to get the FLVPlayback component to
work with a smil file. I really can't find any good documentation on
this and the Adobe docs are conflicting on how they describe how to do
this. Does anyone have an example of this working (email offlist
Unless the loop is a proven bottleneck, please don't use that while loop. I see
enough mystical journeys going through other people's code, I'd hate to start
seeing that floating around all over the place. Premature
optimization...evil...etc Pity the Java programmers who wander over into
Hi there@
Try this one.
this.con_nc = new AppConnector();
this.con_nc.connect(rtmp://localhost/proof);
//this.con_nc.connect(null);
this.con_nc.addListener(this);
this.ns = new InfoNetStream(this.con_nc);
//
this.onConnect = function() {
trace(onConnect);
};
this.onFailConnect =
I am currently using this to great effect:
In the init:
my_ns.onStatus = Delegate.create( this, onNetStreamStatus );
and then:
function onNetStreamStatus( infoObject:Object ):Void
{
if( infoObject.code == NetStream.Play.Stop )
{
callThisFunction();
}
};
Thanks for
My guess would be that postincrement it takes longer because it needs to
store and return the original value, while preincrement only needs to
return the result after performing the operation. But that's only a
guess.
―
Mike Keesey
-Original Message-
From: [EMAIL PROTECTED]
Jim,
I saw the
'great japanese puck tossing game'on your blog, and i'm wondering how that
game would relate to the calibre of games that your group is looking for in
Kongegrate?
Scott
On 9/18/06, Jim Greer [EMAIL PROTECTED] wrote:
Hi all -
I want to announce my soon-to-launch Flash game
I read a while back on a site someplace about an extension that would save
filter presets to ease application of them, etc. Does anyone know where
online that is?
- e.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search
Apparently there is a bug in the FLVPlayback component when using SMIL
files.
I will admit i've never used them, but Robert Reinhardt, one of the authors
of the Flash 8 Bible, has re-written the component to correct the bug. I
saw a working version of it when i attended his session at Flash
eric dolecki escreveu:
I read a while back on a site someplace about an extension that would
save
filter presets to ease application of them, etc. Does anyone know where
online that is?
- e.
___
Flashcoders@chattyfig.figleaf.com
To change your
Thanks - but I am looking for a thing for use in the IDE - set up layers of
effects and they get saved in an IDE panel, ready to be applied right out of
that panel.
Those links you sent are interesting... should save some a bit of time of
typing ;)
- e.
On 9/19/06, Gustavo Teider - Adobe Flash
Wow,
I looked at Adobe's generated code for some simple databindings and it's
truly as gnarly as I'd feared!
Danny,
You'd said:
You should broadcast specific events for each property changedThis can
all be done manually without much effort.
This much I'd basically done on my own, but
Hi list,
imagine 2 scrollpanes or listbox containing items, and the requirement that
you'd have to be able to drag and drop items from one pane into the other.
My guess is that standard flash startDrag()/stopDrag() wont be able to help
me here, seeing the items wont be able to leave their
Mike, that sounds very reasonable to me.
What I've been able to ascertain is reading and writing to the register
(in the case of (--i -(-1)) is significantly faster than reading and
writing to a variable (in the case of (i--)) that the first case's
additional instruction to subtract doesn't
aaron smith wrote:
You can also use commands in PHP to send data to the NetConnection
debugger.
?php
NetDebug::trace( somedata or some $var );
?
you can use that anywhere in a service method and it will send it to the
netconnection debugger. just use those to debug it..
hope that helps..
I guess what it depends on is what you're doing with that for loop.
If you're using it to attach or create or animate movieclips, or parse
through xml or a recordset, or anything that would make Flash
unresponsive during the loop, then the benefits of while (--a -(-1))
outweigh the readability
So, now I just end up using it for everything since it's become a
habit.
The flipside is that sometimes I need to do forward loops for
reiterating to maintain proper order. However, I would have to do
that
anyway regardless of which backwards looping method I used.
To clarify, I don't mean I
Sorry for this long post, but I'm asking for help here as a last resort
on a problem I've been grappling with for close to a month now. I've
spent the past 3 weeks trying to diagnose a performance problem in an
application I'm building. It's an AMFPHP front-end to the PHPLive web
support system.
for (var i:String in myArray)
{
if (myArray[i] == value)
return Number(i);
}
using a for..i..in loop will always be faster. Even more then --a -(-1)
iteration. Unless you can guarentee that your element will always be near
the beginning of a large array, as the for..i..in starts from
using a for..i..in loop will always be faster. Even more then --a
-(-1)
I'm ducking and running for cover.
Jason Merrill
Bank of America
Learning Organization Effectiveness - Technology Solutions
___
Flashcoders@chattyfig.figleaf.com
To
I was looking at Danny's article regarding a Flash Document Class at:
http://www.dannypatterson.com/Resources/Blog/EntryDetail.cfm?id=106
And i started to wonder if people are using this to associate their clips on
stage with a class?
Are people doing this kind of thing (or otherwise) instead
I don't use the class linkage in the library, always seemed kinda
kludgy. I'm using composition, setting mc properties to a class
instance - probably just as kludgy though - so thanks for the link!
Excited about using AS 3.0 some day.
Jason Merrill
Bank of America
Learning Organization
:)
So, for the sake of another one of those big arguments over what's better
where no one ever test, I wrote some code to find out exact results:
The following code executes one particular test on my Windows XP machine.
For results I got an averate of 347 miliseconds executeing the --i -(-1)
I've been out of flash development for a little while and I recognize
that this may be under the radar of many on the list.
Should I switch to the newbie list to find an answer regarding this?
Thanks,
-Jim
On Sep 19, 2006, at 11:16, Jim Gay wrote:
I'm getting ready to do a project where I
Wow, good thread.
Here's my 2 cents. Perhaps one other thing to factor is if the array is
sorted:
If the array is not sorted the best you can do is iterate through all of
the items in the array, checking each element, until you either find the
matching string or reach the end of the array. This
...even more relevant, an AS1 implementation of BinarySearch.
http://proto.layer51.com/d.aspx?f=1333
-mL
http://knowledge.lapasa.net
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Mark
Lapasa
Sent: Tuesday, September 19, 2006 4:44 PM
To: Flashcoders
Look into Flash Remoting. This is how I've done it in the past.
- James
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jim Gay
Sent: Tuesday, September 19, 2006 4:42 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] printable certificates for
Hi,
not sure what you need, but a simple server side script (eg php) returning
xml, or a webservice would be enough for your needs?
greetz
JC
On 9/19/06, James Booth [EMAIL PROTECTED] wrote:
Look into Flash Remoting. This is how I've done it in the past.
- James
-Original
Here's an example of retrieving (and displaying, but you would want to
use PrintJob to print instead I imagine) data from a database:
http://flash-creations.com/notes/servercomm_database.php by passing
strings of text formatted as somevariable=somevalue, and here's an
example of doing it with
Hi,
sometimes one way, another time the other:) depends on the leg i jumped out
of bed with.
Anywayz, I usually do not use the __proto__ approach for the main document,
but rather for the low down dirty stuff you hope nobody will see on a first
glance:).
When I do use the linkage id approach
that article was only meant for assigning a class to your _root
timeline... I don't think he intended it to be used for other
movieclips in the library or on stage.
for that you could just use the linkage in the library or use
Object.registerClass()
On Sep 19, 2006, at 4:29 PM,
I wrote a databinding system for ActionStep that wraps setters with
proxy functions that notify observers whenever a change is detected.
All you have to do, you replace the setter method with your own that
dispatches the change event, then call the original. This system is
also reliant upon the
Does Object.registerClass() work in Flash 8 (i haven't been able to get it
to work)? Also, does that allow you to register more than one clip with a
class?
The documentation seems to point to using the Linkage setting for AS2:
* Availability: *ActionScript 1.0; Flash Player 6 - If you are
it does work in flash 8.
as for clips on the stage, it does work, you just have to give the
clip a linkage ID in the library first, and use that linkage to
register the class to it.
On Sep 19, 2006, at 5:31 PM, slangeberg wrote:
Does Object.registerClass() work in Flash 8 (i haven't been
Actually, it only worked for me, when I used attachMovie()!:
Object.registerClass( TestSymb, TestView );
//should have seen TestView() trace out twice, as I've also dragged an
//instance of TestSymb onto the stage,
//BUT only saw one trace
this.attachMovie( TestSymb, tv, 0 );
//class file:
One technique I've been trying lately is to assert linkage of class
names. First I create a static function that asserts that a symbol is
linked to a certain class. It returns the symbol ID if so, and throws an
error if not:
class com.exopolis.exosite.errors.SymbolError extends Error {
Thanks very much for the replies. I really appreciate it. I'll look
into remoting and hopefully it will be smooth sailing.
On Sep 19, 2006, at 17:10, Helen Triolo wrote:
Here's an example of retrieving (and displaying, but you would want
to use PrintJob to print instead I imagine) data from
Scott,
Is there an example of where the databinding is used in ActionStep?
I have downloaded the sourcecode from the site.
Thanks,
Scott
On 9/19/06, Scott Hyndman [EMAIL PROTECTED] wrote:
I wrote a databinding system for ActionStep that wraps setters with
proxy functions that notify
using a for..i..in loop will always be faster
It's been proven before here on flashcoders that for in is not faster
than --a -(-1) because it compiles to more lines of pcode. I guess it's
time to use Flasm to bust out some pcode and post it here on the list
instead of making claims based on
And to be specific about why your for in as you put it would not be
faster, you're declaring var i in your loop, which results in more
pcode, which means it will take longer.
var a;
for (a in array) {}
would be faster.
___
I think you have to keep the Flash player version in mind as well.
Those tests and what lead to the awkward notation -- while (--i -(-1))
were done quite some time ago.
Which each new flash player version, performance improves, so what once was
true (one being slower than the other), may no
Hello everyone. After a long hiatus from this list, I decided to
resubscribe, becasue i am at my wit's end :(
Thankfully, chattyfig has some of the world's best AS coders so I'm
sure this is no problem for you people. Here goes:
I got a FLVplayer (flash 8 pro) instance and loaded an flv that
It isn't in the alpha release. If you grab from SVN you can see the
code in the org.actionstep.test.ASTestBinding class. The source root
can be found in the /test subdirectory.
Scott
On 19/09/06, slangeberg [EMAIL PROTECTED] wrote:
Scott,
Is there an example of where the databinding is used
aaron smith wrote:
im guessing your just having issues with how the data is mapped in the
result vars. Are you using NetConnection debugger to look at the
results, so
you know exaclty how the return object is mapped to the data.. IE(
recordset.getItemAt(0) );..
see what i mean?
Ok - I did
There is an interesting article on the subject in the Flashcoder's Wiki
at osflash.org :
http://www.osflash.org/flashcoders/as2#creating_a_class_instance_based_on_movieclip_without_a_symbol_in_the_library
With this approach you can create a class that extends MovieClip and
then create an
dnk wrote:
aaron smith wrote:
im guessing your just having issues with how the data is mapped in the
result vars. Are you using NetConnection debugger to look at the
results, so
you know exaclty how the return object is mapped to the data.. IE(
recordset.getItemAt(0) );..
see what i mean?
Actually, Tyler's tests proved that var a in is faster with today's
player. I tried his test out myself and my results were even wider than
his. I published for AS2 and ran in Flash Player 9. I was averaging
roughly 265ms for var a in and 275ms for (--a -(-1)).
Then I compiled for AS3 and
Whoa, thanks for pointing me to that book. Just ordered it :) sounds
like exactly what i need.
- A
Charles Parcell wrote:
This is why Danny is The Math Man!
BTW, love your book Danny. Can't wait for the next. :)
Hi til,
are you still there?...i did something similar on a different project...take a
look in eric's dropbox
basically...nav cue points are embedded in the video, but actionscript
cuepoints you can add dynamically...give me a call and we can discuss it
list -- sorry for thiswe work
Aaron,
I don't know your exact architecture, but relative paths should work
here. The path is relative to the URL where your embedded SWF is
loaded from. Thus, if you have a folder on your server with the SWF
file and the xml in it, you should be able to simply load menu.xml.
The
Hi - I have had a few times where I need to call the redraw() function
to recreate my scrollbars after the data is loaded
But I obviously need to wait until the data is completed. The times I
seem to have the issues is when loading something that takes a bit
longer (IE an image or something
69 matches
Mail list logo