[Flashcoders] as3: my first attempt at writing a class... and I am sucking at it.

2006-07-26 Thread Carl Welch

I finally decided to bite the bullet and try to convert my as2 code to
as3. I've gone though some tutorials on how to create classes. I can't
seem to figure how how to chose what to import at the beginning of the
class. plus I get an error:
**Error** C:\Documents and Settings\Carl Welch\My
Documents\WORK\collective_Sessions\jointJamXMLloader.as : Line 11,
Column 41 : [Compiler] Error #1017: The definition of base class
MovieClip was not found.
public class jointJamXMLloader extends MovieClip {
ReferenceError: Error #1065: Variable jointJamXMLloader is not defined.

jointJamXMLloader is the name of my class - and I think I'm supposed
put public class jointJamXMLloader extends MovieClip { before my
script - but as3 seems to hate it or something. Can someone tell me
what I'm doing wrong? here's my class: thanks

package {
 import flash.events.Event;
 import flash.events.ErrorEvent;
 import flash.events.EventDispatcher;
 import flash.events.IEventDispatcher;
 import flash.net.URLLoader;
 import flash.net.URLRequest;
 import flash.util.flash_proxy;
 import flash.util.Proxy;
 import flash.util.trace;
 public class jointJamXMLloader extends MovieClip {
 static private var instance:Settings;
 private var eventDispatcher:EventDispatcher;
 private var urlLoader:URLLoader;
 private var data:XML;


var request:URLRequest = new URLRequest(CarlWelch_Songs2.xml)
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onComplete);
loader.load(request);

function onComplete(evt:Event){
trace('onComplete');
var xdata:XML = new XML(loader.data);

songAmount = xdata.entry.length();
trace(songAmount:  +songAmount);

trace();

for(iii=0;iiisongAmount;iii++){
trace(xdata.entry[iii].attributes());
numberOfTracks = xdata.entry[iii].child(file).length();
trace(numberOfTracks:  + numberOfTracks);
trace();
for(ii=0;iinumberOfTracks;ii++){

trace(xdata..entry[iii].file[ii].trackCreator.text());
trace(xdata..entry[iii].file[ii].path.text());
trace(xdata..entry[iii].file[ii].desc.text());
trace(xdata..entry[iii].file[ii].isDownloadable.text());
trace(xdata..entry[iii].file[ii].creatorIcon.text());
trace(xdata..entry[iii].file[ii].volume.text());
trace(xdata..entry[iii].file[ii].PAN.text());

trace();
}
trace(**);
trace();
}

}
}
}


--
Carl Welch
http://www.carlwelch.com
[EMAIL PROTECTED]
805.403.4819
___
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] I am new to here

2006-07-26 Thread denfi

hi, happie to see u here.

On 7/25/06, master [EMAIL PROTECTED] wrote:


Hi, All

I am new to here, happy every day!




jack
2006-07-25
___
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





--
Discipline can be painful, but it helps when you give it a chance.
___
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 8 video, cue points,and actions based on those cue points

2006-07-26 Thread Matt Haworth

Hi There,

I'm assuming you're using an FLV Component that you've dragged onto the stage 
and named mcFLV. I don't know how your animations are set up, I've assumed 
you have 4 different movie clips, one for each, called mcAnim1, mcAnim2, etc. 
With those assumptions, here's the code:

//CODE START-

var cueListener:Object = new Object();
cueListener.cuePoint = function(oCuePoint:Object):Void{

currentCuePoint = oCuePoint.info.name;

if (currentCuePoint == stop1){
mcAnim1.play();
}
else if(currentCuePoint == stop2){
mcAnim2.play();
}
else if(currentCuePoint == stop3){
mcAnim3.play();
}
else if(currentCuePoint == stop4){
mcAnim4.play();
}
else{
}
}

mcFLV.addEventListener(cuePoint, cueListener);

//CODE END


Matt

-
Matt Haworth
Web Designer
The University of Manchester

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of derrickito
Sent: 25 July 2006 23:34
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] flash 8 video, cue points,and actions based on those cue 
points

im having a hell of a time finding info on this. ive got a person with a
transparent background (in an flv file), and based on cue points i need to
trigger different animations in different movie clips. cant for the life of
me figure out how to set up the scripts to respond to the different cue
points.

cue points in video being stop1 stop2 stop3 stop4 etc with no
naming/parameter info attached

anyone know where to find this info?
ive got the video cut and imported fine, ive put the cue points on it fine.
just need code to collect the cue points, and based on which cue point it
is, fire off play(2) commands to different movieclips triggering animations
timed with the video

 

here's what ive got so far: but this just sees all the cue points.. I need
to trigger different actions based on which cue point it is, and have that
send an action to a separate clip

 

var vidList:Object = new Object();
vidList.cuePoint = function(cues) {
ex.gotoAndPlay(2);
};
vid.addEventListener(cuePoint, vidList);

 



eek
im guessing that I need to stick if statements in the function to check for
the cue name? not sure how to set that up, im a front end guy, this coding
turns my brain numb :-)

thanks!

dare-ick-ee-toe

 

___
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] access variable sitted in a movieClip... .

2006-07-26 Thread denfi

i have a problem trying to acess a variable of my movie(Global2.swf) that is
loaded into a emptyMovieClip(swfHolder)
that is on my maintimeline(container.swf) stage.

I declare this code on my Global2.swf maintimeline:

_global.myGlobal2 = this;
counter = 2;


then try to access the variable unsucessfully from my
maintimeline(container.swf):

trace(myGlobal2.counter)//undefine


pS: is there any way i can attach a sample of my file in this mailing list?




--
Discipline can be painful, but it helps when you give it a chance.
___
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] jigsaw puzzle piece algorithm

2006-07-26 Thread Danny Kodicek
 Initially each piece group property is an empty array, but for a group
 something like:

 A B C
 D

 then, A.group is an array of (B, C, D). B.group is an array of (A, C, D),
 etc..

Without going into your post in detail, I think this is the source of your
problem. For each group, you're better off making a single object which
contains all the elements in it, then making A.group a reference to that
object. Start with N such groups, one for each piece. Then, when you connect
two pieces, you merge their groups into a single object. Now, each time the
user drags a piece, update the whole group (including the piece clicked on)
with a single command.

Another advantage of this approach is that it makes it easy to do other
group-level operations like depth-sorting, and of course the puzzle is
solved when there is only one group!

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


Re: [Flashcoders] Back from html to specific point in flash

2006-07-26 Thread Ricardo Sánchez

Thanks to all of you.

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


Ricardo Sánchez wrote:
 So our second option is open the link in the same window but giving the
 user
 the chance to hit the back button of the browser (once in the html) and
go
 back to the specific situation where he was on the flash. Is this
possible?

It could be, but a lot depends on the presentation, and how you
determine where here is. For a slideshow you can just do local Shared
Object Storage of the last slide viewed, and jump to the last viewpoint
whenever starting, for instance. For an application you may need to
represent a stack of prior user actions.

Kevin Lynch had an example awhile ago which also deals with
state-representation in SWF... he put the state into the URL itself, as
query terms, but the same issue of How do you know where 'here' is?
remains.

(Most window-blocking extensions for browsers permit new windows in
response to user clicks in the HTML part, but many have blocked all
window requests from plugins, because of abuses from spammers. I don't
know of a current listing of which window-blockers, and their audience
sizes, will block a getURL with _blank from SWF.)

jd






--
John Dowdell . Adobe Developer Support . San Francisco CA USA
Weblog: http://weblogs.macromedia.com/jd
Aggregator: http://weblogs.macromedia.com/mxna
Technotes: http://www.macromedia.com/support/
Spam killed my private email -- public record is best, thanks.
___
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] About OOP metodology

2006-07-26 Thread Ricardo Sánchez

Still not sure what to do.

My doubt is more related to the change in the appearenace, number and type
of fields in a form from one project to another.

Should I make a different swf with a form for each project and change the
class every time? (whatever pattern I use, mvc...)
Should I make a swf for each field and attach by code the ones I need for
each project...?

Do my questions make sense?

On 6/30/06, Bernard Visscher [EMAIL PROTECTED] wrote:


I think you could do this the MVC way
(http://en.wikipedia.org/wiki/Model_view_controller)
The only thing that really changes is your view, the model and the
controller are almost the same.
You could even write a model, controller and view which holds all fields
and
logic that returns in all the forms.
Then you extend those to meet the needs for this particular form.

This is the same way edibol as wrote I see now... Quote: You could even
abstract the technical logic from the UI completely and write
communicators/controllers that respond to events fired from the ui
(movieclips).


Greetz,

Bernard

 -Oorspronkelijk bericht-
 Van: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Namens elibol
 Verzonden: vrijdag 30 juni 2006 17:06
 Aan: Flashcoders mailing list
 Onderwerp: Re: [Flashcoders] About OOP metodology

 Try a compositional approach. You might design a set of
 classes that reference movieclips and delegate events to the
 class; this would be contrary to extending movieclips. This
 way you can design movieclips specific to the site and design
 the code specific to the logic.

 You could even abstract the technical logic from the UI
 completely and write communicators/controllers that respond
 to events fired from the ui (movieclips).

 M.

 On 6/30/06, Ricardo Sánchez [EMAIL PROTECTED] wrote:
 
  I've just started to work in a big internet communication
 agency. We
  have to make 2 or 3 microsites every week. Each of which
 uses a very
  similar form to get user data.
 
  All that changes from one to another is a couple of fields and the
  look of it.
 
  My question is: What's the best way to implement a
 re-usable class for
  this kind of work? Should I make a movieclip with all the
 fields and a
  class binded to it and modify the clip everytime I re-use it? Or
  should I make a class that loads different clips from the library?
 
  Do I explain myself?
 
  Thanks.
  ___
  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] Decoding xml text w/no CDATA allowed

2006-07-26 Thread Toon Van de Putte

That does appear to be the case,  i tried the following:

textfield.htmlText = currentPand.firstChild;

which shows 'bthis is bold/b' instead of bold text

On the other hand, this:

textfield.htmlText = currentPand.firstChild.nodeValue;

Shows the text in bold, as would be expected. So i suppose using nodeValue
automatically decodes the entities.


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


Thanks Ryan, that's what I was looking for.  So this must be a failing
of XFactorstudio's Xpath classes - and Flash's xml.parseXML() or
nodeValue does the decoding automatically?  Or does anyone know a way to
get Xfactorstudios Xpath classes to decode entities?

Jason Merrill
Bank of America
Learning Technology Solutions







-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Ryan Matsikas
Sent: Wednesday, June 07, 2006 11:30 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Decoding xml text w/no CDATA allowed

Why not let flash do the work for you?

function convertEntities(p_str:String):String {
var x:XML = new XML(p_str);
x.parseXML();
return x.firstChild.firstChild.nodeValue;
}

var xmlStr:String = 'itemThis is the quot;String I want in
quotesquot;
please help./item';
trace(convertEntities(xmlStr)); // This is the String I want in
quotes
please help.


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

 Jim - I tried out your static class and it works great for my
problem -
 thanks!

 Jason Merrill
 Bank of America
 Learning Technology Solutions







 -Original Message-
 From: [EMAIL PROTECTED]
[mailto: flashcoders-
 [EMAIL PROTECTED] On Behalf Of Jim Cheng
 Sent: Tuesday, June 06, 2006 6:39 PM
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] Decoding xml text w/no CDATA allowed
 
 Merrill, Jason wrote:
 
  Is there an Actionscript 2.0 or Xpath equivalent to Javascript
and
  Actionscript 3.0's
 
  decode(theStringWithquot;Specialquot;Characters);
 
 Hey Jason,
 
 I've run into the same issue about a month ago with XML documents
that
 a
 client had generated from their database, character entities
included.
 
 I couldn't find a built-in solution for converting the character
 entities back into Unicode characters, so I went online, found the
 specs, wrote a little scraper utility to grab the mappings for me
and
 then wrote a small utility class to use the data for encoding and
 decoding. It's a simple static class with inline JavaDoc-style
 documentation.  Hope this works for you.
 
 You can grab it here:
 
  http://dev.psalterego.com/CharacterEntity.as
 
 
 Regards,
 Jim
 ___
 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





--
Toon Van de Putte
Pannenhuisstraat 63
2500 Lier
Belgium

mobile: +32 (0)497 52 74 51

