What I'm saying is that you can't fix it from the AS--you have to re-encode the
FLVs with keyframes on every frame.
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of eric walton 9 / edub9 Edub9
> Sen
) If not, listen for the "load" event.
I'll bet what's happening now is that your listeners don't start
listening until after the XML has already been loaded--hence they never
receive the event.
(That said, I could be way off.)
―
Mike Keesey
> -Original Message---
In the Flash 9 Public Alpha, it's under Publish Settings > Flash >
ActionScript Settings > Document class
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Lori Hutchek
> Sent: Tuesday, Novem
The problem is in how the FLVs are encoded. You have to encode with
keyframes on every frame. Once that's done, they should scroll fine
(although backwards is generaly chunkier than forwards).
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoder
c function someFunction():Void {
// ...
MyFunctions.functionA();
MyFunctions.functionB();
}
}
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Helmut Granda
> Sent: Friday, November 10, 2006 11:30 A
ATA);
> fclose($fp);
> echo "Done saving";
Yup. You have to make sure of a certain setting in php.ini, though. I
can't remember which one it is, but you can probably find out at:
http://php.net
―
Mike Keesey
___
Flashcoders@chattyfig.fig
Ah, fixing it on the Javascript side! That makes a lot more sense. (And
there's no double-load.)
Thanks--I'll give this a try. (It's kind of hard to read, though ... but
I guess that can be good with Javascript)
―
Mike Keesey
> -Original Message-
> F
ML.onLoad() is called (which is the XML object's
way of telling you that it finally got around to it).
(ActionScript 3.0 is a bit nicer with its URLLoader class that
dispatches multiple types of events instead of calling a single callback
function, b
ml:XML, stateName:String):Object {
var state:XMLList = xml.state.(@name == stateName);
return {cc: [EMAIL PROTECTED], url: [EMAIL PROTECTED];
}
Ain't e4x grand?
―
Mike Keesey
___
Flashcoders@chattyfig.figleaf.com
To change your sub
You have to use a function because the loading is asynchronous. It
doesn't stop program flow while it's loading; it continues with the
program and calls a handler (onLoad) once the load is complete.
I'm not sure this is the proper forum for n00b questions...
Ah, that works. The only thing is that it requires a double load of the
page and the data isn't instantly available (although, with
browser-caching, it should load in very quickly). Not huge concerns, but
the double load could skew metrics.
―
Mike Keesey
> -Original Message
That sounds *much* nicer--how do you grab the whole XHTML page in
Javascript?
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Ryan Potter
> Sent: Thursday, November 09, 2006 11:39 AM
> To: Flashcode
I was playing around with the idea of passing data from an HTML page
directly into a Flash movie via Javascript/SWFObject. One thing I wanted
to try was sending the text that SWFObject replaces into the Flash
movie.
In Firefox this was pretty simple. E.g., if SWFObject was replacing the
contents
If you were using AS3.0 you could use the
flash.display.LoaderInfo.actionScriptversion property.
Wait--no, that only distinguishes 1.0 and 2.0 from 3.0. You could use
the swfVersion property, though. Why exactly do you need to detect this?
―
Mike Keesey
> -Original Message-
>
=pd_bbs_sr_1/002-6548398-2158405?ie=UTF8
&s=books
It really opened my eyes to the utility of unit-testing, and how paying
some time up front can allow your code to be more stable and more
flexible down the road. (Yes, the examples are in Java, but
public function traceFoo() {
trace(foo);
}
private function toggleAndTraceFoo():Void {
foo = !foo;
traceFoo();
}
}
(Me, I prefer to use an event dispatcher that sends "enterFrame" events,
but I'
tion set name(value:String):Void {
if (value instanceof String) {
_name = value.toUpperCase();
} else {
_name = null;
}
}
private var _name:String = null;
}
―
Mike Keesey
/langref/Error.html
Error(message:String = "", id:int = 0)
Creates a new Error object.
(Well, the "id" argument corresponds to the "errorID" property--so I
guess they went both ways on this one!)
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROT
n documentation generated from a
signature where the argument was, e.g., "nameValue", since it would be
more immediately obvious that the argument "name" corresponds to the
property "name". That said, the code itself is clearer the other way.
Six of one and half a dozen of
his in
AS3.0.) Other than that, I think it tends to clutter things up.
But that's just my take.
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of slangeberg
> Sent: Tuesday, November 07, 2006 11:47 AM
> To
AS3.0 has Number.toFixed():
http://livedocs.macromedia.com/flex/2/langref/Number.html#toFixed()
Of course, that probably doesn't help you....
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Hans Wichman
Looks pretty good to me! You might consider having the display classes
dispatch an event instead of calling a single function when they
close--then you can extend behavior more easily in the future, if
several things need to happen based on the same event.
―
Mike Keesey
> -Original Mess
that Macromedia/Adobe writes, event names dont
have "on" as part of the name, but a function responding to them might,
e.g.:
WeatherManager.instance.addEventListener("windChange",
Delegate.create(this, onWindChange));
Or, in AS3.0:
WeatherManager.instance
fy
an empty square.
In AS3.0, this becomes trickier, since there are no private
constructors. Anyone know if there is a recommended way to get around
this? (On the plus side, you can make the class final and the static
values constant, which is a major shortcoming in AS2.0.)
--
Mike Keesey
r properties.
public function copy(source:GameState):Void {
_board = new Board(source._board);
// Copy other fields.
}
private var _board:Board;
// Other private fields.
}
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTEC
dentical:Array = original;
var copy:Array = original.concat();
original.push(4);
trace(original); // Outputs "1,2,3,4".
trace(identical); // Outputs "1,2,3,4".
trace(copy); // Outputs "1,2,3".
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTE
lose
as it gets.
The distinction doesn't matter much in practice, but
―
Mike Keesey
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoder
Number = [some positive integer value];
var randomInt:Number = Math.floor(MAX * Math.random()); // Sets it to
some number from 0 to MAX - 1.
―
Mike Keesey
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyf
is, play));
MotionController.instance.addEventListener("stop", Delegate.create(this,
stop));
// To stop all controlled animations:
MotionController.instance.stopped = true;
// To restart all controlled animations:
MotionController.instance.stopped = false;
―
Mike Keesey
> -Orig
e subclass,
e.g.:
public function toString():String {
return super.toString() + " extra subclass info";
}
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Paul Steven
> Sent: Thursday, Novembe
on clone():ClassName {
var cloneObj:ClassName = new ClassName();
cloneObj.copy(this);
return cloneObj;
}
// ...
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Steven Sacks | BLITZ
> Sent:
();
}
public var board:Array;
public var score:Array;
}
Then you could call the construct with or without a parameter.
(Actually, I would never use public variables, but that's another
topic....)
―
Mike Keesey
> -Original Message-
> From: [EMAI
Pretty sure you can't.
Just noticed something odd whil looking at the documentation on AS3.0's
ProntJob class (http://livedocs.macromedia.com/flex/2/langref/)--it
extends EventDispatcher, yet it doesn't have any documented events. Vot
der hey?
―
Mike Keesey
> -Original M
r
as sound goes, you're kind of stuck with MP3.
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Josh Santangelo
> Sent: Wednesday, November 01, 2006 3:54 PM
> To: flashcoders@chattyfig.figleaf.com
>
Yeah, the simplest way is to create an index field on the buttons
themselves, and then access that in the listener with
event.target.index.
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of dnk
> Sent: Tuesday
/write]
nodes:Array [read/write]
radius:Number [read/write]
copy(source:TweenSettings):Void
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
> Sent: Wednesday, November 01, 2
esystem. Sorry for the noise.
Don't apologize--I found the unzip class interesting!
―
Mike Keesey
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashco
Err, that last function should probably be called "onButtonRelease" ...
but you get the idea....
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Mike Keesey
> Sent: Monday, October 30, 2006 5:04
event.target is IndexButton) {
var index:uint =
IndexButton(event.target).index;
// Do something with index.
}
}
//...
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:
// Do stuff with button.
}
If you need to specifically use an index number, I'd attach that to the
button instances themselves. Then you could retrieve that via
event.target.
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTE
Use this:
var arg:String = "myvar";
getURL("javascript:testfunc('" + arg + "')");
// Note: arg's value cannot have apostrophes in it.
Or, better yet, look into the flash.external.ExternalInterface class.
―
Mike Keesey
> -Original Message---
_theta = value;
}
}
private var _radius:Number;
private var _theta:Number;
}
�D
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of JOR
> Sent: Thursday, October 12, 2006 7:27 PM
> To: Flashcode
" + this.status);
}
}
The scope should probably be "this" instead of "xml" in this case.
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Ray Chuan
> Sent: Saturday, October 07, 2
Use the XML.status field.
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.parseXML(someTextVar);
if (xml.status == 0) {
trace("Success!");
} else {
trace("Error in XML! Code: " + xml.status);
}
―
Mike Keesey
> -Original Message-
&
deleting a variable and setting
it to undefined?
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Peter Hall
> Sent: Tuesday, October 03, 2006 3:55 PM
> To: Flashcoders mailing list
> Subject: Re: [Fl
Will that be called if you use unloadMovie() or if the playhead moves to
a frame without the instance?
MovieClip.onUnload is put there specifically for this kind of purpose.
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On
troy():
public function destroy():Void {
// Perform clean-up.
delete this;
}
Then replace all instances of "delete instanceOfYourClass;" with
"instanceOfYourClass.destroy()".
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flas
I think that's very well-put.
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of David Bellerive
> Sent: Thursday, September 28, 2006 8:22 PM
> To: flashcoders@chattyfig.figleaf.com
> Subject: [Flashc
According the the name, it should be some kind of a quadratic equation
(ax^2 + bx + c = 0). You could get something looking a lot like this
with the sine or cosine functions, though.
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROT
Whoops!
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Mike Keesey
> Sent: Tuesday, September 26, 2006 2:23 PM
> To: 'Flashcoders mailing list'
> Subject: RE: [Flashcoders] Delegating Events and AS2
[...
tried AS3.0, so someone let me know if I
messed anything up.)
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Sean Scott
> Sent: Tuesday, September 26, 2006 12:09 PM
> To: Flashcoders@chattyfig.figle
to go back to project A with some tweaks and republish it.
Because of changes in the package, there may be problems--at best you
will still have to spend time regression testing.
Copying your packages to a project-local folder means that you have a
secure "snapshot" of the package
This is generally the route I take. The only thing is that it may halt
application flow in unforeseen circumstances, so 1) unit test and beta
test really well and 2) try as much as possible to catch errors in code
that sets the property.
―
Mike Keesey
> -Original Message-
> From:
Well, can he load it into a holder SWF and set the global volume on
that?
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Merrill, Jason
> Sent: Friday, September 22, 2006 12:11 PM
> To: Flashcoders mailing
I think you can control all of the sound in a Flash movie like so:
var globalSound:Sound = new Sound(_root);
// Mute.
globalSound.setVolume(0);
// Restore.
globalSound.setVolume(100);
―
Mike Keesey
Well, random() has two meanings then, and the Math.random() function is
more generally useful than random() (for example, if you need a random
floating-point number). That said, I'd love a Math.randomInt() function.
―
Mike Keesey
> -Original Message-
> From: [EMAI
Actually, scratch that -- move the whole formData deal to its own
function, and call that from onMailComplete(). IOW, do the calls
sequentially, not simultaneously.
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behal
ntact.aspx";,
response);
... to the very end of your processForm() function.
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Bill Abel
> Sent: Thursday, September 21, 2006 10:20 AM
> To: Flashcod
) / 2;
center.y = (bounds.yMax - bounds.yMin) / 2;
return center;
}
(Assuming that the scope of this function is a movie clip timeline or a
subclass of MovieClip.)
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROT
The earlier post (by Jake Prime) is probably the explanation. But also,
random() is deprecated; instead of random(x), you should use
Math.floor(Math.random() * x).
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf
(this, onResponseComplete);
request.sendAndLoad(url, response);
―
Mike 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
, and if
there is no such symbol, an error is thrown (which does not disrupt any
other processes).
--
Mike Keesey
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/fl
My guess would be that postincrement it takes longer because it needs to
store and return the original value, while preincrement only needs to
return the result after performing the operation. But that's only a
guess.
―
Mike Keesey
> -Original Message-
> From: [EMAI
I can think of a reason:
SAFARI SUCKS!!!
Sorry, I can't be more helpful; just had to get that out there. ;)
Okay, I'll try to be a little helpful--have you tried putting an alert()
call in your JS function to see if Safari's calling it at all? Or,
better yet, try calling the function from an HTM
lice(index, 1);
}
public function toString():String {
return "[type ItemList(items=" + _items.join(", ") + ")]
";
}
private var _items;
}
It is cumbersome to do this for all types, but it's handy for many
occasions. (I
lowed ECMA standards.
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of julien castelain
> Sent: Friday, September 15, 2006 1:17 AM
> To: Flashcoders mailing list
> Subject: Re: [Flashcoders] AS3 : chr() == S
Not to be too harsh, but that's been deprecated since, what, Flash 5?
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of julien castelain
> Sent: Wednesday, September 13, 2006 10:45 PM
> To: flashc
Why not just:
public static function contains(str:String, val:String):Boolean {
return str.indexOf(val) >= 0;
}
?
A tad more concise (you don't need the "? true : false" part), and
avoids the problem your function has that if str is null or undefined,
it returns t
line with what Adobe is doing.
Are they making classes? Yes. Are they making scripts to be included
from the timeline? No.
There is only one instance where I currently use an included timeline
script instead of a class, and that is for SWFObject's
expressinstall.as, which needs to work in
t and mark it with a
"KLUDGE" comment.
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Rifled Cloaca
> Sent: Thursday, September 07, 2006 3:59 PM
> To: Flashcoders mailing list
> Subject: Re: [Fl
Use the XML.idMap property.
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Rifled Cloaca
> Sent: Thursday, September 07, 2006 3:27 PM
> To: Flashcoders mailing list
> Subject: [Flashcoders] XML id attr
What's the path? Is the class name actually "myClass"?
―
Mike Keesey
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:flashcoders-
> [EMAIL PROTECTED] On Behalf Of Christian Pugliese
> Sent: Tuesday, September 05, 2006 2:31 PM
> To: Flashcoders mailin
Boy, is my face red! But I have seen bad package-naming conventions used
before, so hopefully the post wasn't completely useless for eveyone out
there.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Adrian
Park
Sent: Sunday, August 27, 2006 4:34 AM
To: Fl
PET PEEVE ALERT
class com.shell.util.IntroAnimProxy
Unless you are actually doing Shell Petroleum's website at
http://shell.com, this isn't a proper name for the package. The "com"
convention is a strategy to keep package paths from overlapping on
different projects: if you're doing a website, yo
it should work. A bit weird, though.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mike
Keesey
Sent: Thursday, August 24, 2006 6:46 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Protect model setters from being called by
anyclasse
In AS3.0 I think it can be package-private, but until then
One way is to have the Model class satisfy an interface that lacks the
property (of course, in AS2.0, all interfaces lack properties...), and
then only expose the model class as the interface elsewhere.
interface IModel {
func
27;ve experimented with a few such programs. I'd really like to find
something (or a combo solution) that can work both ways.
--
Mike Keesey
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the arc
You can just set your FlashVars on the first frame on the main timeline.
(And make sure you delete them when done testing.)
I don't know of a better way.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, August 24, 2006 4:0
It ends when you make your own damn third-party tools! ;)
Seriously, though, I don't find that I have to comment out huge swaths
of class functions at a time very often. Even if I did have to comment
out several functions, they might not be next to each other, anyway.
And, as I said before, commen
asy to do "Move Method" refactorings
and suchlike.
> I'm not going to make my process suffer nor am I going to litter my
code
> with ugly asterisks just to document my work when I can spend that
> energy writing cleaner, easier to read code with light commenting in
the
>
g
// It's easier to read than all those asterisks
// IMNSHO
/
Oh I used about 6 asterisks in my example. I don't like huge lines of
them, either.
--
Mike Keesey
___
Flashcoders@chattyfig.figleaf.com
To change your subscriptio
Putting a block comment before a function is standard, though (Javadoc).
Putting one *inside* a function is awful, though, I agree.
/**
* This is a perfectly fine Javadoc comment
*
* @param bar some parameter
*/
public function foo(bar:Object):Void {
/* Using a block co
What would be the point of that? The only point of upcasting is to have
things compile with strict typing, and the compiler can't tell what the
class is if it's dynamically determined.
Are you talking about dynamic *instantiation*? Then you could use
something like this:
// Import all classes tha
I have seen others do it, or mark parameters with a "p_".
I prefer not to mark parameters in any special way. I mark private
variables with "_", so those are already distinct. And if I have a
function that's so long that I can't see the top from somewhere in the
body, it's well past time to cut it
public function Test(){
super();
_tf = new TextFormat();
trace("hello");
}
}
(The "super();" is not strictly necessary; I'm just anal.)
--
Mike Keesey
___
Flashcoders@chattyfig.f
85 matches
Mail list logo