[Flashcoders] ExternalInterface ...

2009-03-28 Thread SJF
I have an ExternalInterface call in my application that looks like this:


ExternalInterface.call(BrowserScriptsJS.GET_BROWSER_INFO);


The variable GET_BROWSER_INFO looks like this:


*public* *static* *var* GET_BROWSER_INFO:XML =
;
--

So how do I get a response from the Javascript?

Do you have to create a proxy function in an example like this, the proxy
function being where you make the ExternalInterface.call and then another
function using ExternalInterface.addcallback for the return?

Also, and the above may answer this question, when you use ExternalInterface
to communicate with Javascript, must you always use call *and* addcallback,
i.e.: the request, then the response?

Thanks.


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


[Flashcoders] Re: include directive ...

2009-03-07 Thread SJF
Thanks All,

I have to externalize the AS in this application because it's driving me
insane not being able to search the code.

There is approx. 25-30+ objects with no real encapsulation or consistency in
place regarding the code.

I can't put the whole thing into classes, as the risk is too high,
considering I've been handed this beast a couple of weeks before it becomes
the corner stone of a substantial project launch, and don't have the time to
be certain everything will work using classes/packages/oop (as it should
have been created).

Thanks again - here goes!
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] include directive ...

2009-03-04 Thread SJF
Looking for clarity on the include directive in a CS3 FLA file.

Technically, does anyone know if pound-for-pound, having code on a
movieclip's timeline is EXACTLY the same as having it's code in an external
.as file and using the include directive?

Here are more details:

1) The code being externalised contains imports, variable declarations,
numerous functions and runtime code (approx. 150-250 lines of code)
2) The movieclip is dynamic and created on the fly by the application,
putting the movieclip within various other movieclips deep in the display
stack
3) Multiple other movieclips (approx. 30) also contain code with imports,
variable declarations, functions and runtime code

So the question I ask:

Is it technically possible to externalise all code in a CS3 FLA document by
exporting all code from all timelines and using the include directive?

Are there issues with instantiation of objects/classes or problems with
import paths, etc?

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


[Flashcoders] And another one re: try-catch-finally statements

2009-03-03 Thread SJF
I have a head-cold (hence the possibly obvious answer to this question) and
a block of code as such:

function checkResponder(e:Event = null):void
{
 try
 {
  bPollingDatabase = true;
  updateListArray();
 }
 catch (err:Error)
 {
  //
 }
}

Now considering there is no code in the 'catch' block, there can be
absolutely no benefit whatsoever to using try-catch-finally in the above
instance.

Is this correct?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] try-catch-finally ...

2009-03-03 Thread SJF
Technically, it's good practice/professional to use try-catch-finally blocks
in your actionscript logic. This ensures a robust, easily debugg-able
application.

However, can anyone comment if they actually use try-catch-finally or
whether anyone is for or against it's use.

I ask because I've received an application (which streams vidoe) that was
blowing out numerous users CPUs to 100%. Upon further investigation, it
appears that a netstream event is firing 20 times a second, and within the
listener (listener function that is) for the event, there is a
try-catch-finally block. I removed the try-catch-finally and CPU usage
halved on my machine.
Anyone care to comment for or against try-catch-finally and it's use.

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


[Flashcoders] Display Object Container refresh ...

2009-02-20 Thread SJF
You have a class with a public DOC (DisplayObjectContainer).

This DOC contains all the visual assets of your class.

In you refresh/reset/constructor method, do you use either:

container = null;

or a loop to manually remove all display objects within the container, eg:

if (container != null)
{
if (container.numChildren > 0)
{
for (var i = 0; i < container.numChildren; i++)
{
container.removeChildAt(i);
}
}
}

Um ... that's it.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Javascript Flash resizing ...

2009-02-19 Thread SJF
Try this -
http://code.google.com/p/resizetoolkit/downloads/detail?name=ResizeToolkit_v.95.zip&can=2&q
=

Haven't used it myself yet, but it looks like a robust technique/set of
classes.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: Dynamically resize Flash ...

2009-01-19 Thread SJF
I can't assist at this point, but thanks for sharing. I was looking for
something similar a year or so ago and had no luck.

I first saw this technique on a Polish insurance site that was site of the
week (or similar) on ultrashock a few years back.

Awesome, thanks again. Will come in very handy.

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


[Flashcoders] RE: Flex UI ...

2009-01-09 Thread SJF
Thanks for the advice. I'll update the display drivers and see how that
goes.

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


[Flashcoders] Flex UI ...

2009-01-08 Thread SJF
I'm using Flex 3 when working on pure actionscript projects.

I often have issues with numerous dialog boxes and parts of the interface
within Flex (see images below):
http://img339.imageshack.us/img339/512/60793305bx2.gif
http://img224.imageshack.us/img224/7996/64384807bn2.gif

Tabs and controls within these boxes don't appear correctly. This is not a
memory issue as my laptop is a high spec machine and Flex is the only thing
running.

Anyone advise or have the same issue?

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


[Flashcoders] Re: design pattern diagrams...