[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


Re: [Flashcoders] Decoding xml text w/no CDATA allowed

2006-07-26 Thread Carl Welch

I think you just need to set the Dynamic text field to render HTML in
the properties panel - its the button that looks like . I have xml
that has quot;Specialquot; and it works fine.

On 7/26/06, Toon Van de Putte [EMAIL PROTECTED] wrote:

That does appear to be the case,  i tried the following:

textfield.htmlText = currentPand.firstChild;

which shows 'bthis is bold/b' instead of bold text

On the other hand, this:

textfield.htmlText = currentPand.firstChild.nodeValue;

Shows the text in bold, as would be expected. So i suppose using nodeValue
automatically decodes the entities.


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

 Thanks Ryan, that's what I was looking for.  So this must be a failing
 of XFactorstudio's Xpath classes - and Flash's xml.parseXML() or
 nodeValue does the decoding automatically?  Or does anyone know a way to
 get Xfactorstudios Xpath classes to decode entities?

 Jason Merrill
 Bank of America
 Learning Technology Solutions







 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of Ryan Matsikas
 Sent: Wednesday, June 07, 2006 11:30 AM
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] Decoding xml text w/no CDATA allowed
 
 Why not let flash do the work for you?
 
 function convertEntities(p_str:String):String {
 var x:XML = new XML(p_str);
 x.parseXML();
 return x.firstChild.firstChild.nodeValue;
 }
 
 var xmlStr:String = 'itemThis is the quot;String I want in
 quotesquot;
 please help./item';
 trace(convertEntities(xmlStr)); // This is the String I want in
 quotes
 please help.
 
 
 On 6/7/06, Merrill, Jason  [EMAIL PROTECTED] wrote:
 
  Jim - I tried out your static class and it works great for my
 problem -
  thanks!
 
  Jason Merrill
  Bank of America
  Learning Technology Solutions
 
 
 
 
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
 [mailto: flashcoders-
  [EMAIL PROTECTED] On Behalf Of Jim Cheng
  Sent: Tuesday, June 06, 2006 6:39 PM
  To: Flashcoders mailing list
  Subject: Re: [Flashcoders] Decoding xml text w/no CDATA allowed
  
  Merrill, Jason wrote:
  
   Is there an Actionscript 2.0 or Xpath equivalent to Javascript
 and
   Actionscript 3.0's
  
   decode(theStringWithquot;Specialquot;Characters);
  
  Hey Jason,
  
  I've run into the same issue about a month ago with XML documents
 that
  a
  client had generated from their database, character entities
 included.
  
  I couldn't find a built-in solution for converting the character
  entities back into Unicode characters, so I went online, found the
  specs, wrote a little scraper utility to grab the mappings for me
 and
  then wrote a small utility class to use the data for encoding and
  decoding. It's a simple static class with inline JavaDoc-style
  documentation.  Hope this works for you.
  
  You can grab it here:
  
   http://dev.psalterego.com/CharacterEntity.as
  
  
  Regards,
  Jim
  ___
  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




--
Toon Van de Putte
Pannenhuisstraat 63
2500 Lier
Belgium

mobile: +32 (0)497 52 74 51

[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




--
Carl Welch
http://www.carlwelch.com
[EMAIL PROTECTED]
805.403.4819
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the 

Re: [Flashcoders] About OOP metodology

2006-07-26 Thread Adrian Park

The approach I'd take would be to use an XML configuration file to work out
what inputs are needed and then create all the widgets from the library.
This way, all you need to modify for each deployment is the XML
configuration file. You could then also add attributes to the XML to flag
things like whether the input of a particular widget should be validated or
not, what url the form data should be submitted to and other such
enhancements. Also, if you're worried about layout of different forms, you
could add _x and _y attributes to the XML so you can simply tweak the layout
on a form by form basis. This may mean some extra work up front but, in my
experience, it saves a lot of blood sweat and tears down the line!

If it's reasonable to assume the forms will all use a fairly standard set of
widgets (text fields, combo boxes, radios, check boxes e.t.c) I'm not sure
library bloat is going to be that much of a risk?

Obviously, with this approach you would ideally be able to make assumptions
about the full selection of form widgets you'll need in future but, equally,
if it is built properly in the first place you should be able to add new
types of input quickly and easily in future.

HTH
Adrian

On 7/26/06, Ricardo Sánchez [EMAIL PROTECTED]  wrote:


Still not sure what to do.

My doubt is more related to the change in the appearenace, number and type

of fields in a form from one project to another.

Should I make a different swf with a form for each project and change the
class every time? (whatever pattern I use, mvc...)
Should I make a swf for each field and attach by code the ones I need for
each project...?

Do my questions make sense?

On 6/30/06, Bernard Visscher [EMAIL PROTECTED] wrote:

 I think you could do this the MVC way
 ( http://en.wikipedia.org/wiki/Model_view_controller)
 The only thing that really changes is your view, the model and the
 controller are almost the same.
 You could even write a model, controller and view which holds all fields
 and
 logic that returns in all the forms.
 Then you extend those to meet the needs for this particular form.

 This is the same way edibol as wrote I see now... Quote: You could even
 abstract the technical logic from the UI completely and write
 communicators/controllers that respond to events fired from the ui
 (movieclips).


 Greetz,

 Bernard

  -Oorspronkelijk bericht-
  Van: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] Namens elibol
  Verzonden: vrijdag 30 juni 2006 17:06
  Aan: Flashcoders mailing list
  Onderwerp: Re: [Flashcoders] About OOP metodology
 
  Try a compositional approach. You might design a set of
  classes that reference movieclips and delegate events to the
  class; this would be contrary to extending movieclips. This
  way you can design movieclips specific to the site and design
  the code specific to the logic.
 
  You could even abstract the technical logic from the UI
  completely and write communicators/controllers that respond
  to events fired from the ui (movieclips).
 
  M.
 
  On 6/30/06, Ricardo Sánchez  [EMAIL PROTECTED] wrote:
  
   I've just started to work in a big internet communication
  agency. We
   have to make 2 or 3 microsites every week. Each of which
  uses a very
   similar form to get user data.
  
   All that changes from one to another is a couple of fields and the
   look of it.
  
   My question is: What's the best way to implement a
  re-usable class for
   this kind of work? Should I make a movieclip with all the
  fields and a
   class binded to it and modify the clip everytime I re-use it? Or
   should I make a class that loads different clips from the library?
  
   Do I explain myself?
  
   Thanks.
   ___
   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 

Re: [Flashcoders] About OOP metodology

2006-07-26 Thread Adrian Park

Ricardo, I just read you most recent post where you mention that the design
of inputs could change on a form by form basis. How much difference do you
anticipate there'll be?  Do you think you could get away with using
components and then specifying style attributes such as size, colour and
text attributes in the XML or will the styling be heavily customised for
each form?

I've had a lot of success abstracting all this type of stuff into an XML
configuration file as described in my previous message but I appreciate that
sometimes the level of customisation required (different brands, different
campaign themes e.t.c) makes this level of abstraction very difficult. I
think it has to be accepted - by the client as much as anyone else - that
the more customisation there is from form to form, the less the update
process can be streamlined.

I'm blabbering on now so I'll back off!
A.

On 7/26/06, Adrian Park [EMAIL PROTECTED] wrote:


The approach I'd take would be to use an XML configuration file to work
out what inputs are needed and then create all the widgets from the library.
This way, all you need to modify for each deployment is the XML
configuration file. You could then also add attributes to the XML to flag
things like whether the input of a particular widget should be validated or
not, what url the form data should be submitted to and other such
enhancements. Also, if you're worried about layout of different forms, you
could add _x and _y attributes to the XML so you can simply tweak the layout
on a form by form basis. This may mean some extra work up front but, in my
experience, it saves a lot of blood sweat and tears down the line!

If it's reasonable to assume the forms will all use a fairly standard set
of widgets (text fields, combo boxes, radios, check boxes e.t.c) I'm not
sure library bloat is going to be that much of a risk?

Obviously, with this approach you would ideally be able to make
assumptions about the full selection of form widgets you'll need in future
but, equally, if it is built properly in the first place you should be able
to add new types of input quickly and easily in future.

HTH
Adrian


On 7/26/06, Ricardo Sánchez  [EMAIL PROTECTED]  wrote:

 Still not sure what to do.

 My doubt is more related to the change in the appearenace, number and
 type
 of fields in a form from one project to another.

 Should I make a different swf with a form for each project and change
 the
 class every time? (whatever pattern I use, mvc...)
 Should I make a swf for each field and attach by code the ones I need
 for
 each project...?

 Do my questions make sense?

 On 6/30/06, Bernard Visscher  [EMAIL PROTECTED] wrote:
 
  I think you could do this the MVC way
  ( http://en.wikipedia.org/wiki/Model_view_controller )
  The only thing that really changes is your view, the model and the
  controller are almost the same.
  You could even write a model, controller and view which holds all
 fields
  and
  logic that returns in all the forms.
  Then you extend those to meet the needs for this particular form.
 
  This is the same way edibol as wrote I see now... Quote: You could
 even
  abstract the technical logic from the UI completely and write
  communicators/controllers that respond to events fired from the ui
  (movieclips).
 
 
  Greetz,
 
  Bernard
 
   -Oorspronkelijk bericht-
   Van: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] ] Namens elibol
   Verzonden: vrijdag 30 juni 2006 17:06
   Aan: Flashcoders mailing list
   Onderwerp: Re: [Flashcoders] About OOP metodology
  
   Try a compositional approach. You might design a set of
   classes that reference movieclips and delegate events to the
   class; this would be contrary to extending movieclips. This
   way you can design movieclips specific to the site and design
   the code specific to the logic.
  
   You could even abstract the technical logic from the UI
   completely and write communicators/controllers that respond
   to events fired from the ui (movieclips).
  
   M.
  
   On 6/30/06, Ricardo Sánchez  [EMAIL PROTECTED] wrote:
   
I've just started to work in a big internet communication
   agency. We
have to make 2 or 3 microsites every week. Each of which
   uses a very
similar form to get user data.
   
All that changes from one to another is a couple of fields and the
look of it.
   
My question is: What's the best way to implement a
   re-usable class for
this kind of work? Should I make a movieclip with all the
   fields and a
class binded to it and modify the clip everytime I re-use it? Or
should I make a class that loads different clips from the library?
   
Do I explain myself?
   
Thanks.
___
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 

Re: [Flashcoders] catching errors by webservice

2006-07-26 Thread PR Durand

Hi Hans,
Yes it does, everythings works well, but the exceptions. It's a C# .net 
simple webservice (input: an Int id, output : a personal class object)

We tryied yesterday in the evening with a C# coder.
His code has a
throw new SOAPException(entry not found)

we made a local WS client in C# too, to test it, and we got the 
exception message entry not found.


In flash, I tryied with the webservice and pendingcall classes, and with 
the wsconnector component. I got the same result with both solutions :
When I call my service with a correct parameter, I receive the answer 
and can use it.
When I call it with a wrong parameter, the C# throws the exception, but 
flash got just a Server.Connection faultcode (Unable to connect to 
endpoint : [asmx url])



What I said, is that I already got that problem last year with a totally 
different configuration. The WS server was a Tomcat server, so services 
developped in java, and the results was the same, so I think it doesn't 
come from the service coding, but from flash. I called Macromedia in 
February, the personn I talked with told me that he never used the 
exception with webservices... I still stay at the same point


PiR



Hans Wichman a écrit :

Hi,
just to be clear on this, PendingCall.onFault is not working for you?

greetz
hans


On 7/25/06, PR Durand [EMAIL PROTECTED] wrote:


I changed everything to work with the connector instead of the service
class : same result
If I right understood, an exception thrown with server should give me a
faultcode=Server and faultstring=[the exception message], isn't it?
here I got once more a Server.connection faultcode, with the unable
to connect to endpoint : [url] string...
the service rocks with good values.
Last year, I worked with a remote Java server, now with a local .Net
server... Developpers are really different, but the results are all the
same : flash is unable to read the SOAP fault, and sends a connection
error... :(
any idea please?

thx
PiR





Josh Santangelo a écrit :
 Check out the WebServiceConnector.status event.

 -josh

 On Jul 25, 2006, at 8:12a, PR Durand wrote:

 Hi List
 Has anyone any way to receive the exceptions thrown by a webservice
 server please?

 as it's asynchronous, the classical try...catch can't work on the
 service method call.
 but, as soon as the server throws an exception (the sent SOAP is a
 correct fault soap file if I call it from a browser), I only receive
 an event in my Log listener, saying unable to connect to 
endpoint...


 How do you actually do to receive and interpret the server faults?

 ++
 PiR
 ___
 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




___
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] as3 and attachmovie

2006-07-26 Thread Carl Welch

OK. I am trying to learn how to use classes and have had some success
- But what I just can't seem to grasp in this situation is if I use
this:

var newMC=new MovieClip();
this.addChild(newMC);

instead of this:
attachmovie(gf,gf+_root.getNextHighestDepth(),_root.getNextHighestDepth

How do I select gf as the movieclip to be added to the stage?


Thanks.

On 7/25/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:

Carl,

Everything in AS3 is classes, so you can't do anything without using
classes.
It's actually easier than attachmovie. Just make a

var newMC=new MovieClip();
this.addChild(newMC);

feels alot cleaner that
attachmovie(gf,gf+_root.getNextHighestDepth(),_root.getNextHighestDepth());
doesn't it ;).

good luck!

Meinte

ps. you can checkout senocular.com , he has some excellent tutorials on AS3

On 7/25/06, eka [EMAIL PROTECTED] wrote:

 Hello :)

 read in french :

 -

 
http://iteratif.free.fr/blog/index.php?2006/07/11/44-bibliotheque-partagee-sous-flash-9

 attachMovie is remove in AS3 :) Use [embed(source=)] metadata and
 create the instance with new MyClass and addChild() method :)

 eKA+ :)


 2006/7/25, Carl Welch [EMAIL PROTECTED]:
 
  I just downloaded the demo of Flash 9 / as3 and I noticed you can't
  use attachmovie anymore. I've found some new methods on google but it
  seems like the only way I can do it is by using classes. Is there
  another way to handle an attachmovie equivilent without using a class
  in as3?
 
  thanks.
 
  --
  Carl Welch
  http://www.carlwelch.com
  [EMAIL PROTECTED]
  805.403.4819
  ___
  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




--
Carl Welch
http://www.carlwelch.com
[EMAIL PROTECTED]
805.403.4819
___
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 Hans Wichman

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


On 7/26/06, Mike [EMAIL PROTECTED] wrote:


Question totally unrelated to implementation and optimization:

Why do the function names have underscores when camel-humped names are
the customary syntax in ActionScript (and Java, and Javascript...)?

Some of the names could be clearer:
- nitems looks like number of items (i.e., length); why not
numSetItems or countSetItem?
- rindex is a bit confusing; why not lastIndexOf (as in the String
object)? (Also index could be indexOf, to better agree with the
String interface.)
- some -- maybe forSome, or exists? (Also, every makes more
sense to me as forAll.)
- uniq -- do those two characters make much difference?
- eql -- equals is far more standard
- include is pretty close to a reserved word -- why not hasItem?
- the delete functions don't so much delete (i.e., totally destroy)
as remove or strip.

Cool stuff, though!
--
T. Michael Keesey

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of ryanm
Sent: Tuesday, July 25, 2006 7:31 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Array Empowerment

 Here is the next iteration - new and improved.   Again, all
 comments and optimizations, including conversations about
 optimizations, are most welcome!

   Those are great additions. You need a duplicate_deep and a
replicate_deep, though. Right now, any obejcts stored in the array will
be
references in the new array. A _deep method would make copies of those
too,
recursively caling Array.duplicate, or Object.duplicate. ;-)

ryanm

___
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] Array Empowerment

2006-07-26 Thread Mike Mountain
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


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


[Flashcoders] Loader component cannot be added as a child

2006-07-26 Thread Gadi Srebnik
hi coders, 
I'm loading binary image data to a flex 2 movie through socket
connection.
in order to place the image in stage, I used Loader component, which
according to Adobe
Flex tutorial, can be placed in UIComponent using addChild(Loader)
 
I tried that and got:
TypeError: Error #1034: Type Coercion failed: cannot convert
flash.display::[EMAIL PROTECTED] to mx.core.IUIComponent.
 
I know that the data itself is loaded ok, only the addChild method is
failed.
 
any suggestions?
 
Best regards, 
Gadi srebnik
___
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 Mike Mountain
Doh, scrolled right past it, nice work.

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of janosch
 Sent: 26 July 2006 11:04
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] Array Empowerment
 
 uniq is the appropriate function
 
 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] Attention Recursion Speed Experts

2006-07-26 Thread Mark Winterhalder

index = list.index;
len = list.length;
while (index  length) {


It's a problem with len/gth, you overlooked the 'length' in the
while() when you renamed it to 'len'.

Below is the reworked testing class. It creates the array in the
beginning, then waits 30 frames before testing the two methods, taking
turns, one test per frame.

The result I'm getting is that recursion consistently is about 20%
faster than my iterative function (mtasc compiled, running in the
Linux plugin, which still is version 7). That's a bit of a surprise
since it was 10% slower in Danny's test, but then, it's different
compilers.
If you want to compile it in the Flash IDE to compare, take an empty
.fla, import TestArray, and call TestArray.main(). My version is at
http://www.snafoo.org/tmp/flatten.swf.

Mark





class TestArray extends Array {

public static var testarray : Array;

public static function main () : Void {
var ta = TestArray.testarray = TestArray.randomArray( 10 );

_root.createTextField( tf, 1, 0, 0, 1024, 768 );

var cntr = 0;
_root.onEnterFrame = function () {
if( cntr++  30 ) {
var n = (cntr % 2);
var start = getTimer();
if( n ) {
ta.flatten2();
} else {
ta.flatten();
}
var dur = getTimer() - start;

_root.tf.text += \n + (n ? flatten2 : flatten) + 
:  + dur;
}
if( cntr  70 ) {
delete this.onEnterFrame;
}

};
}

public static function randomArray(p) : Array {
   var a = new TestArray;
   for (var i = 0; i  p; i++) {
   if (Math.random() * 2  Math.random() * 5) {
   a.push(i);
   } else {
   a.push(TestArray.randomArray(Math.ceil( 
Math.random() * 3 ) ));
   }
   }

   _root.tf.text += length:  + a.length;

   return a;
}


public function flatten (r) : Array {
   if (!r) r = [];
   var n = this.length;
   for (var a = 0; a  n; a++) {
   if (this[a] instanceof Array) {
   r.push(this[a]);
   } else {
   this[a].flatten(r);
   }
   }

   return r;
};

public function flatten2 () : Array {
var outArray : Array = [];
var list = this;
list.index = 0;
var item : Object;
var index : Number;
var length : Number;
do {
index = list.index;
length = list.length;
while( index  length ) {
item = list[ index++ ];
if( item instanceof Array ) {
item.parent = list;
list.index = index;
list = item;
index = 0;
length = list.length;
} else {
outArray.push( item );
}
}
} while( list = list.parent );

return outArray;
}

}


___
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] Attention Recursion Speed Experts

2006-07-26 Thread Cedric Muller

weird results!
I do get very different results from the IDE, but I am testing using  
Flash 8 and Flash Player IDE is 8
could that (it should) explain the difference with results seen in  
the browser (which has Flash Player 9) ?

Cedric



index = list.index;
len = list.length;
while (index  length) {


It's a problem with len/gth, you overlooked the 'length' in the
while() when you renamed it to 'len'.

Below is the reworked testing class. It creates the array in the
beginning, then waits 30 frames before testing the two methods, taking
turns, one test per frame.

The result I'm getting is that recursion consistently is about 20%
faster than my iterative function (mtasc compiled, running in the
Linux plugin, which still is version 7). That's a bit of a surprise
since it was 10% slower in Danny's test, but then, it's different
compilers.
If you want to compile it in the Flash IDE to compare, take an empty
.fla, import TestArray, and call TestArray.main(). My version is at
http://www.snafoo.org/tmp/flatten.swf.

Mark





class TestArray extends Array {

public static var testarray : Array;

public static function main () : Void {
var ta = TestArray.testarray = TestArray.randomArray( 10 );

_root.createTextField( tf, 1, 0, 0, 1024, 768 );

var cntr = 0;
_root.onEnterFrame = function () {
if( cntr++  30 ) {
var n = (cntr % 2);
var start = getTimer();
if( n ) {
ta.flatten2();
} else {
ta.flatten();
}
var dur = getTimer() - start;

_root.tf.text += \n + (n ? flatten2 : flatten) + 
:  + dur;
}
if( cntr  70 ) {
delete this.onEnterFrame;
}

};
}

public static function randomArray(p) : Array {
   var a = new TestArray;
   for (var i = 0; i  p; i++) {
   if (Math.random() * 2  Math.random() * 5) {
   a.push(i);
   } else {
			   a.push(TestArray.randomArray(Math.ceil( Math.random() *  
3 ) ));

   }
   }

   _root.tf.text += length:  + a.length;

   return a;
}


public function flatten (r) : Array {
   if (!r) r = [];
   var n = this.length;
   for (var a = 0; a  n; a++) {
   if (this[a] instanceof Array) {
   r.push(this[a]);
   } else {
   this[a].flatten(r);
   }
   }

   return r;
};

public function flatten2 () : Array {
var outArray : Array = [];
var list = this;
list.index = 0;
var item : Object;
var index : Number;
var length : Number;
do {
index = list.index;
length = list.length;
while( index  length ) {
item = list[ index++ ];
if( item instanceof Array ) {
item.parent = list;
list.index = index;
list = item;
index = 0;
length = list.length;
} else {
outArray.push( item );
}
}
} while( list = list.parent );

return outArray;
}

}


___
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] sequential tweens ?

