I would think the built-in ByteArray.compress would be much faster than 5-10
seconds for a simple 100k string. But if it doesn't work, a really simple
method of encrypting a string is doing a bit-flip on each character ...
// your original string (try this out with large files)
var str:String =
,
location.href);
I always forget that damn import and it kills me wasting time debugging it
;)
On 11/17/06, Tyler Wright [EMAIL PROTECTED] wrote:
Dave,
If you were just using Flash8 ... it's beautiful.
var thisDomain:String = flash.external.ExternalInterface(eval,
location.href
Dave,
If you were just using Flash8 ... it's beautiful.
var thisDomain:String = flash.external.ExternalInterface(eval,
location.href);
one line, so sweet.
Tyler
On 11/15/06, Dave Segal [EMAIL PROTECTED] wrote:
Is there a way to find the domain of the page that loads my swf. For
example,
He's right, and declaring the variable i inside of the loop rather than
before actually (weirdly) runs faster. I don't know what pcode it produces,
but I know CPU doesn't care about pcode. I think the only way to test speed
is timing the thing. It's all very interesting, but I doubt even 10 ms of
for (var i:String in myArray)
{
if (myArray[i] == value)
return Number(i);
}
using a for..i..in loop will always be faster. Even more then --a -(-1)
iteration. Unless you can guarentee that your element will always be near
the beginning of a large array, as the for..i..in starts from
:)
So, for the sake of another one of those big arguments over what's better
where no one ever test, I wrote some code to find out exact results:
The following code executes one particular test on my Windows XP machine.
For results I got an averate of 347 miliseconds executeing the --i -(-1)
If you're already using a custom Delegate, why not modify the thing to
handle what you've just provided?
var clickHandler:Function = MyClass.staticMethod;
var args:Array = ['Can', 'pass', 'in', 'any', 'amount'];
newBtn.addEventListener(click, Delegate.create2(this, clickHandler, args
));
// (I'm
It would be great to have the specs for AS3 just to modify current swfs in
other ways (not necessarily compile from scratch). Obfuscation comes to mind
...
Someone will do really well with an AS3 compiler ... so, who wants to start
an AS3 compiler in AS3?! I'd be interested.
Tyler
On 8/6/06,
There is an attempt underway to document the SWF 9 bytes for a disassembler.
I'm sure this could be the start of a compiler as well. And unfortunately I
don't think Adobe will release the specs any time soon.
http://osflash.org/swf9dis
Tyler
On 8/2/06, John Giotta [EMAIL PROTECTED] wrote:
It
ActionScript 3.0 overview
http://www.adobe.com/devnet/actionscript/articles/actionscript3_overview.html
Programming ActionScript 3.0
http://livedocs.macromedia.com/flex/2/docs/wwhelp/wwhimpl/js/html/wwhelp.htm?href=Part5_ProgAS.html
ActionScript 3.0 Language Reference
There's a really light class called Prototype which is free to download at
http://codext.com/code/9. It does the same thing except with full
constructor support. It also has a really simple/clean API:
mc = createEmptyMovieClip(mc, 1);
Prototype.makeInstanceof(mc, MyMovieClipClass);
thats it!
Note: For those from Adobe that read this list ... With IE7's release and
it's support for tabbed browsing, if Flash Player provides no support for
opening links in tabs it will be increasing apparent that Flash Player is
essentially unaware of tabbed browers.)
I believe JavaScript is also
Could somebody share with me 1 example where AJAX/XMLHttpRequest
succeeds where Flash fails ?
The term AJAX is thrown around loosly these days to sometimes mean
anything JavaScript.
I've seen both Flash using JavaScript and JavaScript using Flash (FJAX) for
server communication. I can't say
Could somebody share with me 1 example where AJAX/XMLHttpRequest
succeeds where Flash fails ?
The term AJAX is thrown around loosly these days to simply mean anything
JavaScript. For those interested in learning more about Flash and JavaScript
drawing on one anothers strengths look for the
it would seem manuals are written by people. People can be wrong, and are in
this case.
TextFields, MovieClips and Buttons are all AS classes that can be extended.
Each class ships with set of methods and properties that are present in the
subclass. However, most of those props/methods will only
I never really understood how making an anonymous object and it's properties
into a dynamic class suddenly made it object oriented. Singleton especially
seems to be a vice for that type of thing.
The reason you would abstract the FlashVars is to 1) avoid naming conflicts
and 2) to make changes
and they'll be
available right from the beginning. I know there are some who will want to
argue that this is a dependency but that could be similar to arguing that
the MovieClip is a dependency -- it's a documented and supported feature)
Tyler
On 6/7/06, Tyler Wright [EMAIL PROTECTED] wrote:
I never
You're right, unless the font is embedded Flash will render it as a system
font which means it will hopefully look as good as other aliased fonts in
the browser, but not better.
My suggestion is to take a look at Rob Taylor's Fontastic, it's pretty
ingenious. You might have to subscribe to his
The only way is to compile the classes into a seperate SWF's and at runtime
when you make the check load in the appropriate SWF. Not a very simple
solution.
I've found that a good solution, if you can afford to combine the classes
into one, is making a runtime check on functionality.
You'll love using the XT DepthManager - plus if you read the comments on the
classes static properties there are exact (verified) numbers for max and min
depths supported by the Flash player.
You'll find the class at http://codext.com/code/6
Tyler
On 6/1/06, Zimmen [EMAIL PROTECTED] wrote:
If you need an object that already exists to be converted into an instance
of the class you can use the XT Prototype class
Prototype.makeInstanceof(obj, Array);
and using Zimmen's suggestion
Prototype.makeInstanceof(obj, _global[tType]);
good luck! you'll find the class at
setInterval's use up next to nothing on processor, even if you have 20 of
them going. I find that the best judgement of which to use is the task at
hand.
Because framerate is for animation, I find it best to use onEnterFrame when
doing coded animation. Flash will cause an automatic screen redraw
.
- phaedrus
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tyler
Wright
Sent: Friday, May 19, 2006 11:02 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] hitTest vs onRollOver/onRollOut
phaedrus,
You will find that, in the beginning, the hitTests
correctly, goToAndStop() and MoviClip.gotoAndStop() are
completely separate functions, and even have different behavior on
the root timeline.
On May 9, 2006, at 5:47 PM, Tyler Wright wrote:
This is Great! What a horrible thing to have to know, it just
doesn't make
sense that the keyword
I have sevaral for (var i in .. ) loops running looping through objects that
get thrown (interupted OR actually go forever) when I change the frame of a
movieClip where one exists.
Just as an example:
for (var i in listeners)
{
dispatch(listeners[i].event);
{
// the listener
function
?context=Flash_MX_2004file=2443.html
Kevin N.
Tyler Wright wrote:
I have sevaral for (var i in .. ) loops running looping through
objects that
get thrown (interupted OR actually go forever) when I change the frame
of a
movieClip where one exists.
Just as an example:
for (var i
/delegation:
mx.events.EventDispatcher
http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004file=2443.html
Kevin N.
Tyler Wright wrote:
I have sevaral for (var i in .. ) loops running looping through
objects that
get thrown
definitions of the function and 'this' makes sure that the actual movieclip
is the first one that is examined...
Extending MovieClips is always full of suprises man...
This is interesting, I'm wondering if it's gonna fix your problem though?
M
On 5/9/06, Tyler Wright [EMAIL PROTECTED] wrote
I've also had this error, several times. It's simply a Flash IDE bug --
Save your work, close and restart Flash, and the error will go away.
Tyler
On 5/8/06, MBDI ICSC Rodrigo E. Curiel Salazar [EMAIL PROTECTED] wrote:
I am working on a local drive,
I have some classes, in them I have this:
If you're using Flash 8 you can skip using the modal dialog box. Because
ExternalInterface and JavaScript communicate synchronously the JavaScript
waits for Flash to return a value and the window waits for JavaScript. It's
a great setup. You gotta love Flash8!
Tyler
On 4/30/06, g. wygonik
enjoy!
Tyler
// modified code snippet from my scroll class
scrollPause = Delegate.create(this, scrollPause);
upArrow.onPress = Delegate.create(this, upArrowPress);
upArrow.onRelease = upArrow.onReleaseOutside = Delegate.create(this,
arrowRelease);
private function scrollUp():Void
{
you don't need that, it will be availible because its an anon function
inside another function, therefore all variables inside the containing
function will be availible.
Right, because of this every MovieClip is sharing the same variables --
which is why it behaves unexpectedly.
That worked
I have over 20 years of programming experience including at assembler
level, advanced Java, etc, but thanks for trying to put me in my place :-)
There is no error. There is no timeout. Not in the PrintDialog object.
I think the FlashCoders list in general has a silly habbit of saying
On 3/23/06, ryanm [EMAIL PROTECTED] wrote:
Because global variables are contrary to the basis of OOP, which is
all
about abstraction and encapsulation. If you need to store variables
somewhere so that they can be reached anywhere, use a singleton, or a
static
class, or an application
dolecki [EMAIL PROTECTED] wrote:
That class imports:
import xt.core.*;
which is nowhere to be found in the release :/
On 3/8/06, Tyler Wright [EMAIL PROTECTED] wrote:
Take a look at the XT DepthManager ( http://codext.com/code/6 ). It
makes
messing with depths like this really simple
I have a DepthManager that will take care of this. It adds the .swapDepths()
method to TextField and Button. More specifically, it replaces the
MovieClip.removeMovie() and TextField.removeTextField() methods so that they
work at whatever depth.
The DepthManager is self-instantiating, but you have
No, there is no way to do this by extending the MovieClip class.
Unfortunately the _x and _y are unique beasts, along with all the other
MovieClip properties from the Flash 4 days (such as enabled). You can't
watch them, create getters/setters for them, or even over-ride them. You
have to have a
Why not pick a good, standardized
way to manage depths that works in every scenario?
...tag, you're it!
Anyway, this has gone on long enough. If you haven't gotten the point
yet you're never going to.
...I don't feel like playing anymore.
ok, let's not talk down to others who have
Define your own static MyKey class and have it subscribe as a listener to
Flash's Key. It can then be your applications Key class. Meaning your
objects listen to MyKey while MyKey listens to Key. Then MyKey can at
anytime listen to something else that feeds it input. There's nothing magic
about
The whole idea is that you keep
things at *predictable*, and whenever possible explicitly defined, depths
so
that things are easy to manage. If you need getNextHighestDepth, that
means
you don't know what the current highest depth being used is, and that
means
you aren't in control of the
No, you will have problems with that implementation.
True. To make it work, just change up a few things:
mainMclListener.onLoadProgress = function( targetMC, loadedBytes,
totalBytes)
{
// loadedWeight will increment only once per MC, after it is fully
loaded
// currentLoaded
?
hmmm, we all seem to be speaking in short half sentences, or punctuation.
The prototype property is fully accessible in AS2, and because of general
shortcommings in Flash.
(MovieClips, for example, are a cross-breed of the common prototype-based
class and a sprite of magic underscored
The prototype property is fully accessible in AS2, and because of general
shortcommings in Flash.
uh, it might help to finish my own sentences. correction:
...and because of general shortcomings in Flash it is sometimes necessary,
even if not recomended.
...continue
Tyler
Reading yes, in ActionScript 3.0 which is currently in public Alpha and
private Beta. In fact, the new DOM for AS3 offers the same power of
streaming in files that the player uses for SWF's. So you can ask for a
file, stream in a small portion (whatever you need) close the connection,
and start
Easiest solution for me would be to import the swfs into the Flash Authoring
Environment which has an export image option. It ususally does a decent job
from what I remember. If you're talking about batching thousands of these
things, perhaps someone has a JSFL script that can tell Flash to do
Is there security issue?
Flash security is a blessing and a curse. It's often difficult to work
around for developers. Try setting the allowScriptAccess in both the object
and embed tags to always and see if that helps.
Tyler
___
Flashcoders
I should be the one to thank you guys.
Anyone also know the link the the MM wish list?
Tyler
On 12/13/05, Weyert de Boer [EMAIL PROTECTED] wrote:
Yeah, looks nice!
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
I haven't checked various pocket devices on MIDI recently, but the
problem on desktops has been when you get varying capabilities on
various platforms, so that the same MIDI file can sound different on
different machines.
jd
I understand that there are various complications, especially
I know people who know what they're talking about. ;)
I've been fortunate enough to work on a project with some amazing developers
and experience the difficulty it is to get Flash to communicate with other
applications.
Thank you everyone for the great response. I will put together a summary
We built a MIDI sequencer for the PC that talks to Flash through an
XMLSocket (though we just send smaller strings, not XML). On both Mac and
Windows versions the code to make a sequencer capable of changing
instruments, transposing, changing tempo, and indivudual volume of
instruments, etc. was
It's not going to delete because somewhere else in your code you have a
reference to that object. For example:
var myObj = new A();
myObj.destory(); // won't be deleted until myObj no longer points to the
class.
If you really have your heart set on following something a little more OOP,
try
mc.onEnterFrame = function() {
trace(hit);
delete this.onEnterFrame;
}
Try this one on for size. You'll only get one (1) hit trace out to the
output window. If you have actions following the delete they'll still get
called before the method is deleted.
mc.onEnterFrame = function() {
The Flash Player has evolved through the ages to provide the most needed
functionality. Through each version there have always remained a few common
goals. What I have found is that:
Flash is small -- from the player itself to the swf file format to the
assets it is optimized to load, focus has
, Cole Peterson [EMAIL PROTECTED] wrote:
Thanks a lot for your time Tyler Wright.
That helped a lot!
I have implemented your suggestion. singleton. everything is great.
My controller loads in the swfs that make up the diff parts of the app.
The only disconnect is that all swfs have to agree
Of course you want to retain a synchronous relationship (much faster than
LocalConnection).
I'm not sure if this UI object you create is a singleton but the best way to
handle this situation is to use it's class to hold a static pointer to the
instance.
for example
class UI {
private static
.
-Steven
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Tyler Wright
Sent: Friday, November 11, 2005 2:47 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Detecting when a swf loses focus
We are looking for a solution
We are looking for a solution to this issue as well. It would be a great
help in DRM (Digital Rights Management) to keep not just test takers honest.
Anyone yet have a strong enough knowledge of the browser and JavaScript to
crack this one?
Tyler
On 11/8/05, Muzak [EMAIL PROTECTED] wrote:
57 matches
Mail list logo