2009-01-07 Thread SJF
Furthermore, I suggest taking a look through the samples in the Adobe Flash
Developer Center (http://www.adobe.com/devnet/flash/?navID=samples).

The first link (New Flash ActionScript 3.0 samples -
http://www.adobe.com/devnet/flash/samples/) has some downloadable source
files that might assist you.

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


[Flashcoders] How do you access this mailing list ...

2009-01-07 Thread SJF
I find the flashcoders mailing list very helpful and often pick up new
ideas/techniques from what people post.

Just wondering how people access this mailing list.

It would be great if you could configure the SearchCoders Dashboard (which
is a nice little air app - see link http://www.searchcoders.com/) for this
FlashCoders list. I'll send them an email (searchcoders) and see if this is
possible.

Any thoughts on this.

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


[Flashcoders] Re: a historical question ...

2008-12-30 Thread SJF
I don't think it was Moock.

It was probably Joshua Davis - http://ps3.praystation.com/pound/v2/ or this
guy - http://levitated.net/.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] AS3: Dispatching events to further listeners ...

2008-12-28 Thread SJF
You may need to look at:

stopPropagation() and
stopImmediatePropagation()

Could also have to do with event bubbling, and what phase these events are
firing at.
Here is a link to get you started:
http://www.flashscript.biz/flashas3/eventbubble/event_bubbling_2.html

Also, I suggest tracing out the events and looking at all values, ie:

public function mouseHandler(me:MouseEvent = null):void
{
trace("mouseHandler(me:MouseEvent = ": + me);
}

(Note: the '= null' I've thrown into this function is a little trick that
allows you to fire the function without a mouse event - can come in very
handy).

Good Luck,
SF.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] RE: Flash AS3 debugging

2008-12-22 Thread SJF
This image might help you visualize what occurs internally with Flash Player
AV2M on each frame:
http://www.craftymind.com/wp-content/uploads/2008/04/marshalledsliceexport.png

And this is the article at length:
http://www.craftymind.com/2008/04/18/updated-elastic-racetrack-for-flash-9-and-avm2/

But basically, if you have, for example, a loop in your code that changes
the Y position of a bunch of clips and you step line-by-line through your
code with the debugger, it will iterate over the clips one by one without
anything changing on screen - even though their Y positions are being
changed. This is because all code for that one specific frame within your
flash movie must first execute before the screen will render any changes.
It's a 1-2 process; All code for a frame, then all rendering (drawing) for a
frame. This may be what you are talking about.

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


[Flashcoders] Flash Remoting with ...

2008-12-08 Thread SJF
Ahoy hoy,

In regards to developing *Flash sites/apps* that hook into a back end using
*AMFPHP* protocol, can anyone shed some light on the following questions:

1) Do the following three frameworks/platforms sit in the same boat (i.e: do
they do they provide the same functionality in regards to developing
database driven web apps): Zend ,
Joomlaand
Drupal 
2) Does anyone recommend any one of these for non-proprietary, database
driven Flash sites/apps (I'm currently using WampServer 2 and am curious if
any of the above 3 make development easier, or are they just wrappers around
something similar to WampServer).

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


[Flashcoders] Re: Registration Point of Clips (Scale 9)

2008-12-07 Thread SJF
Thanks Muzak and Joel - Top Left it is then. This was my thinking - thanks
for your clarification on this.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Registration Point of Clips (Scale 9)

2008-12-07 Thread SJF
Anyone have a preference for the registration point of clips created in
flash that are accessed dynamically?

Do you prefer Top-Left or Center alignment for your MovieClips that
are Scale-9 enabled and accessed programmatically.

Also, what about Text Fields within these Clips.

Anyone have an opinion on this.

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


[Flashcoders] Re: SWF to Database Examples - URL ...

2008-11-02 Thread SJF
Thanks Muzak - that is the one.

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


[Flashcoders] SWF to Database Examples - URL ...

2008-11-01 Thread SJF
Does anyone know the URL of a little flex/flash application that was doing
the rounds a while back - 6+ months or so.

It was basically a timing demonstration of hooking a SWF to a database using
numerous methods (eg: XML & Serialisation, AMF, standard web page (ASP/CFM)
MySql connection, etc) to pull 5000 rows client side. It demoed the time
taken and a couple of other details if I recall. I know it had a black
background (the page/app) if that helps jog anyones memory.

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


[Flashcoders] RE: Optimising file size - stripping down ...

2008-09-22 Thread SJF
Alright - I'm convinced there's nothing to be gained from stripping down
flash classes now.

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


[Flashcoders] RE: Optimising file size - stripping down

2008-09-19 Thread SJF
Yes he was building components at the time, so maybe I have my wires
crossed.

Anyway, ignore the thread so far, what I would like to know is whether it's
possible to strip out methods/capabilities from flash classes - for example,
and to name a few, I don't need any of the following methods in any of my
classes that extend Sprite:

getObjectsUnderPoint
propertyIsEnumerable
areInaccessibleObjectsUnderPoint

So does anyone know if it's worth stripping down classes to the bare minimum
- for optimization and player performance.

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


[Flashcoders] RE: Optimising file size - stripping down intrinsics ...

2008-09-17 Thread SJF
Paul - I once worked with a guy who was building components for a large
teen-focused community site (Coca-Cola if I recall - it was a few years back
now), anyway, he gave the impression that he always stripped out Flash
intrinsic classes before creating a release build. To be honest, I don't
know why he went through this process (it was around Flash MX time) other
than I remember him saying that Macromedia had too much bloat in their
intrinsics.

Anyway, just thought I'd ask if this practice is still done.

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


[Flashcoders] Optimising file size - stripping down intrinsics ...

2008-09-17 Thread SJF
Hello,

Anyone have a starting point or advice in terms of stripping down flash
native/intrinsic AS3 classes - with a goal of file optimization?

For example, in an application I'm building, I need less than half the
attributes and capabilities of the Sprite class - so any pointers for how to
strip these down, without destroying the original classes?

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