2006-07-26 Thread Hans Wichman

Hi peeps,
i think my post from a while ago, is related to this post:
http://www.mail-archive.com/flashcoders@chattyfig.figleaf.com/msg17995.html

It completely falls under zeh's opinion of overcomplication :), but i think
there is a time and a place to either overcomplicate things or keep it
simple :)) (but keeping it simple is soo hard).

It light of that, i would only overcomplicate things and apply
a  sequential animation calling design pattern, if it is necessary to for
example, exchange the order of effects at runtime, or support effects that
you haven't thought of and that are added by others.

Soo I by no means wish to hijack this thread, but i have a 5 week vacation
coming up, and was still thinking on starting on what i called in my
previous post some kind of sequencer framework, so beside the point which is
the best solution for a simple foto wipe, it might be nice if I knew if
others like you might like to have the thing i described in my post. Im
talking about 2d sequences, but they could be 1d sequences or whatever.

greetz
Hans





On 7/24/06, jcarlos [EMAIL PROTECTED] wrote:


I think that there is time and occasion for each line of thought

If you only want a serie of movements in time the solution proposed by Zeh
is great and I tested it and it works fine, better would it be if he
upgrade
them to AS 2.0 and AS 3.0 -)

But that are projects where we want some decision logic tree and solutions
like those from Marty and Gerry seems more appropriate, in fact now that I
begin to see the the problem clearer

What I´d like to have to some suggestions is not to use some package like
animationpackage ( it is fine the suggestion from marcelo serpa and I´m
using it too) but as a provocative study matter how to develop one simple
framework in terms I´ve thought first  ( please excuse me if  I´m tin the
non-sense field here)

From the framework´s user point of view he would only push Animation
objects in some tree structure.

and I begin wondering about to use some TREE to represent it where the
nodes
at the same level would be the Animation objects to run at the same time
and going to low level the animation following the sequence from that node

At first sight ( just exploring ideas) the Animation Class would have as
properties

the Object to be animated
the desired Actions (Tween/Transition etc) Array to be applied to the
Object
Null/Child  Animation Objects Array

The logic I´d like to implement would

the root object starts its job and when finished fire all ( if any ) its
children nodes asynchronously and each node would wait the effect end
before going down into low leves

Does it maky sense ? -)

João Carlos


- Original Message -
From: Martin Wood [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Sunday, July 23, 2006 6:29 PM
Subject: Re: [Flashcoders] sequential tweens ?


 Martin, do not take this personally, I don't mean to sound rude or
 anything, I'm sorry in advance if I do, and your code totally makes
 logical sense and it's 100% correct, but... WHY would someone need so
 much code just to produce sequential tweenings? A bunch of specialized
 functions just to make it work? And then suppose he has an slightly
 different animation he wants to do at the same time, will he need new
 functions, or add parameters to those functions, and so long and so
 forth? Why something so convoluted for something so simple? Simply
 because the tweening doesn't support delays? :(

 don't worry i don't take it personally its only programming :)

 To me it doesn't seem complicated, just a couple of functions, nothing
 special in either function.

 If it doesn't fit the requirements, so be it.

 Sorry for the rant, but really, there's a moment you have to use the
best
 tool for the task - and I don't mean only the easiest. The tweening
 classes included on Flash are cool and all that, but they're too basic,
 too raw. Why you'd need dozens of lines just to do something that can
be
 done with one single line in a pretty straightforward way is beyond me.
 Most of the times I have to build sites, there's so much having to be
 animated correctly that if I resorted to functions and complex
callbacks
 any time I needed some kind of sequence or delay, my code would be a
 complete mess and the sequence would be unmaintainable. Now, with
delays
 it's as easy as it gets. It's easier to read, debug, write, change,
etc.

 Don't be sorry, if it upsets you then best to let it out, bottling
things
 up isn't good for the soul :)

 Anyway, to consider if its easier to change then it really depends on
how
 you want to change it. In some cases yes its undoubtedly easier, in
other
 cases i think it could be harder but I don't know the API of your
tweening
 classes so I cant say.

 What if i wanted to trigger something when each tween ends? What if i
want
 to perform an action depending on which tween has ended?

 Each solution has its pro's and con's so its worth understanding 

Re: [Flashcoders] Attention Recursion Speed Experts

2006-07-26 Thread Mark Winterhalder

Hey Cedric,

What results are you getting? Which one is how much faster in what player?

It would surprise me if there were different results for FP8 and FP9,
because it runs in the old VM and I doubt they reworked it since it's
there for backwards compatibility anyway. It's probably more of a
standalone debug player vs. plugin thing.

When I run it in the v9 debug standalone player it seems like
recursion's speed advantage shrinks to 10%, but that's under Wine and
the results aren't as consistent as in the browser.

Could you or somebody else post a Flash IDE compiled version somewhere maybe?

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


Re: [Flashcoders] as3 and attachmovie

2006-07-26 Thread Supriya
In the library, right click on the symbol , click on Linkage. There select 
the checkbox Export for ActionScript. Give a name (gf) in the class field, 
flash will autogenerate a class for you with that name


Now on timeline do this

var myGf = new gf()
this.addChild(myGf)

this is equivalent to attachMovie

- Original Message - 
From: Carl Welch [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Wednesday, July 26, 2006 2:44 PM
Subject: Re: [Flashcoders] as3 and attachmovie



OK. I am trying to learn how to use classes and have had some success
- But what I just can't seem to grasp in this situation is if I use
this:

var newMC=new MovieClip();
this.addChild(newMC);

instead of this:
attachmovie(gf,gf+_root.getNextHighestDepth(),_root.getNextHighestDepth

How do I select gf as the movieclip to be added to the stage?


Thanks.

On 7/25/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:

Carl,

Everything in AS3 is classes, so you can't do anything without using
classes.
It's actually easier than attachmovie. Just make a

var newMC=new MovieClip();
this.addChild(newMC);

feels alot cleaner that
attachmovie(gf,gf+_root.getNextHighestDepth(),_root.getNextHighestDepth());
doesn't it ;).

good luck!

Meinte

ps. you can checkout senocular.com , he has some excellent tutorials on 
AS3


On 7/25/06, eka [EMAIL PROTECTED] wrote:

 Hello :)

 read in french :

 -

 
http://iteratif.free.fr/blog/index.php?2006/07/11/44-bibliotheque-partagee-sous-flash-9

 attachMovie is remove in AS3 :) Use [embed(source=)] metadata and
 create the instance with new MyClass and addChild() method :)

 eKA+ :)


 2006/7/25, Carl Welch [EMAIL PROTECTED]:
 
  I just downloaded the demo of Flash 9 / as3 and I noticed you can't
  use attachmovie anymore. I've found some new methods on google but it
  seems like the only way I can do it is by using classes. Is there
  another way to handle an attachmovie equivilent without using a class
  in as3?
 
  thanks.
 
  --
  Carl Welch
  http://www.carlwelch.com
  [EMAIL PROTECTED]
  805.403.4819
  ___
  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




--
Carl Welch
http://www.carlwelch.com
[EMAIL PROTECTED]
805.403.4819
___
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] Overriding implicit getters and setters

2006-07-26 Thread Rui Duarte Silva
Hi,

 

Is it possible to override implicit getters and setters in child classes? I
want to introduce some changes to the scrollbar component in Flash 8 by
extending it, but it seems to be impossible to override the set
ScrollPosition setter. Can it be done?

 

Thanks,

 

Rui Duarte Silva

Senior Flash Developer / Senior Product Manager

 

MNI - Médicos Na Internet, Saúde na Internet, SA

Alert Life Sciences Computing

 

 http://www.alert-online.com www.alert-online.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] Attention Recursion Speed Experts

2006-07-26 Thread Cedric Muller



Hey Cedric,

What results are you getting? Which one is how much faster in what  
player?


F8 IDE (FP 8 IDE):
flatten:   1576
flatten2: 1554

flatten:   1451
flatten2: 1593

flatten:   1390
flatten2: 1437

flatten:   1526
flatten2: 1439

flatten:   1313
flatten2: 1528

flatten:   1368
flatten2: 1446



Safari (FP9):
flatten:   970
flatten2: 1283

flatten:   804
flatten2: 1374

flatten:   946
flatten2: 1118

flatten:   911
flatten2: 1238

flatten:   805
flatten2: 1278

flatten:   784
flatten2: 1072


unfortunately I don't have more time right now, will try to post my  
Flash IDE compiled  version later (or someone else)

SORRYYY!


It would surprise me if there were different results for FP8 and FP9,
because it runs in the old VM and I doubt they reworked it since it's
there for backwards compatibility anyway. It's probably more of a
standalone debug player vs. plugin thing.

When I run it in the v9 debug standalone player it seems like
recursion's speed advantage shrinks to 10%, but that's under Wine and
the results aren't as consistent as in the browser.

Could you or somebody else post a Flash IDE compiled version  
somewhere maybe?


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


RE: [Flashcoders] sequential tweens ?

2006-07-26 Thread Danny Kodicek

 Soo I by no means wish to hijack this thread, but i have a 5 week vacation
 coming up, and was still thinking on starting on what i called in my
 previous post some kind of sequencer framework,

Obviously the word 'vacation' means different things to you than to me ;)

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


Re: [Flashcoders] Attention Recursion Speed Experts

2006-07-26 Thread Mark Winterhalder

Thanks, Cedric.

I assume those were results compiled by the Flash IDE, so we can
conclude recursion *is* the fastest. It's also the most elegant
solution, not requirements in this case, but nice to have anyway.

I still don't understand why Danny got contrary results, but I like
recursion better so let's just leave it like that :)

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


Re: [Flashcoders] Creating dynamic text field using font embedded in parent movie clip

2006-07-26 Thread Raymond Simmons
Adrian,

Thanks for your reply.  I'm afraid I might be missing something, but with 
the technique you described for Flash 7, wouldn't the end result be that the 
child FLAs are exported with the font as well?  By adding the font symbols 
to the libraries of the child FLAs, that's causing the font to be included 
in the both the base SWF and the child SWFs, which would explain why the 
technique works :(  Please help me see if I've missed something.

My hope is to avoid embedding the font in the child FLAs.  That way if the 
font changes, I only have to change it in one place.  Also, if we have to 
work with a Mac-only font, it can be embedded in base.fla, and the folks 
working on PCs can still develop the child FLAs even though they don't have 
the font.

Kind regards,
Raymond Simmons


- Original Message - 
From: Adrian Park [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Wednesday, July 26, 2006 12:55 AM
Subject: Re: [Flashcoders] Creating dynamic text field using font embedded 
inparent movie clip


I have successfully used this exact technique when targeting Flash 6 but, as
I think about it, I haven't used it in any Flash 7 projects yet. That said,
due to a quirk in the way a current project has evolved, it has ended up
using this technique but with the addition of identical Symbols in the
library of 'base.fla' and every child .fla.

So, base.fla has 2 Font Symbols in the library for the Normal and Bold
versions of the Font. 2 text fields exist on stage with the fonts embedded
(we've assigned the Font name given to the Symbols to the text field, not
the original font). The font symbols are then duplicated in each sub library
but the text fields are not.

This seems to be working with no problems.

I'm doing a bit of optimisation at the moment and was considering using a
Shared Font Library to tidy things up but you hav me worried now :)

HTH
Adrian

On 7/26/06, Raymond Simmons [EMAIL PROTECTED] wrote:

 In Flash 6, I was able to embed a font in an FLA (we'll call it base.fla),
 load into base.swf an external SWF (we'll call it main.swf), and create a
 text field in main.swf using the font embedded in base.swf.  However, I
 can't seem to get this approach to work in Flash 7.  More specifically, in
 Flash 6, I can add a text field off stage in base.fla, and embed the font.
 Let's say the font is Proxima Nova Bold.  In main.fla, I can create a
 text
 field using the Proxima Nova Bold font with the following code:

 createTextField(myText,1,0,0,100,25);
 var myStyle = new TextFormat();
 myStyle.font = Proxima Nova Bold;
 myText.setNewTextFormat(myStyle);
 myText.embedFonts = true;
 myText.text = Hello World!;

 But if I export main.fla as Flash 7, the technique no longer works.  Has
 anyone else used this approach successfully in Flash 6, and found that it
 does not work in Flash 7?  Or is it possible I'm missing something.  I
 would
 rather avoid the use of a shared font library, because I've heard they
 have
 the potential to corrupt FLAs.  However, if anyone would like to convince
 me
 my fears are unfounded, I'm open to being convinced.

 Thanks,
 Raymond Simmons

 ___
 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] Attention Recursion Speed Experts

2006-07-26 Thread Mark Winterhalder

On 7/26/06, Mark Winterhalder [EMAIL PROTECTED] wrote:

I still don't understand why Danny got contrary results, but I like
recursion better so let's just leave it like that :)


OK, let's not -- I had another look, and found a ! was missing in the
recursive method. I've updated the test class below, test at
http://www.snafoo.org/tmp/flatten.swf, with the length of the result
now being traced as a simple check.

Iteration now is faster, confirming Danny's results.

As a note on the side, the recursion can be accelerated a bit by
storing the value of the array in a variable instead of looking it up
twice in each iteration. You can compare it here:
http://www.snafoo.org/tmp/flatten2.swf. Maybe I should have used
more descriptive names, but 'flatten' here means the original and
'flatten2' means it's like this:

public function flatten2 (r) : Array {
   if (!r) r = [];
   var n = this.length;
   var foo;
   for (var a = 0; a  n; a++) {
   if ( !((foo = this[a]) instanceof Array) ) {
   r.push(foo);
   } else {
   foo.flatten2(r);
   }
   }

   return r;
};

Anyway, iteration is still slightly faster -- this is just a general
hint. I found this after making the other test and am already late, I
might make one with iteration and both recursions later to make it
easier to compare.

Mark






class TestArray extends Array {

public static var testarray : Array;

public static function main () : Void {
var ta = TestArray.testarray = TestArray.randomArray( 10 );

_root.createTextField( tf, 1, 0, 0, 1024, 768 );

var cntr = 0;
_root.onEnterFrame = function () {
if( cntr++  30 ) {
var n = (cntr % 2);
var res;
var start = getTimer();
if( n ) {
res = ta.flatten2();
} else {
res = ta.flatten();
}
var dur = getTimer() - start;

_root.tf.text += \n + res.length + ,  + (n ? 
flatten2 :
flatten) + :  + dur;
}
if( cntr  70 ) {
delete this.onEnterFrame;
}

};
}

public static function randomArray(p) : Array {
   var a = new TestArray;
   for (var i = 0; i  p; i++) {
   if (Math.random() * 2  Math.random() * 5) {
   a.push(i);
   } else {
   a.push(TestArray.randomArray(Math.ceil( 
Math.random() * 3 ) ));
   }
   }

   _root.tf.text += length:  + a.length;

   return a;
}


public function flatten (r) : Array {
   if (!r) r = [];
   var n = this.length;
   for (var a = 0; a  n; a++) {
   if ( !(this[a] instanceof Array) ) {
   r.push(this[a]);
   } else {
   this[a].flatten(r);
   }
   }

   return r;
};

public function flatten2 () : Array {
var outArray : Array = [];
var list = this;
list.index = 0;
var item : Object;
var index : Number;
var length : Number;
do {
index = list.index;
length = list.length;
while( index  length ) {
item = list[ index++ ];
if( item instanceof Array ) {
item.parent = list;
list.index = index;
list = item;
index = 0;
length = list.length;
} else {
outArray.push( item );
}
}
} while( list = list.parent );

return outArray;
}

}



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:

[Flashcoders] dynamic linkage for a Shared library

2006-07-26 Thread jordan robinson
I am using a shared library that loads into the initial shell.swf.  
Currently I have relative paths, but is there a way to set the  
linkage path as a variable instead of it being relative or a full  
path? Since the file is on a test environment the directory will  
change once it goes live and if I could just have a variable change  
it would be easier. If anyone knows if this is possible please let me  
know, thanks in advance!


Jordan Robinson




___
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] sequential tweens ?

2006-07-26 Thread Hans Wichman

;-), well first 2,5 weeks are a real vacation no laptop on penalty of death,
after that there are some hobby projects such as the logger and this thing
that have been lying on my desk for too long now :) but hey no pressure

On 7/26/06, Danny Kodicek [EMAIL PROTECTED] wrote:



 Soo I by no means wish to hijack this thread, but i have a 5 week
vacation
 coming up, and was still thinking on starting on what i called in my
 previous post some kind of sequencer framework,

Obviously the word 'vacation' means different things to you than to me ;)

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] Flash 7 image upload and .NET

2006-07-26 Thread Merrill, Jason
Any links to examples?  Thanks.

Jason Merrill
Bank of America 
Learning  Organization Effectiveness - Technology Solutions 
 
 
 
 
 
-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Pedro Furtado
Sent: Tuesday, July 25, 2006 7:01 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Flash 7 image upload and .NET

Javascript and an hidden form ;)
Old style file upload.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: terça-feira, 25 de Julho de 2006 23:53
To: Flashcoders mailing list
Subject: [Flashcoders] Flash 7 image upload and .NET

With a .NET MS SQL backend, and a Flash 7 player in IE front end, what are
some of my options for image uploading to the server by the user?
Can't use PHP, ColdFusion, etc. in this case.  Thanks,

Jason Merrill
Bank of America
Learning  Organization Effectiveness - Technology Solutions



___
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] loadComplete but no loadInit

2006-07-26 Thread Danny Kodicek
Can anyone think of a reason why I might get a loadComplete without getting
a loadInit when using MovieClipLoader? That is, the swf loads in, but never
plays (a trace action in the first frame doesn't execute). The httpStatus
flag on loadComplete is coming through as 0, and the very same code is
working correctly in a different movie.

More details if required, but right now I'm stuck for the right questions,
let alone the right answers.

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


RE: [Flashcoders] Flash 7 image upload and .NET

2006-07-26 Thread Merrill, Jason
Nevermind, I found some links.  Are there any other recommended methods?  
Thanks.

Jason Merrill
Bank of America 
Learning  Organization Effectiveness - Technology Solutions 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Merrill, Jason
Sent: Wednesday, July 26, 2006 9:03 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Flash 7 image upload and .NET

Any links to examples?  Thanks.

Jason Merrill
Bank of America
Learning  Organization Effectiveness - Technology Solutions





-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Pedro Furtado
Sent: Tuesday, July 25, 2006 7:01 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Flash 7 image upload and .NET

Javascript and an hidden form ;)
Old style file upload.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: terça-feira, 25 de Julho de 2006 23:53
To: Flashcoders mailing list
Subject: [Flashcoders] Flash 7 image upload and .NET

With a .NET MS SQL backend, and a Flash 7 player in IE front end, what are
some of my options for image uploading to the server by the user?
Can't use PHP, ColdFusion, etc. in this case.  Thanks,

Jason Merrill
Bank of America
Learning  Organization Effectiveness - Technology Solutions



___
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] About OOP metodology

2006-07-26 Thread Merrill, Jason
Another thing I love about this approach - (abstract flash file, layout, 
content and config dictated by XML) is that if you want to database-ize it, you 
can in the future - you would have a script update the XML from the database, 
and you could create an interface in Flash or HTML to update the database from 
an admin/content creation perspective. And because the flash file draws from 
the XML not directly from the database, it's portable if you want to move it 
elsewhere.

Jason Merrill
Bank of America 
Learning  Organization Effectiveness - Technology Solutions 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Adrian Park
Sent: Wednesday, July 26, 2006 4:39 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] About OOP metodology

The approach I'd take would be to use an XML configuration file to work out
what inputs are needed and then create all the widgets from the library.
This way, all you need to modify for each deployment is the XML
configuration file. You could then also add attributes to the XML to flag
things like whether the input of a particular widget should be validated or
not, what url the form data should be submitted to and other such
enhancements. Also, if you're worried about layout of different forms, you
could add _x and _y attributes to the XML so you can simply tweak the layout
on a form by form basis. This may mean some extra work up front but, in my
experience, it saves a lot of blood sweat and tears down the line!

If it's reasonable to assume the forms will all use a fairly standard set of
widgets (text fields, combo boxes, radios, check boxes e.t.c) I'm not sure
library bloat is going to be that much of a risk?

Obviously, with this approach you would ideally be able to make assumptions
about the full selection of form widgets you'll need in future but, equally,
if it is built properly in the first place you should be able to add new
types of input quickly and easily in future.

HTH
Adrian

On 7/26/06, Ricardo Sánchez [EMAIL PROTECTED]  wrote:

 Still not sure what to do.

 My doubt is more related to the change in the appearenace, number and type

 of fields in a form from one project to another.

 Should I make a different swf with a form for each project and change the
 class every time? (whatever pattern I use, mvc...)
 Should I make a swf for each field and attach by code the ones I need for
 each project...?

 Do my questions make sense?

 On 6/30/06, Bernard Visscher [EMAIL PROTECTED] wrote:
 
  I think you could do this the MVC way
  ( http://en.wikipedia.org/wiki/Model_view_controller)
  The only thing that really changes is your view, the model and the
  controller are almost the same.
  You could even write a model, controller and view which holds all fields
  and
  logic that returns in all the forms.
  Then you extend those to meet the needs for this particular form.
 
  This is the same way edibol as wrote I see now... Quote: You could even
  abstract the technical logic from the UI completely and write
  communicators/controllers that respond to events fired from the ui
  (movieclips).
 
 
  Greetz,
 
  Bernard
 
   -Oorspronkelijk bericht-
   Van: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] Namens elibol
   Verzonden: vrijdag 30 juni 2006 17:06
   Aan: Flashcoders mailing list
   Onderwerp: Re: [Flashcoders] About OOP metodology
  
   Try a compositional approach. You might design a set of
   classes that reference movieclips and delegate events to the
   class; this would be contrary to extending movieclips. This
   way you can design movieclips specific to the site and design
   the code specific to the logic.
  
   You could even abstract the technical logic from the UI
   completely and write communicators/controllers that respond
   to events fired from the ui (movieclips).
  
   M.
  
   On 6/30/06, Ricardo Sánchez  [EMAIL PROTECTED] wrote:
   
I've just started to work in a big internet communication
   agency. We
have to make 2 or 3 microsites every week. Each of which
   uses a very
similar form to get user data.
   
All that changes from one to another is a couple of fields and the
look of it.
   
My question is: What's the best way to implement a
   re-usable class for
this kind of work? Should I make a movieclip with all the
   fields and a
class binded to it and modify the clip everytime I re-use it? Or
should I make a class that loads different clips from the library?
   
Do I explain myself?
   
Thanks.
___
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 7 image upload and .NET

2006-07-26 Thread PR Durand

Hi Merrill
We've implemented the yamzbrowser (from www.yamago.net) with a .net 
application in F7 and it works perfectly. for me the best solution when 
you can't use F8!

sourceforge.net/projects/*yamzbrowser*/

++
PiR




Merrill, Jason a écrit :

Nevermind, I found some links.  Are there any other recommended methods?  
Thanks.

Jason Merrill
Bank of America 
Learning  Organization Effectiveness - Technology Solutions 
 
 
 
 
 

  

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Merrill, Jason
Sent: Wednesday, July 26, 2006 9:03 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Flash 7 image upload and .NET

Any links to examples?  Thanks.

Jason Merrill
Bank of America
Learning  Organization Effectiveness - Technology Solutions





  

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Pedro Furtado
Sent: Tuesday, July 25, 2006 7:01 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Flash 7 image upload and .NET

Javascript and an hidden form ;)
Old style file upload.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: terça-feira, 25 de Julho de 2006 23:53
To: Flashcoders mailing list
Subject: [Flashcoders] Flash 7 image upload and .NET

With a .NET MS SQL backend, and a Flash 7 player in IE front end, what are
some of my options for image uploading to the server by the user?
Can't use PHP, ColdFusion, etc. in this case.  Thanks,

Jason Merrill
Bank of America
Learning  Organization Effectiveness - Technology Solutions



___
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


  


___
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 7 image upload and .NET

2006-07-26 Thread Merrill, Jason
Thanks!  However, my company categorizes that url as Games and blocks me from 
accessing it.  I have to get approval from someone much higher up to access it. 
Could you send me off-list a screenshot or copy and paste text descriptions 
from the site?  Is there an alternative way to contact the author(s)? 

What is better about their approach than a standard Javascript web form?  
Thanks!

Jason Merrill
Bank of America 
Learning  Organization Effectiveness - Technology Solutions 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of PR Durand
Sent: Wednesday, July 26, 2006 9:27 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Flash 7 image upload and .NET

Hi Merrill
We've implemented the yamzbrowser (from www.yamago.net) with a .net
application in F7 and it works perfectly. for me the best solution when
you can't use F8!
sourceforge.net/projects/*yamzbrowser*/

++
PiR




Merrill, Jason a écrit :
 Nevermind, I found some links.  Are there any other recommended methods?
Thanks.

 Jason Merrill
 Bank of America
 Learning  Organization Effectiveness - Technology Solutions







 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of Merrill, Jason
 Sent: Wednesday, July 26, 2006 9:03 AM
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] Flash 7 image upload and .NET

 Any links to examples?  Thanks.

 Jason Merrill
 Bank of America
 Learning  Organization Effectiveness - Technology Solutions






 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of Pedro Furtado
 Sent: Tuesday, July 25, 2006 7:01 PM
 To: 'Flashcoders mailing list'
 Subject: RE: [Flashcoders] Flash 7 image upload and .NET

 Javascript and an hidden form ;)
 Old style file upload.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
 Jason
 Sent: terça-feira, 25 de Julho de 2006 23:53
 To: Flashcoders mailing list
 Subject: [Flashcoders] Flash 7 image upload and .NET

 With a .NET MS SQL backend, and a Flash 7 player in IE front end, what 
 are
 some of my options for image uploading to the server by the user?
 Can't use PHP, ColdFusion, etc. in this case.  Thanks,

 Jason Merrill
 Bank of America
 Learning  Organization Effectiveness - Technology Solutions



 ___
 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




___
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] Flash Player 9 : Development status and issues regarding the Linux version.

2006-07-26 Thread Honeyghan

http://blogs.adobe.com/penguin.swf/
___
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] Persisting Arrays of Objects with Local Shared Objects

2006-07-26 Thread Chris McFadyen aka Grayson Carlyle

The first thing to be aware of is circular object references, i.e. can you
recursively trace the array without crashing Flash.  So, linked lists are
out of the question.

The second is not to pass any object references (including methods) where
the referred object might change before it is written.  This can do that
trick:




function removeByRef(object:Object) {

   if(typeof(object) == object) {
   var tmpObject = new Object();

   for(var i in object) {

   switch(typeof(object[i])) {
   case object:
   tmpObject[i] = removeByRef(object[i]);
   break;

   case function:
   break;

   default:
   tmpObject[i] = object[i];
   break;
   }
   }
   return tmpObject;
   } else {
   return object;
   }
}


Basically the same rules as trying to serialize a Flash object into a SOAP
object during remoting.


Hello.

Are there any caveats to persisiting an array of shared objects?

My first attempt, which attempted to stick in one of those into a
FlashCookie failed, and Solve couldnt open the .sol file either.

I'm going to try this again, with just simple objects that have only the
fields, and no methods, but in the meantime, is there something else
that I should watch out for?

Thanks.

___
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] as3 and attachmovie

2006-07-26 Thread Carl Welch

doh! I was thrown by the lack of quotation marks for the linkage name.

thanks

On 7/26/06, Supriya [EMAIL PROTECTED] wrote:

In the library, right click on the symbol , click on Linkage. There select
the checkbox Export for ActionScript. Give a name (gf) in the class field,
flash will autogenerate a class for you with that name

Now on timeline do this

var myGf = new gf()
this.addChild(myGf)

this is equivalent to attachMovie

- Original Message -
From: Carl Welch [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Wednesday, July 26, 2006 2:44 PM
Subject: Re: [Flashcoders] as3 and attachmovie


 OK. I am trying to learn how to use classes and have had some success
 - But what I just can't seem to grasp in this situation is if I use
 this:

 var newMC=new MovieClip();
 this.addChild(newMC);

 instead of this:
 attachmovie(gf,gf+_root.getNextHighestDepth(),_root.getNextHighestDepth

 How do I select gf as the movieclip to be added to the stage?


 Thanks.

 On 7/25/06, Meinte van't Kruis [EMAIL PROTECTED] wrote:
 Carl,

 Everything in AS3 is classes, so you can't do anything without using
 classes.
 It's actually easier than attachmovie. Just make a

 var newMC=new MovieClip();
 this.addChild(newMC);

 feels alot cleaner that
 
attachmovie(gf,gf+_root.getNextHighestDepth(),_root.getNextHighestDepth());
 doesn't it ;).

 good luck!

 Meinte

 ps. you can checkout senocular.com , he has some excellent tutorials on
 AS3

 On 7/25/06, eka [EMAIL PROTECTED] wrote:
 
  Hello :)
 
  read in french :
 
  -
 
  
http://iteratif.free.fr/blog/index.php?2006/07/11/44-bibliotheque-partagee-sous-flash-9
 
  attachMovie is remove in AS3 :) Use [embed(source=)] metadata and
  create the instance with new MyClass and addChild() method :)
 
  eKA+ :)
 
 
  2006/7/25, Carl Welch [EMAIL PROTECTED]:
  
   I just downloaded the demo of Flash 9 / as3 and I noticed you can't
   use attachmovie anymore. I've found some new methods on google but it
   seems like the only way I can do it is by using classes. Is there
   another way to handle an attachmovie equivilent without using a class
   in as3?
  
   thanks.
  
   --
   Carl Welch
   http://www.carlwelch.com
   [EMAIL PROTECTED]
   805.403.4819
   ___
   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



 --
 Carl Welch
 http://www.carlwelch.com
 [EMAIL PROTECTED]
 805.403.4819
 ___
 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




--
Carl Welch
http://www.carlwelch.com
[EMAIL PROTECTED]
805.403.4819
___
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] as3 class flowchart

2006-07-26 Thread quinrou .

Hi all,

I am after an as3 class flowchart that would tell me the way that classes
are organised.

I have seen one kicjing about a little while ago but i can't seem to be able
to find the link

thanks

seb
___
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] Standalone database connectivity on the Mac

2006-07-26 Thread Clayton
Hi All!

 

I'm currently working on a project that will require access to, and search
capabilities for, a database for well over 1000 media elements (and all
their attribute fields). This project will run cross platform (separate
installers) and I have to assume that some machines may not be connected to
the internet, and they may not be running server software.

 

As potential solutions, I've successfully experimented with Northcode's SWF
Studio (with SQLite wrapper) and MDM Zinc. Both were relatively easy to
implement.Zinc was a little less painful, but by then I had worked out a few
kinks in my brain (I hope).

 

There is, unfortunately, a brick wall in all this. Standalone,
no-net-connection on the Mac. Northcode.doesn't appear to be able to publish
for it. Zinc.well their database connectivity/query functionality goes way
down for Mac, and seems to require access through a port/host rather than
packaged local.

 

So my big question.am I wrong, and could someone straighten me out on this
issue (and help me see how to do it), or is there another solution (aside
from remaking the entire DB in flash) that I'm missing?

 

Note: the original plan was to write the DB and export as XML. An easy
import method into Flash, no Doubt, but I figured the XML parser would poop
(then die a recursive death) with the size of XML file we'd be talking
about. So I've been bending and changing.just need something that (1) works
and (2) is as easy as possible to implement. Booyeah!

 

Thanks for any and all recommendations!

 

Clayton

___
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] ?? inconsistant results - remoting ??

2006-07-26 Thread Bbt Lists
Hi there - I have a flash movie with different frames that make remoting 
calls. Now when I view them from the server (and loaded into another 
movie) - not all the data will populate in various text fields. When i 
just test it out of the IDE and local on my computer - it works fine! 
Now the perplexing thing is that SOME fields are populated, and others 
are not. And since it works when tested local, I know my assignments 
(text fields to data) are correct. Then the other odd thing is that on 
another frame I will have remoting calls and they will function as 
normal! I thought at first maybe I was missing something out of scope, 
or that my class was messed up - but the fact that it works local, or if 
I copy and paste the MC from the problem movie into a new one, it all 
works as it should.




Ideas?

--
dnk

___
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] net connection debugger not working in F8

2006-07-26 Thread Bbt Lists
Has anyone had this issue, or a way around it? I had searched google, 
and found references to using the mx2004 files to replace the F8 ones, 
but i do not have access to those...


Thanks!

--
dnk

___
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] net connection debugger not working in F8

2006-07-26 Thread Mike Boutin
Ive had this problem using the f8 remoting files.  It seems to fix 
itself for me by restarting flash...


Bbt Lists wrote:
Has anyone had this issue, or a way around it? I had searched google, 
and found references to using the mx2004 files to replace the F8 ones, 
but i do not have access to those...


Thanks!



___
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 Chris Hill
Thanks a lot for your array functions. I'm setting these up in a class 
file, and I was thinking that I'd add the functions to the intrinsics. 
But I looked at the intrinsics file for Array.as, and I was a bit 
surprised to learn that Array is dynamic. So is it worth the effort to 
modify the intrinsics?


Thanks
Chris

Steven Sacks | BLITZ wrote:


Here is the next iteration - new and improved.   Again, all comments and
optimizations, including conversations about optimizations, are most
welcome!

// Array Empowerment
// Removes all elements from Array
Array.prototype.clear = function() {
this.length = 0;
};
// Invoking block once for every element, passing each element as a
parameter to block
// The result of block is used as the given element in the array
Array.prototype.collect = function(block) {
var n = this.length;
for (var a = 0; a  n; a++) {
this[a] = block(this[a]);
}
};
// Removes all null and undefined elements from Array
Array.prototype.compact = function() {
var i = -1;
var n = this.length;
var r = [];
for (var a = 0; a  n; a++) {
if (this[a] != null  this[a] != undefined) {
r.push(this[a]);
}
}
};
// Deletes items from the Array that are equal to obj
Array.prototype.delete_all = function(obj) {
var n = this.length;
var r = [];
if (!(obj instanceof Array)) {
for (a = 0; a  n; a++) {
if (this[a] == obj) r.push(this[a]);
}
} else {
for (a = 0; a  n; a++) {
if (!this[a].eql(obj)) r.push(this[a]);
}   
}
this.replicate(r);
};
// Deletes the element at the specified index, returning that element,
or undefined if the index is out of range
Array.prototype.delete_at = function(i) {
if (i  this.length  i  -1) return this.splice(i, 1)[0];
return undefined;
};
// Deletes every element of Array for which block evaluates to true
Array.prototype.delete_if = function(block) {
var r = [];
var n = this.length;
for (var a = 0; a  n; a++) {
if (!block(this[a])) {
r.push(this[a]);
}
}
this.replicate(r);
};
Array.prototype.duplicate = function() {
var r = [];
var a = this.length;
while (--a -(-1)) {
r[a] = this[a];
}
return r;
};
Array.prototype.replicate = function(r) {
this.length = 0;
var a = r.length;
while (--a -(-1)) {
this[a] = r[a];
}
};
// Calls block once for each element in Array, passing that element as a
parameter
Array.prototype.each = function(block) {
var n = this.length;
for (var a = 0; a  n; a++) {
block(this[a]);
}
};
// Same as Array.each, but passes the index of the element instead of
the element itself
Array.prototype.each_index = function(block) {
var n = this.length;
for (var a = 0; a  n; a++) {
block(a);
}
};
// An array is equal to another array if the lengths are equal and each
corresponding element is equal
Array.prototype.eql = function(arr) {
if (arr.length != this.length || !(arr instanceof Array)) {
return false;
} else {
var a = this.length;
while (--a -(-1)) {
if (this[a] instanceof Array) {
if (!this[a].eql(arr[a])) return false;
} else if (this[a] != arr[a]) {
return false;
}
}
}
return true;
};
// Runs block on every item in the array 
// Returns true if the function returns true for every item

Array.prototype.every = function(block) {
var a = this.length;
while (--a -(-1)) {
if (!block(this[a])) return false;
}
return true;
};
// Sets the selected elements of Array (which may be the entire array)
to obj
// A start of undefined is equivalent to zero. 
// A length of undefined is equivalent to Array.length.

Array.prototype.fill = function(obj, start, len) {
if (!start) start = 0;
if (len == undefined) len = this.length;
len = start + len;
if (len  this.length) len = this.length;
while (--len - (-1)  start) {
this[len] = obj;
}
};
// Runs a function on every item in the array
// Returns an array of all items for which the function returns true.
Array.prototype.filter = function(block) {
var r = [];
var n = this.length;
for (var a = 0; a  n; a++) {
if (block(this[a])) r.push(this[a]);
}
return r;
};
// Returns a new array that is a one-dimensional flattening of this
Array 

Re: [Flashcoders] net connection debugger not working in F8

2006-07-26 Thread Bbt Lists

Mike Boutin wrote:
Ive had this problem using the f8 remoting files.  It seems to fix 
itself for me by restarting flash...


Bbt Lists wrote:
Has anyone had this issue, or a way around it? I had searched google, 
and found references to using the mx2004 files to replace the F8 
ones, but i do not have access to those...


Thanks!


I have restarted flash many times over the last few weeks. This is an 
ongoing issue for me that I have been trying to research first before 
posting, but I am just getting frustrated with it now... so i am 
reaching out to others now as well.  It just never works.  =-)



--
dnk

___
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 Chris Hill

Found a couple problems with sum():
First off, instanceof works with *objects* not primitives, and so you 
must do:


var a:Array = new Array(new Number(2),new Number(3),new Number(54),new 
Number(6),new Number(7),new Number(8),new Number(9));


instead of say:

var b:Array = new Array(2,3,54,6,7,8,9);

So you *have* to check with typeof for primitives, then instanceof for 
objects. Horrible, I know.


Additionally, it would help to have a return statement :D.

Array.prototype.sum = function() {
   var x = 0;
   var a = this.length;
   while (--a -(-1)) {
   var num = this[a];
   if (typeof(num) == number || num instanceof Number) {
   x += num;
   } else {
   return undefined;
   }
   }
   return x;
};

//Here are the test cases i wrote to verify functionality

var a:Array = new Array(new Number(2),new Number(3),new Number(54),new 
Number(6),new Number(7),new Number(8),new Number(9));

var b:Array = new Array(2,3,54,6,7,8,9);
var c:Array = new Array(2,new Number(3),new Number(54), 6,7,8,9);
var d:Array = new Array(2,3,4,new Number(54),6,7,8,9); //should return 
undefined

trace(a.sum());
trace(b.sum());
trace(c.sum());
trace(d.sum());


Lastly, there were a couple places where you did not use 'var' and the 
compiler caught it when I encapsulated your AS 1 into a class. I'll post 
if you like.


Peace
C
___
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 Steven Sacks | BLITZ
I appreciate all feedback on this Array extension.

 Why do the function names have underscores when camel-humped names
are
 the customary syntax in ActionScript

It's how Ruby does it and I'm learning Ruby so I guess it just carried
over.  I've changed them to AS formatting.


 Some of the names could be clearer:

All but two of these method names came from the Array classes in Ruby,
php and Java.  If they're good enough for those, they're good enough for
AS.  :)


 - nitems looks like number of items (i.e., length); why not
 numSetItems or countSetItem?

Yeah, I didn't think it was very descriptive either, but it returns the
number of non null/undefined items in the array (which, at the moment, I
don't see as very useful, hehe).  Perhaps it could be notNullCount()?
This method actually inspires me to create a more useful method that I
think is missing: count.

// Returns the number of obj found in the Array.
Array.prototype.count = function(obj) {
var c = 0;
var a = this.length;
if (obj instanceof Array) {
while (--a -(-1)) {
if (this[a].eql(obj)) c++;
}
} else {
while (--a -(-1)) {
if (this[a] == obj) c++;
}
}
return c;
};


 - rindex is a bit confusing

I've renamed it lastIndexOf to match the String method which does the
same thing.


 - some -- maybe forSome, or exists? (Also, every makes more
 sense to me as forAll.)

every and some come from php.  But you bringing this up made me think
about it, and I've concluded that 'any' is a more descriptive method
name (and one less character to type!). 'any' and 'every' go together
well (like chocolate and peanut butter).  I've renamed 'some' to 'any'.


 - eql -- equals is far more standard

eql is what is used in Ruby, while Java uses equals.  I don't know if
there's a clear standard.  I like Ruby.  I think it's a great language.
I have no problem with shaving a few chars off for quicker typing,
especially if equals ever enters into the language.  eql is more
likely to not conflict with anything.


 - include is pretty close to a reserved word

You're right.  I've renamed it 'has', which I think is perfect, and,
coincidentally, still maintains alphabetical order without having to
move it.  :)


 - the delete functions don't so much delete (i.e., totally
destroy)
 as remove or strip.

They do delete - from the Array.  This method belongs to the Array
class.  Hence, it's doing exactly what it says and what you expect -
deleting an element from the Array.  Once you delete it from the Array,
it's no longer in the Array.  It's not Object.delete, it's Array.delete.
Delete is the original name of the method in Ruby, but delete is a Flash
native method and cannot be assigned to a function.  So, I've used
deleteAll, deleteAt and deleteIf.


Thanks!

-Steven

___
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: Re: [Flashcoders] Array Empowerment

2006-07-26 Thread John Mark Hawley
One thing about putting these methods into a class -- it would be nice if they 
were a mixin so only Arrays that actually needed the methods got them. (Mixing 
into the Array prototype would add them to all Arrays if a user decided that 
would be worthwhile.)

I occasionally make utility classes (ArrayUtil) and exporter classes 
(ArrayUtilExporter) -- the utility class has methods like:

ArrayUtil.contains( toCheck:Array, item:Object ) :Boolean

and the exporter class is a mixin that adds the ArrayUtil methods to a given 
array.

-mark

 
 From: Chris Hill [EMAIL PROTECTED]
 Date: 2006/07/26 Wed PM 01:20:15 CDT
 To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
 Subject: Re: [Flashcoders] Array Empowerment
 
 Found a couple problems with sum():
 First off, instanceof works with *objects* not primitives, and so you 
 must do:
 
 var a:Array = new Array(new Number(2),new Number(3),new Number(54),new 
 Number(6),new Number(7),new Number(8),new Number(9));
 
 instead of say:
 
 var b:Array = new Array(2,3,54,6,7,8,9);
 
 So you *have* to check with typeof for primitives, then instanceof for 
 objects. Horrible, I know.
 
 Additionally, it would help to have a return statement :D.
 
 Array.prototype.sum = function() {
 var x = 0;
 var a = this.length;
 while (--a -(-1)) {
 var num = this[a];
 if (typeof(num) == number || num instanceof Number) {
 x += num;
 } else {
 return undefined;
 }
 }
 return x;
 };
 
 //Here are the test cases i wrote to verify functionality
 
 var a:Array = new Array(new Number(2),new Number(3),new Number(54),new 
 Number(6),new Number(7),new Number(8),new Number(9));
 var b:Array = new Array(2,3,54,6,7,8,9);
 var c:Array = new Array(2,new Number(3),new Number(54), 6,7,8,9);
 var d:Array = new Array(2,3,4,new Number(54),6,7,8,9); //should return 
 undefined
 trace(a.sum());
 trace(b.sum());
 trace(c.sum());
 trace(d.sum());
 
 
 Lastly, there were a couple places where you did not use 'var' and the 
 compiler caught it when I encapsulated your AS 1 into a class. I'll post 
 if you like.
 
 Peace
 C
 ___
 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 Mark Hawley
The Nilbog Group
773.968.4980 (cell)

___
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 Steven Sacks | BLITZ
Thanks for pointing out the issues with sum.  I think I have found a
decent solution, though I'm not certain of the performance hit.

Array.prototype.sum = function() {
var x = 0;
var a = this.length;
while (--a -(-1)) {
if (!isNaN(Number(this[a]))) {
x += this[a];
} else {
return undefined;
}
}
return x;
};

 Additionally, it would help to have a return statement :D.

Oops! Nice catch.  :)


 Lastly, there were a couple places where you did not use 'var' and the
 compiler caught it when I encapsulated your AS 1 into a class. I'll
post
 if you like.

Where?  I just double-checked. The only place I can think your compiler
might complain is Array.fill, but 'len' is an argument.

-Steven

___
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] _global.styles.TextArea.embedFonts=true - problem

2006-07-26 Thread Andrew Newstead
Hi, theres alot of posts here and allover the internet about this issue but 
no find an answers i can see.


i'm try to embed a global font for use with a v2 textarea component:

_global.styles.TextArea.embedFonts=true;
_global.styles.TextArea.fontFamily=hnm;//hnm is a non system font embeded 
and linked as so in my library.


then

txt.text=asdbrasdbrasd;//txt is a v2 textarea component on the stage 
named as so.


PROBLEM=embedFonts is causing nothing to display - why does this not act 
like a global style sheet?


any help greatfully received


___
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] LocalConnection Problem

2006-07-26 Thread Jessica Hensley
Is anyone aware of problems using a localConnection on different
browsers and on Mac versus PC? I'm working on a project in which I have
two Flash files running on an HTML page and the first file sends a
cookie to the second file using a localConnection. The complication is
that the first file loops a series of secondary Flash movies in and out
and when each of those movies switches, it needs to send a new frame
number to the second movie. I've been working on this for several weeks
and have gone through several versions of the files, some of which work
on Firefox/PC, some work on IE/PC, some have occasionally worked on the
Mac browsers. Code in the sending file is below. Also below is a link to
the HTML page that is holding the two movies.

Not an expect AS programmer, so I won't be insulted by any major
critiques of the code. Any help is greatly appreciated!

http://www.h2xmultimedia.com/clients/_select/index.html

Sending File Code:

var frames:Array = new Array(2,62,122,182,242,302);
var clips:Array = new Array(images/bars/bar1.swf,
images/bars/bar2.swf, images/bars/bar3.swf, images/bars/bar4.swf,
images/bars/bar1.swf, images/bars/bar2.swf);

waitDelay = 7.5; //in seconds

imageCount = -1;
frameCount = -1;
onTop = createEmptyMovieClip('holder_1', 1);
onBottom = createEmptyMovieClip('holder_2', 2);
onTop._alpha = 100;
onBottom._alpha = 0;
holder_1._lockroot = true;
holder_2._lockroot = true;

loadNextImage = function () {

onBottom.loadMovie(clips[imageCount=(imageCount+1)%clips.length]);

//send the next frame number - WORKS PERFECTLY IN
TESTING ENVIRONMENT BUT NOT IN BROWSERS
function sendFrameNumber(bnum){
outgoing_lc = new LocalConnection();
outgoing_lc.send(lc_test, testme, bnum);
delete outgoing_lc;
}

sendFrameNumber(frames[frameCount=(frameCount+1)%frames.length]);

//fade the images
onEnterFrame = function() {
if (onBottom._width0) {
crossFade(onTop,onBottom);
onEnterFrame = null;
}
}
}


waitTime = function (seconds) {
waitId = setInterval(function() { 
loadNextImage();clearInterval(waitId);}, seconds*1000);
};
loadNextImage();

function crossFade(clip1,clip2) {
cross = function (clip1, clip2) {
clip1._alpha -= 5;
clip2._alpha += 5;
if (clip2._alpha = 100) {
temp = onTop;
onTop = onBottom;
onBottom = temp;
clip1.swapDepths(clip2);
waitTime(waitDelay);
clearInterval(fadeId);
}
updateAfterEvent();
};
fadeId = setInterval(cross, 2, clip1, clip2);
}

___
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 Chris Hill
I just checked and delete_all did not have 'var a' but just 'a' in the 
loops. No biggie.


I'm not really sure that converting a primitive to an object, then 
testing with isNaN is faster than just using typeof and (if that fails) 
instanceof. But what I do like about it is that it works with numeric 
strings.


Chris
___
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 Steven Sacks | BLITZ
Yes I see it.  Thanks for pointing that out.

Yes, the isNaN(Number(this[a])) check will convert string numbers to
numbers and that's a great benenfit in a language where strict typing is
bogus.

___
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 Steven Sacks | BLITZ
 Those are great additions. You need a duplicate_deep and a
 replicate_deep, though. Right now, any obejcts stored in the array
will be
 references in the new array. A _deep method would make copies of those
 too, recursively caling Array.duplicate, or Object.duplicate. ;-)

I'm not sure this is an issue, and here's why.  An Array is an
enumerable hash of references.  If I'm duplicating the Array, I'm not
duplicating the references, I'm duplicating the container of the
references.  Array.duplicate duplicates the Array.

What you're describing is not really a method of Array, and blurs the
line between an Array and the contents of an Array.  Plus, I don't see
how what you're describing could really be useful and it seems like a
dangerous notion fraught with potential memory waste/leaks.  :)

And, you can actually write it yourself easily enough with each or
collect.

newArray = oldArray.duplicate();
function dupeObj(o) {
// newObj = duplicate o
return newObj;
}
newArray.collect(dupeObj);

Tada!

___
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 Steven Sacks | BLITZ
Version 3 - Keep those revisions, suggestions, comments coming!
---
// Empowered Array
// Runs a function on every item in the array
// Returns true if the function returns true for any one item
Array.prototype.any = function(block) {
var a = this.length;
while (--a -(-1)) {
if (block(this[a])) return true;
}
return false;
};
// Removes all elements from Array
Array.prototype.clear = function() {
this.length = 0;
};
// Invoking block once for every element, passing each element as a
parameter to block
// The result of block is used as the given element in the array
Array.prototype.collect = function(block) {
var n = this.length;
for (var a = 0; a  n; a++) {
this[a] = block(this[a]);
}
};
// Removes all null and undefined elements from Array
Array.prototype.compact = function() {
var i = -1;
var n = this.length;
var r = [];
for (var a = 0; a  n; a++) {
if (this[a] != null  this[a] != undefined) {
r.push(this[a]);
}
}
};
// Returns the number of obj found in the Array.
Array.prototype.count = function(obj) {
var c = 0;
var a = this.length;
if (obj instanceof Array) {
while (--a -(-1)) {
if (this[a].eql(obj)) c++;
}
} else {
while (--a -(-1)) {
if (this[a] == obj) c++;
}
}
return c;
};
// Deletes items from the Array that are equal to obj
Array.prototype.deleteAll = function(obj) {
var n = this.length;
var r = [];
if (!(obj instanceof Array)) {
for (var a = 0; a  n; a++) {
if (this[a] == obj) r.push(this[a]);
}
} else {
for (var a = 0; a  n; a++) {
if (!this[a].eql(obj)) r.push(this[a]);
}   
}
this.replicate(r);
};
// Deletes the element at the specified index, returning that element,
or undefined if the index is out of range
Array.prototype.deleteAt = function(i) {
if (i  this.length  i  -1) return this.splice(i, 1)[0];
return undefined;
};
// Deletes every element of Array for which block evaluates to true
Array.prototype.deleteIf = function(block) {
var r = [];
var n = this.length;
for (var a = 0; a  n; a++) {
if (!block(this[a])) {
r.push(this[a]);
}
}
this.replicate(r);
};
// Returns a copy of the array
Array.prototype.duplicate = function() {
var r = [];
var a = this.length;
while (--a -(-1)) {
r[a] = this[a];
}
return r;
};
// Calls block once for each element in Array, passing that element as a
parameter
Array.prototype.each = function(block) {
var n = this.length;
for (var a = 0; a  n; a++) {
block(this[a]);
}
};
// Same as Array.each, but passes the index of the element instead of
the element itself
Array.prototype.eachIndex = function(block) {
var n = this.length;
for (var a = 0; a  n; a++) {
block(a);
}
};
// An array is equal to another array if the lengths are equal and each
corresponding element is equal
Array.prototype.eql = function(arr) {
if (arr.length != this.length || !(arr instanceof Array)) {
return false;
} else {
var a = this.length;
while (--a -(-1)) {
if (this[a] instanceof Array) {
if (!this[a].eql(arr[a])) return false;
} else if (this[a] != arr[a]) {
return false;
}
}
}
return true;
};
// Runs block on every item in the array 
// Returns true if the function returns true for every item
Array.prototype.every = function(block) {
var a = this.length;
while (--a -(-1)) {
if (!block(this[a])) return false;
}
return true;
};
// Sets the selected elements of Array (which may be the entire array)
to obj
// A start of undefined is equivalent to zero. 
// A length of undefined is equivalent to Array.length.
Array.prototype.fill = function(obj, start, len) {
if (!start) start = 0;
if (len == undefined) len = this.length;
len = start + len;
if (len  this.length) len = this.length;   
while (--len - (-1)  start) {
this[len] = obj;
}
};
// Runs a function on every item in the array
// Returns an array of all items for which the function returns true.
Array.prototype.filter = function(block) {
var r = [];
var n = this.length;
for (var a = 0; a  n; 

RE: [Flashcoders] Array Empowerment

2006-07-26 Thread Steven Sacks | BLITZ
Quick optimization - Pulled the if instanceof Array out of the loop:

Array.prototype.lastIndexOf = function(obj) {
var a = this.length;
if (!(this[a] instanceof Array)) {
while (--a -(-1)) {
if (this[a] == obj) return a;   
}
} else {
 while (--a -(-1)) {
if (this[a].eql(obj)) return a; 
}
}
return undefined;
};


___
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 Chris Hill

Darn, I wasn't fast enough to get this into rev 3 :)

Array.prototype.sum = function() {
   var x = 0;
   var a = this.length;
   while (--a -(-1)) {
   var n = Number(this[a]);
   if (!isNaN(n)) {
   x += n;
   } else {
   return undefined;
   }
   }
   return x;
};


While you were casting to Number for the test, when you actually added 
you were adding the initial value. This meant strings were concatenated 
instead of added.


Peace
C
___
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 Mike
  - nitems looks like number of items (i.e., length); why not
  numSetItems or countSetItem?

 Yeah, I didn't think it was very descriptive either, but it returns
the
 number of non null/undefined items in the array (which, at the moment,
I
 don't see as very useful, hehe).  Perhaps it could be notNullCount()?

Yes, even better than my suggestions (or countNotNull).

 This method actually inspires me to create a more useful method that I
 think is missing: count.

Nice.

  - some -- maybe forSome, or exists? (Also, every makes more
  sense to me as forAll.)

 every and some come from php.  But you bringing this up made me think
 about it, and I've concluded that 'any' is a more descriptive method
 name (and one less character to type!). 'any' and 'every' go together
 well (like chocolate and peanut butter).  I've renamed 'some' to
'any'.

In mathematics these are the quantifiers written as an upside-down A
and a backwards E, respectively. They are usually read (and often
written) as for all and [there] exists or for some--hence my
suggestions.

There must be equivalent Java functions somewhere (and ActionScript is
far more akin to Java than PHP or Ruby).

  - eql -- equals is far more standard

 eql is what is used in Ruby, while Java uses equals.  I don't know if
 there's a clear standard.  I like Ruby.  I think it's a great
language.
 I have no problem with shaving a few chars off for quicker typing,
 especially if equals ever enters into the language.  eql is more
 likely to not conflict with anything.

But, as pointed out before, ActionScript is far more akin to Java, where
equals is something just about every single object has. Furthermore,
some Flash objects (e.g., Point), already use equals. Finally, eql
looks a lot like leq.

  - include is pretty close to a reserved word

 You're right.  I've renamed it 'has', which I think is perfect, and,
 coincidentally, still maintains alphabetical order without having to
 move it.  :)

Nice.

  - the delete functions don't so much delete (i.e., totally
destroy)
  as remove or strip.

 They do delete - from the Array.  This method belongs to the Array
 class.  Hence, it's doing exactly what it says and what you expect -
 deleting an element from the Array.  Once you delete it from the
Array,
 it's no longer in the Array.  It's not Object.delete, it's
Array.delete.
 
 Delete is the original name of the method in Ruby, but delete is a
Flash
 native method and cannot be assigned to a function.  So, I've used
 deleteAll, deleteAt and deleteIf.

There is no Object.delete or Array.delete, nor can there be, since
delete is a keyword--not a native method (like, say, trace or
setInterval), but part of the language itself (like new--same as in
C and Java and PHP). Deleting means you are utterly destroying the
object--essentially forcing garbage collection. Removing means you are
taking it out of the array (but it might still be referenced somewhere
else). I think you should only use delete (or destroy) as part of
the name if you are actually forcing deletion, not if you are just
removing a reference.

In short, I don't think it's a good idea to use Ruby or PHP conventions
in ActionScript. Look to other ActionScript conventions first, then look
to Java conventions.

Niggling points, I know, but legible code is worth some thought, I
think.
--
T. Michael Keesey

___
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 Steven Sacks | BLITZ
Ah.  Thanks!  I updated the list.

Ok, I'm getting back to work on String extension, the next in the
series.  

Keep the feedback coming!

-Steven

___
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] Tree component icons

2006-07-26 Thread Grant Davies
Is it possible to mark a tree node as Special so I can apply different
icons ?

I have a tree that has the hierarchy

Groups
  |__Roles
 |_ Permissions

An I want each level to have a different icon.  Can this be done, and
do I have to do a custom tree renderer ?

Grant
___
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] Flash AICC tracking

2006-07-26 Thread David Brunswick
Hello List I am able to post completion to my LMS using 
exitBtn.onRelease = function(){ 
 
  getURL(myurl\myservlet?edt_action=RecModuleCmpl , POST); 
getURL(javascript: window.opener=self; window.close(););
}

The problem is the servlet launches a html page verifying completion which I
do not want any ideas to prevent this?

Fyi the second getURl closes the flash embedded html.

David Brunswick
Multimedia Developer/OLP Administrator
FedEx Customer Information Services
Customer Service Organizational Learning
901-434-6605
 

___
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 AICC tracking

2006-07-26 Thread Aaron Silvers

Unfortunately, I think you're stuck with that html page.  It is what keeps
the connection open to the LMS to make sure that completion_status is
written to the learner's transcript.

AICC can an ugly mistress, depending on the LMS implementation.

-a-

On 7/26/06, David Brunswick [EMAIL PROTECTED] wrote:


Hello List I am able to post completion to my LMS using
exitBtn.onRelease = function(){

  getURL(myurl\myservlet?edt_action=RecModuleCmpl , POST);
getURL(javascript: window.opener=self; window.close(););
}

The problem is the servlet launches a html page verifying completion which
I
do not want any ideas to prevent this?

Fyi the second getURl closes the flash embedded html.

David Brunswick
Multimedia Developer/OLP Administrator
FedEx Customer Information Services
Customer Service Organizational Learning
901-434-6605


___
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





--
-a-

Aaron E. Silvers
[EMAIL PROTECTED]
http://flashforlearning.com
--
Whoso would be a man must be a nonconformist. - Ralph Waldo Emerson
___
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] Re: Flashcoders Digest, Vol 18, Issue 72

2006-07-26 Thread anartist
the Water the Land the Air, are the Tribes
 of Earth, Sovereign Right to Protect
Hi flashcoders-request,
I am new to this but I am trying to find out how to put an onLoad java
script statement onto a flash button to launch a htmlwindow at a
specified size and location. Could any help me Please.

-- 
namasté,
 Nicholas,
 anartistmailto:[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


RE: [Flashcoders] Array Empowerment

2006-07-26 Thread Steven Sacks | BLITZ
 There must be equivalent Java functions somewhere (and ActionScript is
 far more akin to Java than PHP or Ruby).

I think every and any are fine, to be honest.


 But, as pointed out before, ActionScript is far more akin to Java,
where
 equals is something just about every single object has. Furthermore,
 some Flash objects (e.g., Point), already use equals. Finally, eql
 looks a lot like leq.

What's leq?


 Deleting means you are utterly destroying the object
 --essentially forcing garbage collection. 

Ah, well this is where the point I made to Mike comes into play.  I'm
not destroying an element OF the Array, I'm deleting an element FROM the
Array.  Array.delete means delete an element of the Array because that's
the scope of the delete method - it belongs to the Array and refers to
the collection of objects, not the objects themselves.

Permit me a Ted Stevens moment, if you will.  An Array is a box that is
self-aware of its contents and nothing else.  If you remove an item from
the box, from the Box's point of view, that item no longer exists - it's
been deleted from the Box.

Remove and delete are essentially synonymous.

If I delete (or remove, as you say) an element from an Array, the Array
takes up less memory, hence garbage collection is doing its job and I am
utterly destroying the pointer's presence in the Array (not the pointer
itself).  I'm chocking this up to a fundamental difference of opinion
about the theoretical (philosophical?) relationships of Objects in an
OOP design pattern.

Backspace and Delete, Enter and Return...which is right?  :)


___
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 Mark Winterhalder

On 7/26/06, Steven Sacks | BLITZ [EMAIL PROTECTED] wrote:

Keep the feedback coming!


Hi Steve,

very nice -- I went back to the flattening thing, the current test is
at snafoo.org/tmp/flatten.swf. I'm getting:

iterative:1453
new recursive: 1678
recursive: 1738

I'm posting this here because the improvement in new recursive
applies for some other functions, too. It's very simple, whenever you
use this[a] more than once in a loop, store it in a local var. It's a
tiny thing with a measurable effect, as you can see above.

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


Re: [Flashcoders] Array Empowerment

2006-07-26 Thread Ammon Lauritzen

On 7/26/06, Steven Sacks | BLITZ [EMAIL PROTECTED] wrote:

Backspace and Delete, Enter and Return...which is right?  :)


^H
___
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] Flash plugin preinstalled starting with what browser versions?

2006-07-26 Thread Doug Brashear
Hello all,

I'm trying to make a business case for one of my clients, and in order to do
so need to know when (the specific IE, Opera and Firefox version numbers)
the Flash plug came pre-installed with the browser. 

Our Flash need is pretty basic (images and text that fade in and out, no
interactivity), and I'd also appreciate any recommendations you have in
terms of which version of the Flash player to design for (in terms of
features supported) in order to achieve maximum compatibility, but with the
ability to take advantage of the most essential features.

Thanks a ton in advance,

- Doug

_
Doug Brashear
Information Architect
NavigationArts
703.873.4119 (office)
703.725.8031 (mobile)
[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


RE: [Flashcoders] Flash AICC tracking

2006-07-26 Thread Matthew Simpson
I have not read the prior posts so I'm not sure if this is what you are
looking for, but I pass XML/Vars to JSP servlets all day using:

poXML.sendAndLoad(acmm.servletURL+POManager, poReplyXML);

poXML is the doc I send
Acmm.servletURL is a dynamic var containing the JSP URL
POManager is the servlet name.
poReplyXML is the servlets reply in an XML object.

HTH

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David
Brunswick
Sent: Wednesday, July 26, 2006 3:35 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Flash AICC tracking

Is there another way to call/pass info to servlet besides getURL?

David Brunswick
Multimedia Developer/OLP Administrator
FedEx Customer Information Services
Customer Service Organizational Learning
901-434-6605
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Aaron
Silvers
Sent: Wednesday, July 26, 2006 2:14 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Flash AICC tracking

Unfortunately, I think you're stuck with that html page.  It is what
keeps the connection open to the LMS to make sure that completion_status
is written to the learner's transcript.

AICC can an ugly mistress, depending on the LMS implementation.

-a-

On 7/26/06, David Brunswick [EMAIL PROTECTED] wrote:

 Hello List I am able to post completion to my LMS using 
 exitBtn.onRelease = function(){

   getURL(myurl\myservlet?edt_action=RecModuleCmpl , POST);
 getURL(javascript: window.opener=self; window.close();); }

 The problem is the servlet launches a html page verifying completion 
 which I do not want any ideas to prevent this?

 Fyi the second getURl closes the flash embedded html.

 David Brunswick
 Multimedia Developer/OLP Administrator FedEx Customer Information 
 Services Customer Service Organizational Learning
 901-434-6605


 ___
 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




-- 
-a-

Aaron E. Silvers
[EMAIL PROTECTED]
http://flashforlearning.com
--
Whoso would be a man must be a nonconformist. - Ralph Waldo Emerson
___
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] Flash AICC tracking

2006-07-26 Thread David Brunswick
That sounds like a good solution where can I find xml object flash samples?

David Brunswick
Multimedia Developer/OLP Administrator
FedEx Customer Information Services
Customer Service Organizational Learning
901-434-6605
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Matthew
Simpson
Sent: Wednesday, July 26, 2006 2:50 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Flash AICC tracking

I have not read the prior posts so I'm not sure if this is what you are
looking for, but I pass XML/Vars to JSP servlets all day using:

poXML.sendAndLoad(acmm.servletURL+POManager, poReplyXML);

poXML is the doc I send
Acmm.servletURL is a dynamic var containing the JSP URL
POManager is the servlet name.
poReplyXML is the servlets reply in an XML object.

HTH

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David
Brunswick
Sent: Wednesday, July 26, 2006 3:35 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Flash AICC tracking

Is there another way to call/pass info to servlet besides getURL?

David Brunswick
Multimedia Developer/OLP Administrator
FedEx Customer Information Services
Customer Service Organizational Learning
901-434-6605
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Aaron
Silvers
Sent: Wednesday, July 26, 2006 2:14 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Flash AICC tracking

Unfortunately, I think you're stuck with that html page.  It is what
keeps the connection open to the LMS to make sure that completion_status
is written to the learner's transcript.

AICC can an ugly mistress, depending on the LMS implementation.

-a-

On 7/26/06, David Brunswick [EMAIL PROTECTED] wrote:

 Hello List I am able to post completion to my LMS using 
 exitBtn.onRelease = function(){

   getURL(myurl\myservlet?edt_action=RecModuleCmpl , POST);
 getURL(javascript: window.opener=self; window.close();); }

 The problem is the servlet launches a html page verifying completion 
 which I do not want any ideas to prevent this?

 Fyi the second getURl closes the flash embedded html.

 David Brunswick
 Multimedia Developer/OLP Administrator FedEx Customer Information 
 Services Customer Service Organizational Learning
 901-434-6605


 ___
 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




-- 
-a-

Aaron E. Silvers
[EMAIL PROTECTED]
http://flashforlearning.com
--
Whoso would be a man must be a nonconformist. - Ralph Waldo Emerson
___
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] Attention Recursion Speed Experts

2006-07-26 Thread Mark Winterhalder

OK, my final conclusion:

http://www.snafoo.org/tmp/flatten.swf

Iterative *is* faster than recursion. Run the test and examine the
test class below. (Use an empty .fla, import it, call TestArray.main()
)

Also, we learn that whenever you have to get the item at the same
position of an array twice, store it in a local variable. Plus, and
this lead to significant improvements, don't use Array.push(), but
maintain the index in a local variable.

The fastest is the new iterative, or flatten4 as it is called in
the class below. We're talking 25% improvement over recursion. I've
changed the original one so it stores the index and parent on a stack
instead of a property so it can be used in Steven's Array class if he
likes.

It ain't pretty to look at, but it's pretty fast.

Mark





class TestArray extends Array {

public static var testarray : Array;

public static function main () : Void {
var ta = TestArray.testarray = TestArray.randomArray( 10 );
var reference = ta.flatten().length;

_root.createTextField( tf, 1, 0, 0, 1024, 768 );
_root.tf.text = testing... will take a while, be patient.;

var cntr = 0;
var results = [ [], [], [], [] ];
var labels = [ recursive, new recursive, iterative, new 
iterative ];
_root.onEnterFrame = function () {
if( cntr++  30 ) {
var n = (cntr % 4);
var res;
var start;
switch( n ) {
case 0:
start = getTimer();
res = ta.flatten();
break;

case 1:
start = getTimer();
res = ta.flatten2();
break;

case 2:
start = getTimer();
res = ta.flatten3();
break;

case 3:
start = getTimer();
res = ta.flatten4();
break;
}

var dur = getTimer() - start;

results[ n ].push( dur );

if( res.length != reference ) {
_root.tf.text += \ncheck  + labels[ n ] + 
, gave result length
different from reference result.;
}

_root.tf.text = res.length + ,  + labels[ n ] + : 
 + dur;
}
if( cntr  70 ) {
delete this.onEnterFrame;

var totals = [];

_root.tf.text = The fastest results 
were...\n\n;

for( var i in results ) {
var result = results[ i ];
var min = Number.MAX_VALUE;
for( var k in result ) {
min = Math.min( min, result[ k 
] );
}

_root.tf.text += \nfor  + labels[ i ] + 
:\t + min;
}
}

};
}

public static function randomArray(p) : Array {
   var a = new TestArray;
   for (var i = 0; i  p; i++) {
   if (Math.random() * 2  Math.random() * 5) {
   a.push(i);
   } else {
   a.push(TestArray.randomArray(Math.ceil( 
Math.random() * 3 ) ));
   }
   }

   _root.tf.text += length:  + a.length;

   return a;
}


public function flatten (r) : Array {
   if (!r) r = [];
   var n = this.length;
   for (var a = 0; a  n; a++) {
   if ( !(this[a] instanceof Array) ) {
   

[Flashcoders] setInterval

2006-07-26 Thread keitai guy

hi list -

i have some weirdness with setInterval, wondering if someone could
suggest solutions?

code:

var intId:Number;
img = new ImageLoader( imgUrl, tgtMc );
intId = setInterval(img, checkLoading, 100 );   // doesnt 
work
intId = setInterval( checkLoadingFunc, 100, img);   // doesnt 
work
trace(setInt= + intId);


however, all i get in all cases is undefined for the intId .

the object is getting created fine...

i also tried setting it within the class itself, still with same problem.
the function is defined before this code in question, in case its a
compiler/precedence issue. but no effect.

have used intervals often before, so maybe there is some weird thing i
never ran afoul of before...

FL8/AS2

thanks!

/dc
___
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 AICC tracking

2006-07-26 Thread Matthew Simpson
Google it and there should be plenty if not, here's the entire method:

//Submit Purchase Order
public function submitPO(){
//construct new XML object 
var poXML:XML = new XML()
var element1:XMLNode = poXML.createElement(SUBMITPO);
element1.attributes.poTotal= acmm.poTotal;
poXML.appendChild(element1);
for (var i = 0; ipo_dg.length; i++) {
var element2:XMLNode =
poXML.createElement(item);
element2.attributes.unitTotal   =
po_dg.getItemAt(i).UnitTotal;
element2.attributes.quantity=
po_dg.getItemAt(i).Quantity;
element2.attributes.unitPrice   =
po_dg.getItemAt(i).UnitPrice;
element2.attributes.manufacturer=
po_dg.getItemAt(i).Manufacturer;
element2.attributes.itemNumber  =
po_dg.getItemAt(i).ItemNumber;
element1.appendChild(element2);
}
trace();
trace(PO XML = +poXML);

//construct a new XML object to hold the server's reply
var poReplyXML = new XML();

//when server reply is loaded, process data
poReplyXML.onLoad = function(success:Boolean){

if (success) {
//Unload Progress Window
acmm.unloadDataCallProgress ();
trace();
trace(PO Reply XML = +poReplyXML);
var e = this.firstChild;
if (e.attributes.status == success) {
//Display Success Alert 
acmm.transactionMessage =
e.attributes.message;
acmm.transactionAlert();
//Unload PO 
_parent.deletePopUp();
//Set Display
//acmm.home();
//Remove Active PO Button
//acmm.activeOrder_btn.visible =
false;
//Remove All Items from PO Array
acmm.poArray = new Array();
//Set BreadCrumbs
//acmm.homeCrumb();
} else {
//Unload Progress Window

acmm.unloadDataCallProgress ();
//Display Failure Alert
acmm.transactionMessage
= e.attributes.message;
acmm.transactionAlert();
}
}
}   
poXML.sendAndLoad(acmm.servletURL+POManager,
poReplyXML);
}

If you need more e-mail me off list.

Matthew
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David
Brunswick
Sent: Wednesday, July 26, 2006 3:57 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Flash AICC tracking

That sounds like a good solution where can I find xml object flash
samples?

David Brunswick
Multimedia Developer/OLP Administrator
FedEx Customer Information Services
Customer Service Organizational Learning
901-434-6605
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Matthew
Simpson
Sent: Wednesday, July 26, 2006 2:50 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Flash AICC tracking

I have not read the prior posts so I'm not sure if this is what you are
looking for, but I pass XML/Vars to JSP servlets all day using:

poXML.sendAndLoad(acmm.servletURL+POManager, poReplyXML);

poXML is the doc I send
Acmm.servletURL is a dynamic var containing the JSP URL POManager is
the servlet name.
poReplyXML is the servlets reply in an XML object.

HTH

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David
Brunswick
Sent: Wednesday, July 26, 2006 3:35 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Flash AICC tracking

Is there another way to call/pass info to servlet besides getURL?

David Brunswick
Multimedia Developer/OLP Administrator
FedEx Customer Information Services
Customer Service Organizational Learning
901-434-6605
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Aaron
Silvers
Sent: Wednesday, July 26, 2006 2:14 PM
To: Flashcoders mailing 

RE: [Flashcoders] setInterval

2006-07-26 Thread jim
I don't think you should be using quotes around the function name.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of keitai guy
Sent: 26 July 2006 21:10
To: Flashcoders mailing list
Subject: [Flashcoders] setInterval

hi list -

i have some weirdness with setInterval, wondering if someone could
suggest solutions?

code:

var intId:Number;
img = new ImageLoader( imgUrl, tgtMc );
intId = setInterval(img, checkLoading, 100 ); // doesnt
work
intId = setInterval( checkLoadingFunc, 100, img); //
doesnt work
trace(setInt= + intId);


however, all i get in all cases is undefined for the intId .

the object is getting created fine...

i also tried setting it within the class itself, still with same problem.
the function is defined before this code in question, in case its a
compiler/precedence issue. but no effect.

have used intervals often before, so maybe there is some weird thing i
never ran afoul of before...

FL8/AS2

thanks!

/dc
___
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 plugin preinstalled starting with what browser versions?

2006-07-26 Thread Paul BH

this should help:
http://www.adobe.com/products/player_census/flashplayer/version_penetration.html

On 7/26/06, Doug Brashear [EMAIL PROTECTED] wrote:


Hello all,

I'm trying to make a business case for one of my clients, and in order to
do
so need to know when (the specific IE, Opera and Firefox version numbers)
the Flash plug came pre-installed with the browser.

Our Flash need is pretty basic (images and text that fade in and out, no
interactivity), and I'd also appreciate any recommendations you have in
terms of which version of the Flash player to design for (in terms of
features supported) in order to achieve maximum compatibility, but with
the
ability to take advantage of the most essential features.

Thanks a ton in advance,

- Doug

_
Doug Brashear
Information Architect
NavigationArts
703.873.4119 (office)
703.725.8031 (mobile)
[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] Flash Player 8 Corporate Penetration

2006-07-26 Thread John Dowdell

Charlie Skinner wrote:

Does anyone know any sources for statistics on Flash Player 8
Penetration within Corporate networks?


I think it varies by the organization, with each choosing one of three 
different styles:
(a)  In some intranets the IT decisionmakers already install Adobe Flash 
Player 8, so all of the audience has it;
(b)  in some intranets the IT decisionmakers do not already install 
Flash Player 8, so none of the audience has it;
(c)  in some intranets users have installation privileges, and so 
installation rates will tend to follow overall consumer norms.


With the decentralized decision-making on general consumer machines we 
know that FP8 was adopted at a ridiculously rapid rate, but intranets 
are often an all-or-nothing thing, so the adoption will be a lot lumpier 
than for consumers, because entire groups make the same decision at once.


If you happen to know which corporate intranet you're targeting, then 
it's possible to get direct information on how much of that particular 
audience has upgraded to Player 8 or Player 9 yet.


I suspect this isn't as definite an answer as you'd like, but does it 
show the ingredients that go into making it a difficult issue to 
generally assess...?





I've seen this question asked before in a number of places and it always
goes un-answered.


I try, honest I do, but ;-)

jd




--
John Dowdell . Adobe Developer Support . San Francisco CA USA
Weblog: http://weblogs.macromedia.com/jd
Aggregator: http://weblogs.macromedia.com/mxna
Technotes: http://www.macromedia.com/support/
Spam killed my private email -- public record is best, thanks.
___
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 plugin preinstalled starting with what browser versions?

2006-07-26 Thread John Dowdell

Doug Brashear wrote:

I'm trying to make a business case for one of my clients, and in order to do
so need to know when (the specific IE, Opera and Firefox version numbers)
the Flash plug came pre-installed with the browser. 


This page doesn't have browser versions, but it does have the years in 
which each browser and operating system included Macromedia Flash Player 
in their default distributions:

http://www.adobe.com/products/flashplayer/partners/

But this wouldn't tell you how much of your audience did that quick 
little update to the current Adobe Flash Player -- it would just tell 
you what they started with when they got their browser, not what they 
actually have. For that I'd defer to the NPD consumer audits that Paul 
mentioned:

http://www.adobe.com/products/player_census/flashplayer/version_penetration.html

Not every page's audience will match such overall consumer norms, but 
knowing how such wide samples have behaved is the closest thing we've 
got to predictions for specific audiences today.





Our Flash need is pretty basic (images and text that fade in and out, no
interactivity), and I'd also appreciate any recommendations you have in
terms of which version of the Flash player to design for (in terms of
features supported) in order to achieve maximum compatibility, but with the
ability to take advantage of the most essential features.


Well, alpha blending was added in Macromedia Flash Player 3, I think it 
was, but very few people have that installed today... most have moved up 
to Flash Player 8, and almost everyone has Flash Player 7 or better by now.


A lot might depend on the project's particular audience, too... if much 
of your audience uses MySpace, for instance, then they'll all have Adobe 
Flash Player 9 pretty soon... or if it's a school or intranet without 
installation privileges then you'll need to contact the IT staff to see 
what they permit... the specific audience you're targeting is a big 
influence on what clientside capability to require.


jd




--
John Dowdell . Adobe Developer Support . San Francisco CA USA
Weblog: http://weblogs.macromedia.com/jd
Aggregator: http://weblogs.macromedia.com/mxna
Technotes: http://www.macromedia.com/support/
Spam killed my private email -- public record is best, thanks.
___
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] setInterval

2006-07-26 Thread Michael Bedar
The first form is fine, but you are trying to address a function  
called checkLoading inside an instance of ImageLoader, which does not  
exist..


if checkLoading is on the root level, then you would say:

intId = setInterval(_root, checkLoading, 100 ); 

The second form is incorrect, no quotes there..

Why not just use the built in onProgress event in ImageLoader?

mike




On Jul 26, 2006, at 4:10 PM, keitai guy wrote:


hi list -

i have some weirdness with setInterval, wondering if someone could
suggest solutions?

code:

var intId:Number;
img = new ImageLoader( imgUrl, tgtMc );
intId = setInterval(img, checkLoading, 100 );   // doesnt 
work
intId = setInterval( checkLoadingFunc, 100, img);   // doesnt 
work
trace(setInt= + intId);


however, all i get in all cases is undefined for the intId .

the object is getting created fine...

i also tried setting it within the class itself, still with same  
problem.

the function is defined before this code in question, in case its a
compiler/precedence issue. but no effect.

have used intervals often before, so maybe there is some weird thing i
never ran afoul of before...

FL8/AS2

thanks!

/dc
___
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 plugin preinstalled starting with what browser versions?

2006-07-26 Thread Mark Winterhalder

On 7/26/06, Doug Brashear [EMAIL PROTECTED] wrote:

Our Flash need is pretty basic (images and text that fade in and out, no
interactivity), and I'd also appreciate any recommendations you have in
terms of which version of the Flash player to design for (in terms of
features supported) in order to achieve maximum compatibility, but with the
ability to take advantage of the most essential features.


The one feature that comes to mind is compression. I'm not sure, but I
think it was added in FlashPlayer 6. Depending on your content, the
ability to use compressed SWFs might help with download speed.

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


Re: [Flashcoders] Array Empowerment

2006-07-26 Thread Chris Hill
Hmmm...it looks as though there are some name conflicts or something 
between MM v2 Array mixins and your functions. I've got a DataGrid, and 
as soon as I add the ArrayEmpowerment class, the data grid stops 
working. I'm assuming that DataProvider's adding some methods with the 
same names as your class.


I'm going to debug this right now...perhaps X-ray will prove useful here? :D

Chris
___
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] Decoding xml text w/no CDATA allowed

2006-07-26 Thread Merrill, Jason
I think you just need to set the Dynamic text field to render HTML in
the properties panel - its the button that looks like . I have xml
that has quot;Specialquot; and it works fine 

Actually, this original thread (almost two months old now) was about
character entities in XML related to the xfactorstudio's Xpath classes -
rather different subject than character entities in HTML from XML text.
The solution I reached with the help of this list was to use a trick
with the XML class:

function decodeEntities(entityString:String):String {
var x:XML = new XML(n+entityString+/n); 
x.parseXML();
return x.firstChild.firstChild.nodeValue;
};

Jason Merrill
Bank of America 
Learning  Organization Effectiveness - Technology Solutions 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Carl Welch
Sent: Wednesday, July 26, 2006 4:17 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Decoding xml text w/no CDATA allowed

I think you just need to set the Dynamic text field to render HTML in
the properties panel - its the button that looks like . I have xml
that has quot;Specialquot; and it works fine.

On 7/26/06, Toon Van de Putte [EMAIL PROTECTED] wrote:
 That does appear to be the case,  i tried the following:

 textfield.htmlText = currentPand.firstChild;

 which shows 'bthis is bold/b' instead of bold text

 On the other hand, this:

 textfield.htmlText = currentPand.firstChild.nodeValue;

 Shows the text in bold, as would be expected. So i suppose using
nodeValue
 automatically decodes the entities.


 On 6/7/06, Merrill, Jason [EMAIL PROTECTED] wrote:
 
  Thanks Ryan, that's what I was looking for.  So this must be a
failing
  of XFactorstudio's Xpath classes - and Flash's xml.parseXML() or
  nodeValue does the decoding automatically?  Or does anyone know a
way to
  get Xfactorstudios Xpath classes to decode entities?
 
  Jason Merrill
  Bank of America
  Learning Technology Solutions
 
 
 
 
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
[mailto:flashcoders-
  [EMAIL PROTECTED] On Behalf Of Ryan Matsikas
  Sent: Wednesday, June 07, 2006 11:30 AM
  To: Flashcoders mailing list
  Subject: Re: [Flashcoders] Decoding xml text w/no CDATA allowed
  
  Why not let flash do the work for you?
  
  function convertEntities(p_str:String):String {
  var x:XML = new XML(p_str);
  x.parseXML();
  return x.firstChild.firstChild.nodeValue;
  }
  
  var xmlStr:String = 'itemThis is the quot;String I want in
  quotesquot;
  please help./item';
  trace(convertEntities(xmlStr)); // This is the String I want in
  quotes
  please help.
  
  
  On 6/7/06, Merrill, Jason  [EMAIL PROTECTED]
wrote:
  
   Jim - I tried out your static class and it works great for my
  problem -
   thanks!
  
   Jason Merrill
   Bank of America
   Learning Technology Solutions
  
  
  
  
  
  
  
   -Original Message-
   From: [EMAIL PROTECTED]
  [mailto: flashcoders-
   [EMAIL PROTECTED] On Behalf Of Jim Cheng
   Sent: Tuesday, June 06, 2006 6:39 PM
   To: Flashcoders mailing list
   Subject: Re: [Flashcoders] Decoding xml text w/no CDATA
allowed
   
   Merrill, Jason wrote:
   
Is there an Actionscript 2.0 or Xpath equivalent to
Javascript
  and
Actionscript 3.0's
   
decode(theStringWithquot;Specialquot;Characters);
   
   Hey Jason,
   
   I've run into the same issue about a month ago with XML
documents
  that
   a
   client had generated from their database, character entities
  included.
   
   I couldn't find a built-in solution for converting the
character
   entities back into Unicode characters, so I went online,
found the
   specs, wrote a little scraper utility to grab the mappings
for me
  and
   then wrote a small utility class to use the data for
encoding and
   decoding. It's a simple static class with inline
JavaDoc-style
   documentation.  Hope this works for you.
   
   You can grab it here:
   
http://dev.psalterego.com/CharacterEntity.as
   
   
   Regards,
   Jim
   ___
   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:
  

Re: [Flashcoders] setInterval

2006-07-26 Thread keitai guy

hi -

thanks for the help ...


if checkLoading is on the root level, then you would say:
intId = setInterval(_root, checkLoading, 100 );


great, this works. now i'd like to try and get it working inside an object...


The second form is incorrect, no quotes there..

intId = setInterval( this, checkLoading, 100 ); // doesnt work

so - this is wrong?


Why not just use the built in onProgress event in ImageLoader?

good point, but i wanted to write my own stuff first to know whats going on...

/dc
___
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 Chris Hill
DataProvider is not secretly decorating things, BUT something somewhere 
in the V2 stuff is iterating over the array object itself, and is 
silently blowing up when it finds these extra functions. I've had a 
similar problem when some third party code was adding a function to 
object.prototype, and the WebService object took a dump (it iterates 
over a hash object and sees something weird and throws an error).


Anyway, the solution is to call ASSetPropFlags on the function so that 
it is hidden. I heavily modified your class to make it more AS2 
friendly, hope you don't mind! To use this class either call (once) :


ArrayEmpowerment.init();

or if you just want to decorate just one object:

ArrayEmpowerment.mixin(myobject);

I also check to see if the function exists before decorating and warn. 
This way we'll know if there is a decorator conflict.


class ArrayEmpowerment extends Object{
  
   private static var initialized:Boolean = false;

   private static var mixins:ArrayEmpowerment = new ArrayEmpowerment();
   private static var mixInProps:Array = 
[any,clear,collect,compact,count,deleteAll,deleteAt,deleteIf,duplicate,each,eachIndex
   
,eql,every,fill,filter,flatten,has,index,indexes,last,map,nitems,replicate,reverseEach

   ,lastIndexOf,uniq,sum,mean,min,max];
  
  
   // inherent properties of array

   var length : Number;
   var splice : Function;
   var slice : Function;
   var sortOn : Function;
   var reverse : Function;
   var sort : Function;
  
   /**
* Empowered Array - Decorates the Array class with all the 
functions of this class.

*/
   public static function init(){
   if(initialized){ return; };
   initialized = true;
  
   // take all methods/props from our template object

   // and put them on the prototype.
   mixin(Array.prototype);
   }
  
   /**

* Instead of calling init, you may call mixin on an object, and it will
* decorate the object only, instead of Array.prototype.
*/
   public static function mixin(obj:Object){
   var m = mixInProps;
   var l = m.length;

   for (var i=0; il; i++) {
   if(obj[m[i]]){
   trace(WARNING Function:+m[i]+ already exists! 
Aborting mixin.);

   }else{
   obj[m[i]] = mixins[m[i]];
   _global.ASSetPropFlags(obj, m[i],1);
   }
   }
   }

   // Runs a function on every item in the array
   // Returns true if the function returns true for any one item
   function any(block) {
   var a = this.length;
   while (--a -(-1)) {
   if (block(this[a])) return true;
   }
   return false;
   };
   // Removes all elements from Array
   function clear() {
   this.length = 0;
   };
   // Invoking block once for every element, passing each element as a
   // parameter to block
   // The result of block is used as the given element in the array
   function collect(block) {
   var n = this.length;
   for (var a = 0; a  n; a++) {
   this[a] = block(this[a]);
   }
   };
   // Removes all null and undefined elements from Array
   function compact() {
   var i = -1;
   var n = this.length;
   var r = [];
   for (var a = 0; a  n; a++) {
   if (this[a] != null  this[a] != undefined) {
   r.push(this[a]);
   }
   }
   };
   // Returns the number of obj found in the Array.
   function count(obj) {
   var c = 0;
   var a = this.length;
   if (obj instanceof Array) {
   while (--a -(-1)) {
   if (this[a].eql(obj)) c++;
   }
   } else {
   while (--a -(-1)) {
   if (this[a] == obj) c++;
   }
   }
   return c;
   };
   // Deletes items from the Array that are equal to obj
   function deleteAll(obj) {
   var n = this.length;
   var r = [];
   if (!(obj instanceof Array)) {
   for (var a = 0; a  n; a++) {
   if (this[a] == obj) r.push(this[a]);
   }
   } else {
   for (var a = 0; a  n; a++) {
   if (!this[a].eql(obj)) r.push(this[a]);
   }   
   }

   this.replicate(r);
   };
   // Deletes the element at the specified index, returning that element,
   // or undefined if the index is out of range
   function deleteAt(i) {
   if (i  this.length  i  -1) return this.splice(i, 1)[0];
   return undefined;
   };
   // Deletes every element of Array for which block evaluates to true
   function deleteIf(block) {
   var r = [];
   var n = this.length;
   for (var a = 0; a  n; a++) {
   if (!block(this[a])) {
   r.push(this[a]);
   }
   }
   this.replicate(r);
   };
   // Returns a copy of the array
   function duplicate() {
   var r = [];
   var a = this.length;
   while (--a -(-1)) {
   r[a] = this[a];
   }
   return r;
   };
   // Calls block once for each 

RE: [Flashcoders] Array Empowerment

2006-07-26 Thread Steven Sacks | BLITZ
Chris,

You rock!  How about calling it PowerArray or XArray instead.  :)

-Steven

BLITZ | Steven Sacks - 310-551-0200 x209

___
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 Steven Sacks | BLITZ
Ok, I'll go through and make those changes to every loop with this[a] is
referenced more than once.


BLITZ | Steven Sacks - 310-551-0200 x209

___
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] Flash Expert needed ASAP in Dallas Area

2006-07-26 Thread Ludovick William Michaud

Good afternoon folks

First time user, so I hope I'm not breaking any rules by doing this. If 
so I apologize.
So Janimation is in urgent need of a Flash coder/developper for the next 
3-4 business days.


Janimation is located in the Dallas area in Texas.

This is what we are currently looking for.
Please send to [EMAIL PROTECTED] asap your resume and a way to reach 
you by phone or email, we will most likely be in touch with you tonight.


Here's the quick, dirty description of the two bits of work that needs done.

  1. A navigation page needs to be created.
1. Code already exists in another section of the website.
2. Code needs to be adapted as appropriate for the navigation page.
3. Contractor needs to be familiar with Flash classes.
  2. An animation preview page needs to be created.
1. Code needs to be modular so we can bring it back into the 
main part of the project.
2. Flash code needs to read variables from a .php form, and 
load appropriate .swf files based on user input.
3. Code needs to synchronize up to 9 .swf animations and 2 
audio tracks.


We'd want the Flash contractor in the office starting tomorrow morning 
if possible and working through at least Monday, possibly Tuesday.


thanks in advance for any help.

Ludo.

--
/*LUDOVICK WILLIAM MICHAUD*
*SR TECHNICAL DIRECTOR*/
http://www.janimation.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 Chris Hill

Done! :D

http://ubergeek.tv/XArray/XArray.as

I'll put it up there from now on instead of spamming people's inboxes more.

-C

Steven Sacks | BLITZ wrote:


Chris,

You rock!  How about calling it PowerArray or XArray instead.  :)

-Steven

BLITZ | Steven Sacks - 310-551-0200 x209

___
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 Steven Sacks | BLITZ
It's not done yet. I've identified some bugs in certain functions and
I'm also optimizing it still with everyone's help.  Don't want to jump
the gun too quick until it's absolutely ready.  :)

I think once it's ready, though, SVN would be a great place to keep this
open source project.

BLITZ | Steven Sacks - 310-551-0200 x209


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of Chris Hill
 Sent: Wednesday, July 26, 2006 2:56 PM
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] Array Empowerment
 
 Done! :D
 
 http://ubergeek.tv/XArray/XArray.as
 
 I'll put it up there from now on instead of spamming people's inboxes
 more.
 
 -C
 
 Steven Sacks | BLITZ wrote:
 
 Chris,
 
 You rock!  How about calling it PowerArray or XArray instead.  :)
 
 -Steven
 
 BLITZ | Steven Sacks - 310-551-0200 x209
 
 ___
 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] Array Empowerment

2006-07-26 Thread Steven Sacks | BLITZ
http://paste.plone.org/7080

I've fixed some bugs, implemented flatten4, and also changed the methods
to just function() calls for easier implementation into the great mixin
class that Chris wrote.  I also assigned this[a] to a variable 'e' where
this[a] is used more than once in a loop.  Removing the use of push() is
next on the list but before I go through and do all that, perhaps some
of these methods could be optimized more like we did with flatten.

Here are the methods that use push, btw:

compact
deleteAll
deleteIf
filter
indexes
map
uniq

___
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] Attention Recursion Speed Experts

2006-07-26 Thread Steven Sacks | BLITZ
Sweet.  

The only other method that uses recursion is eql. 

-Steven
___
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 Steven Sacks | BLITZ
http://paste.plone.org/7081

Meh, silly bug with indices now that it's just functions.  Removed for
now.

-s
___
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] as3 uml packages

2006-07-26 Thread quinrou .

Hi all,

Has anyone got a UML flow diagram of all the AS3 packages/classes?

thanks

seb
___
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] Loaded External JPEGs into LivePreview Clip

2006-07-26 Thread Rifled Cloaca

All,

I'm developing an imageloader component, and I want to be able to load
external images into the livepreview.  The problem is, it doesn't seem to be
able to find the images.  It's as if the location of the livepreview is not
relative to the FLA file.  Any clues on how to set this?

Thanks!
-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


Re: [Flashcoders] setInterval

2006-07-26 Thread Michael Bedar
setInterval either takes a function, or an object with the name of a  
function that object contains as a string, hence the 2 ways of using it





On Jul 26, 2006, at 5:16 PM, keitai guy wrote:


hi -

thanks for the help ...


if checkLoading is on the root level, then you would say:
intId = setInterval(_root, checkLoading, 100 );


great, this works. now i'd like to try and get it working inside an  
object...



The second form is incorrect, no quotes there..

intId = setInterval( this, checkLoading, 100 ); // doesnt work

so - this is wrong?


Why not just use the built in onProgress event in ImageLoader?
good point, but i wanted to write my own stuff first to know whats  
going on...


/dc
___
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 ryanm

every and some come from php.

   Php is probably a bad place to take naming conventions from. It is a 
prime example of the mess that open source can cometimes bring, considering 
they have split and join *and* explode and implode, not to mention about 2 
dozen different functions that do the same things to strings. There is no 
agreed-upon naming convention or standard in php, and the resulting mess has 
a cobbled-together and almost impossible to predict naming convention (if 
you could call it that), so I would recommend looking to a stricter and more 
well established language for a naming convention, like Java or even C++.


ryanm 


___
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 ryanm

Remove and delete are essentially synonymous.

Backspace and Delete, Enter and Return...which is right?  :)

   Well, if you want to get into the semantics, return and enter are 
different, and backspace and delete are different. Enter just means 
execute, while return actually means carriage return + line feed. 
Backspace means move the cursor back a space, deleting any character that 
may be in that position, while delete means delete the character in the 
current cursor position.


   Remove and delete aren't synonymous, and I think remove is much better 
suited to what is happening in the function. Without looking at the function 
or reading any documentation, I would assume that a delete method destroyed 
the object, not just removed it from the array. An Array.delete function 
should really delete the array.


ryanm 


___
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 Steven Sacks | BLITZ
 Remove and delete aren't synonymous, and I think remove is much better
 suited to what is happening in the function. Without looking at the
 function
 or reading any documentation, I would assume that a delete method
 destroyed
 the object, not just removed it from the array. An Array.delete
function
 should really delete the array.

Fair enough.  I'll concede the point and rename the method to remove.
:)


___
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 Mark Winterhalder

On 7/27/06, Steven Sacks | BLITZ [EMAIL PROTECTED] wrote:

http://paste.plone.org/7081


I just had a look at eql (equality) because of the recursion there and
actually I'm not sure it should be there at all. By that logic you
would have to compare the properties of objects, too, which would
raise questions about recursion depth. Maybe have a deepEquality
method that takes the depth as an argument?

Also, why not use strict inequality to compare the values?

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


Re: [Flashcoders] Array Empowerment

2006-07-26 Thread Mark Winterhalder

On 7/27/06, Steven Sacks | BLITZ [EMAIL PROTECTED] wrote:

Here are the methods that use push, btw:

compact
deleteAll
deleteIf
filter
indexes
map
uniq


Below.

Is there something like a test yet so I can make sure I didn't
accidentally introduced some errors?

Mark







function compact() {
var i = -1;
var n = this.length;
var r = [];
var index = 0;
for (var a = 0; a  n; a++) {
var e = this[a];
if (e !== null  e !== undefined) {
r[ index++ ] = e;
}
}
};

function deleteAll(obj) {
var n = this.length;
var r = [];
var index = 0;
if (!(obj instanceof Array)) {
for (var a = 0; a  n; a++) {
var e = this[a];
if (e == obj) r[ index++ ] = e;
}
} else {
for (var a = 0; a  n; a++) {
var e = this[a];
if (!e.eql(obj)) r[ index++ ] = e;
}   
}
this.replicate(r);
};

function deleteIf(block) {
var r = [];
var n = this.length;
var index = 0;
for (var a = 0; a  n; a++) {
var e = this[a];
if (!block(e)) {
r[ index++ ] = e;
}
}
this.replicate(r);
};


function filter(block) {
var r = [];
var n = this.length;
var index = 0;
for (var a = 0; a  n; a++) {
var e = this[a];
if (block(e)) r[ index++ ] = e;
}
return r;
};

function indexes() {
var r = [];
var l = arguments.length;
var n = this.length;
var index = 0;
for (var a = 0; a  l; a++) {
var e = arguments[a];
if (e  -1  e  n) {
r[ index++ ] = this[e];
} else {
r[ index++ ] = undefined;
}
}
return r;
};

function map(block) {
var r = [];
var n = this.length;
var index = 0;
for (var a = 0; a  n; a++) {
r[ index++ ] = block(this[a]);
}
return r;
};

function uniq() {
var r = [];
var l = this.length;
var index = 0;
for (var a = 0; a  l; a++) {
var e = this[a];
if (!r.has(e)) r[ index++ ] = e;
}
return r;
};


___
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


  1   2   >