Unfortunately, that doesn't work. That returns something (an empty XMLList, I
believe).
The best way to test for attribute existence and/or if it has a value is what I
wrote.
Glen Pike wrote:
Thanks for the answers with the length() thing - I tried out a few of
those and got working
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/XML.html
var hasChildren:Boolean = xmlLabels.section.children().length() 0;
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
As I described on my forum post, you have to first put your items in an array.
var items:Array = [all, of, your, items];
var len:int= items.length;
var i:int;
Then, you do the following measurements:
// the right of the last item minus the left of the first item
var availableWidth:Number =
You will get runtime errors when attempting to access an attribute that isn't
there. The proper way to check for existence and length of an attribute is to
use the .attributes() syntax as such:
if (node.attribute(instance).length() 0)
___
hasOwnProperty does not tell you whether it has a length, though. It only
checks for existence.
And for some reason, it looks like you modified my code when quoting me:
if (node.hasOwnProperty(instance).length() 0)
I didn't write that code, which would error since a Boolean doesn't have
This is how you record sound:
http://www.getmicrophone.com/?p=69
If you're asking how to convert sound waves into speech, dude, what? Do you
realize how challenging speech recognition is? Wait, why am I asking you this?
If you did, you wouldn't be asking people on a Flash list how to do it,
I didn't see a reponse from Ash. Yet another email lost to the ether. :(
Dave Watts wrote:
And as much as I like Ash, I'm not sure I want to take coding advice
from the guy who couldn't remember klaatu barada nikto - maybe he
was too enamored of shortcuts?
Dave Watts, CTO, Fig Leaf Software
That was supposed to be a winky, not a frowny.
Steven Sacks wrote:
I didn't see a reponse from Ash. Yet another email lost to the ether. :(
Dave Watts wrote:
And as much as I like Ash, I'm not sure I want to take coding advice
from the guy who couldn't remember klaatu barada nikto - maybe
Dave, come on. Take a stand on the issue. Stop straddling the fence.
Pick a side. Im or Ex?
I'm not about writing cryptic PERL-like statements, but writing != null is a
waste of time. It's obviously a null comparison (by nature of it being an
instance). Calling it out as such is redundant.
The reason you're comfortable straddling the fence is because you don't
experience the pain or discomfort associated with a picket sticking into your
crotch. Why would that be? ;)
How do YOU code? Do you use implicit or explicit?
Dave Watts wrote:
I think you're missing the point. You're
Taka,
When you're done building your Straw Man, you let me know and I'll happily
continue the discussion with you.
Cheers,
Steven
Taka Kojima wrote:
Writing readable code writing less code.
That is what it comes down to. Most coders can understand both of the
following:
if(myObj){;}
I don't understand why you would not want to write a single line of code in the
class where it would provide the most clarity, and instead write MORE code in
another class obscuring the behavior that is going on. In other words, you're
writing more code to write the same code. You're going to
if (Boolean)
Everything inside an if statement is automatically coerced into a Boolean.
Either it is or it isn't.
It's not more clear to write != null because an if statement cannot possibly be
anything other than true or false. In this case, null or not null. Writing it
out is redundant
Dave Watts wrote:
Lots of people hate implicit Boolean conversion, and see it as a sin
against God and nature. I'm not one of those people, but I think it's
a mistake to say that implicit Boolean conversion is superior and
everyone should use it.
Code bloat is one of the seven deadly sins
It's called artistic license. ;)
And you are eating code, through your eyes and brain. :)
Dave Watts wrote:
Code bloat is one of the seven deadly sins (gluttony).
This is why we all name our variables things like x, y, etc instead of
giving them recognizable names, right?
And gluttony,
James Gosling got his Doctorate in CS in 1983.
Programming has changed quite a bit since then.
new old
;)
Dave Watts wrote:
And you are eating code, through your eyes and brain. :)
... and I must therefore excrete code from my fingertips. And the
usefulness of this metaphor reaches a
Here's the best way to write that. No try catch required.
if (myDO myDO.parent) myDO.parent.removeChild(myDO);
Keith H wrote:
Steven,
Maybe its just me but...
Just doing a Boolean check on DisplayObjects always put my scripts in
high risk of runtime errors.
Especially in the case of
The act of writing Actionscript in FlashDevelop is, IMO, better. FD's code
completion and code gen is easier and faster. Because code completion and code
gen is the majority of what I do from moment to moment as I'm writing, it's the
better tool.
Refactoring and debugging are not what I
Dave,
As an example of the irregular nature of the current list server, I did not
receive your response. I saw Latcho's response to your response, which
thankfully quoted your response, otherwise I would have missed it. I'm not sure
how many emails I've missed and *not* known about.
As I understand it, the previous ones were lost forever, unfortunately.
Alan wrote:
I think the current Mailman configuration works well, although it would
be nice if the web archives worked. There's so much helpful information
coming through this list, but they end in late 2007.
Alan
Kerry,
My email was a matter of fact one, nothing more. It had nothing to do with the
quality of the posts, members or owner.
Flash Tiger emails show up very quickly because they're on Yahoo servers.
Despite their recent financial troubles, Yahoo has a ton of servers on very fat
pipes.
Unfortunately, yes, I get runtime errors sometimes when screens are split and
you close some tabs. You can choose to ignore the errors and FlashDevelop will
keep on trucking. You don't have to quit.
Joel Stransky wrote:
Hey Steven, does FD crash on you when you have your view split and
Only FlashDevelop auto-completes in-scope member names and key words. Only
FlashDevelop has smart auto-completion that forgives typos. AFAIK, only
FlashDevelop has toggle line (CTRL+T) functionality (which I use all the time),
and the *extremely* useful clone file (CTRL+SHIFT+N)
FlashDevelop does do find and replace in files. FlexBuilder's rename function
is very slow sometimes. FlashDevelop's Find and Replace In Files is nearly
instant. Considering how infrequently one uses rename in FlexBuilder, it
doesn't seem to offset the slowness of day to day coding with it
I have slow email issues with Flashcoders, as well. There's a noticable delay
between when I post and when it shows up. Sometimes I get no emails for awhile,
and then a slew of them come in (like a hose that's been crimped and then released).
FlashTiger emails show up very quickly, but
FlashDevelop auto-completes class, instance and local vars, as well as native
key words like public, private, class, interface, implements, function, static,
const, etc. FDT and FB do not.
Here's what toggle line does
hello();
world();
CTRL+T on world line
world();
hello();
While this
FlexBuilder absolutely does NOT do auto-completion of class, instance and local
vars (FD also does function names, etc.). I've never seen FDT do it, either,
but that link obviously makes it clear that it is possible (though completely
undocumented, not to mention that field doesn't look like
It certainly does. It's simply using the mxml compiler to find those errors. The
FD developers have stated their intent to include it one day, but have stated
it's a lot of work. They currently have syntax checking. Keep in mind that
FlashDevelop is two guys working in their spare time for
In FlexBuilder, they don't start appearing as auto-completion hints as you type.
You have to hit CTRL+SPACE. This is not a mere difference. You have to stop
writing code to get auto-completion. Even worse, it's not live which means it
breaks your natural flow.
In FlashDevelop, you can hit
I didn't say people who used it were retarded, I said the program was.
The bottom line is, you can use Flex Builder to do your debugging if you need
it, but for coding, which is what you spend the majority of your time doing, all
the Eclipse-based Actionscript editors suck ass compared to
Oh yeah, and Flex Builder is $500 whereas FlashDevelop is free.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
I'm confused why you would need to look at more than one project at a time, and
you can switch projects very quickly in FD by using Recent Projects.
It's well established the debugger is limited to tracing, which is generally
good enough for most of the time.
I don't know what you mean about
My home computer is a Windows XP box.
My last full-time job was a Mac-only shop. So, I used Mac every day, 5 days a
week, for 10 months.
Within a few weeks, I realized I couldn't live without FlashDevelop. I installed
Parallels 3 with Windows XP and figured out how to use FlashDevelop in my
http://www.libspark.org/wiki/SWFWheel/en
On Jun 26, 2009, at 1:50 AM, Dav wrote:
Hi Guys,
I'm having a problem with attaching the mouse wheel listener to the
stage in
AS3.
For some strange reason, when flash is focused and I scroll my mouse
wheel,
the entire browser scrolls along with
http://jessewarden.com/2008/05/two-directory-source-control-workflow.html
On Jun 26, 2009, at 3:00 PM, Mario Gonzalez wrote:
If I have a project that is under subversion control, then I decide
to make a flex project with the folder (order of these two
operations can be reversed with same
Your sample doesn't show how you build the Array.
So the answer to your incomplete question is nothing different than
what Flash is telling you.
The reason it returns -1 is because indexOf couldn't find a STRICT
EQUALITY match for e.target.name in your array.
If you posted how you built
This is exactly how Gaia works. goto() calls setValue on SWFAddress
and the response is dispatched to the framework to handle the
navigation. Interrupts are handled in both loading and transitions.
It's open source, so you're welcome to examine how it's done in Gaia.
On Jun 16, 2009,
Filter the XML using E4X and then make a new XML from that filtered
result.
var xml:XML = xml
modules
module title=apple/
module title=orange
node/
/module
module title=banana
Actually, you don't need that newXML var. Sorry. I left that in
during debugging.
Just setChildren the original xml, as I did. If you want to make a
copy without destroying the original, then setChildren() the newXML
var instead.
___
Once you really dig into E4X and realize the crazy stuff you can do,
it's amazing.
I do some pretty crazy E4X parsing, filtering and validation with
Gaia. Here are some examples:
// get all nodes named page or asset in the entire XML
var nodes:XMLList = xml.descendants().(name() == page
Did you choose the characters you wanted to embed on the TextField?
John R. Sweeney Jr wrote:
After I attach the mc, I position both the _x and _y with no problem. The
_alpha does not function. I¹m now trying it in just a simple, new moving and
the alpha works if I attach the mc, but if I
http://www.youtube.com/watch?v=R2a8TRSgzZY
This is a work of genius.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Could you show some sample of the XHTML you are reading in?
Specifically, what does body.p trace out?
On May 26, 2009, at 4:00 PM, Jonathan Wing wrote:
Using Gaia, I am trying to load content within flash from an XHTML
file,
and have the text flow from a p into two columns. This is what I
The latter is cleaner and better, IMO.
Write a function that your event handler calls. Then, you can call it from
elsewhere and from your button click handler.
function onThumbClick(event:MouseEvent):void
{
loadImage(event.target.name);
}
function loadImage(num:int):void
{
//
My advice is to use the wonderful encyclopedia available to you called
The Internet.
I went to Google and typed in: sort xml AS3
The first 4 results have the exact code you need to do this.
The Internet: Helping people find answers, one search at a time.
On May 21, 2009, at 7:25 AM,
http://www.gaiaflashframework.com/index.php/topic,1847.msg7817.html#msg7817
Just so everyone is familiar with the context here, the above is the
thread on the forum about this.
The question is about how to use E4X to parse XHTML. I provide a code
example of how easy it is to do this, but
One Student At A Time
-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven
Sacks
Sent: Thursday, May 21, 2009 1:43 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Parsing HTML tags within flash from
Without posting the errors, I can't tell for sure, but it's possible
you didn't declare
pubilc var footer_bar:MovieClip
at the top of your class?
Or, perhaps it's null?
On May 21, 2009, at 12:41 PM, Jonathan Wing wrote:
This is probably a silly question, but I've searched google and
If your XML has namespaces (like YouTube's xml feeds), then, yes, JSON
is easier to implement.
Namespace support in E4X is the very definition of Royal Pain In The
Arse.
It's why the AS3 code lib for YouTube uses their JSON feed instead.
It's just too ridiculous to deal with all those
Agreed!
On May 20, 2009, at 3:45 PM, Taka Kojima wrote:
IMO, there are times to use JSON and times to use XML.
JSON is very easy to implement and not very hard to grasp... all
you're
basically doing is running an encode when you send data out and a
decode
when you bring data in. So you
http://74.125.155.132/search?q=cache:Z9ZpwotYRtkJ:www.mikestead.co.uk/2009/01/04/upload-multiple-files-with-a-single-request-in-flash/+AS3+Socket+send+progress+brokencd=3hl=enct=clnkgl=usclient=firefox-a
On May 15, 2009, at 11:19 AM, Paul Freedman wrote:
I haven't had to build ftp
Encrypt your text using a super crazy encryption algorithm.
Then, create a swc that contains the key and algorithm to decrypt the
text.
Then, encrypt that swc using another super crazy encryption algorithm.
Load the swc at runtime as raw bytes, decrypt it in memory, and then
instantiate
You can embed specific ranges like this:
http://www.gaiaflashframework.com/index.php/topic,1678.msg7436.html#msg7436
If you put the font in the library, you can just set the font to
export in frame 1, give it a class name and then
Font.registerFont(fontClassName);
Easy peasy.
On May 7,
Rad. I've blogged and twittered about it. I suggest everyone else do
the same!
On Apr 24, 2009, at 7:21 AM, Merrill, Jason wrote:
and give the group a name like
FlashTiger, I made Air-Tight.
Great name, I love it.
Jason Merrill
Bank of America Global Learning
Shared Services
Anyone know of an active Adobe AIR mailing list (like Flashcoders/
Flash Tiger)?
Apollocoders is basically dead, and all posts are moderated.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
Hilarious.
On Apr 19, 2009, at 5:17 PM, Peter B wrote:
Ha! Know what's crazy there? Your post Stephen, and the OP are now the
number 3 4 results from that search...
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://tinyurl.com/d67kuy
On Apr 17, 2009, at 1:02 PM, Preston Parris wrote:
Does anyone have a good example of loading thumbnails from flickr,
and then
once you click on that thumbnail, loading a larger version of the
picture
from flickr still in the flash. Everything i have found links
For training, I like the Adobe Flex training from the source book(s).
I personally did not like this book at all.
Here's how the book goes:
Build this like this.
Build that like that.
Now, you know how you built this and that? That's the wrong way to build it, so
we're going to refactor
This book obviously wasn't meant for your learning style, but it was for me.
Different strokes for different folks! :)
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
http://polygonal.de
If you want to learn about maximum optimization for collision detection, etc.
nobody knows more than this guy.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
Not really. That's far less than I work for.
alan skinner wrote:
Surely thats not the going rate for a flash developer in the US?
Thats an obscene amount of money ;o)
_
It’s the same Hotmail®. If by “same” you mean up to
Keyword: Old.
Hans Wichman wrote:
ps we're probably not the first ones discussing this old subject, has n1
found some good sources/references?
Most of the old CS textbooks sentence you to hell for using public variables
so let's not refer to those ;)
Make sense?
bytesTotal = 100% * width;
duration = 100% * width;
bytesLoaded / bytesTotal = 0%-100% * width
time / duration = 0%-100% * width
The relationship between bytesLoaded and time is 1 to 1, which is why my
scrubber logic is flawless. That's where you went off the track. Eek, a pun!
And just to clarify:
Stand on the shoulders of giants, don't follow in their footsteps.
Steven Sacks wrote:
Keyword: Old.
Hans Wichman wrote:
ps we're probably not the first ones discussing this old subject, has n1
found some good sources/references?
Most of the old CS textbooks sentence
Thankfully, AS3 allows you to put implicit getters and setters into an
interface.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
It is incredibly rare that I agree with Steven.
I resemble that remark! ;)
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
For clarity, they're referred to as implicit and explicit.
get prop / set prop = implicit
getProp() / setProp = explicit
In AS2, it made a difference because implicits were available right away,
whereas explicits were not available for 1 frame. This limitation is not
present in AS3.
Here's what you need to know to make a good scrubber for progressive download
FLVs.
1. You need a background that shows the entire width of the bar.
2. You need a progress bar that shows how much of the video has loaded. The
width of this bar is the background.width * (ns.bytesLoaded /
Just for clarification, it was 4 bytes (the size of an empty MovieClip in AS2).
I don't know if it's the same in AS3 (don't care enough to look into it).
I don't think that's the issue he's having. I think he's saying the bytesLoaded
is returning correctly, but the bytesTotal is 0 the
Singletons are overused and, except in rare instances, are a bad idea.
Singletons are acceptable if you're writing throwaway code, like agency stuff
where getting it done under tight deadlines is more important than getting it
done in the most scalable and flexible way.
A Singleton is just a
Why aren't you using a static class for that instead of a Singleton?
Mendelsohn, Michael wrote:
Thanks for the responses everyone.
Steven, I could use some constructive feedback:
Usually what I do is have a singleton instanced when the swf is
initialized, and using composition, other
No.
david costard wrote:
Hi List,
Is it possible to execute a .bat file from an AIR application ?
david
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Joel,
Considering the types of Flash sites you're talking about building, Flex is not
the solution you need. However, Flex is absolutely worth learning, if only to
expand your skillset which leads to making more money per hour. ;)
Out of all the frameworks you listed, only Gaia is for
There's a bug if you return in a try or catch (maybe it's just catch). Colin
Moock mentions it in his AS3 book. I personally think it's cleaner to return
after a try catch because try catch is not an if else and really shouldn't be
treated as such, but that might be because I have avoided
Do not call return in a try catch.
Ian Thomas wrote:
Method:
public static function refExists(obj:Object,name:String):Boolean
{
try
{
if (obj[name]!=null)
return true;
}
catch (e:ReferenceError) {}
return false;
}
if (currentSection.refresh)
{
currentSection.refresh();
}
Karim Beyrouti wrote:
Hello Group -
This should be really easy. I am trying to find out how to check if a
function exists or not in AS3 -
I tried this:
code
If ( currentSection.refresh != null ) {
I'm trying to figure out how to do drag and drop between two NativeWindows. Not
drag and drop between the OS and AIR, and not drag and drop in the same window,
but between two NativeWindows of the same AIR application. I've tried all
manner of guessing, and I can't find a single example on
http://www.stevensacks.net/2008/07/02/parsing-xhtml-with-e4x-in-as3/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
And derivatively, a way to grab the entire contents of a node as one big string:
http://www.gaiaflashframework.com/index.php/topic,918.0.html
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
No.
Matt Ganz wrote:
Hey,
Just trying one more time
Using Flash CS3 and publishing to flash player 9, can you import and embed
.mp4 files in the flash timeline? I can't. I can link to it via an
flvplayback component.
Thanks,
Matt
___
If a web page is having latency problems, like YouTube during heavy load times
(like now, 9:30pm PST), then AIR's HTMLLoader has all kinds of problems.
From rendering stuff completely incorrectly, to failing to pass Flash player
detection, to this crazy error that got spit out when I tried to
I may not have a CS degree, but I do know that off-topic posts are supposed to
have a leading OT: in front of them. What gives? ;)
Kerry Thompson wrote:
John Winkelman wrote:
Well, I got my degree in Russian Studies, which means I can read all of my
spam.
LOL. It must be Friday.
Wow. That's a crazy amount of code for something so simple.
Here's what I use:
---
import mx.events.EventDispatcher;
class net.stevensacks.utils.ObservableClip extends MovieClip
{
public var addEventListener:Function;
public var
Select your transparent PNG and press CTRL+B (Break Apart).
Then, use the lasso tool and the eraser tool to erase the transparent pixels as
best you can.
This will increase your performance a lot because Flash won't have to render
those transparent pixels anymore.
You cannot load a PDF into Flash. You must have misread any article that you
think said you could.
ali drongo wrote:
Hiya, does anyone know the best way to get a PDF into my SWF as a viewable,
scalable moveiclip?I've done a bit of research on this but most articles I
find are a few years
I don't know if this has been documented or not. I've never seen anyone report
it.
If you set a Sound to loop, it's channel.position property returns a number out
of range of the Sound.length after it loops. The position property just keeps
on incrementing beyond the length when you loop a
Modulus works, too, but that doesn't solve the issue that looping sounds return
out of range values, nor does it fix the issue that channel doesn't have a
proper pause() method like NetStream does.
___
Flashcoders mailing list
var snd:Sound = new Sound();
snd.load(new URLRequest(assets/sample.mp3));
var ch:SoundChannel = snd.play();
var st:SoundTransform = ch.soundTransform;
st.pan = 1;
ch.soundTransform = st;
trace(st.pan);
trace(ch.soundTransform.pan);
st.pan = -1;
ch.soundTransform = st;
trace(st.pan);
Update: Unfortunately, it looks like even if you set the pan all the way in one
direction or the other, it doesn't actually work. You can still hear the sound
coming out of the side that it is panned away from. So, I guess this bug is moot
since pan doesn't actually work properly in the first
The issue isn't Gaia. If you try to load that component living in a child swf
into a parent swf it doesn't work.
Many component authors never take into account the extremely common use case of
loading their component into another swf. Many PV3D components I have seen
suffer from this exact
Man I just keep finding more and more bugs with Sound. This one is actually
really bad because it has no workaround, unlike the others.
If you have an mp3 file that is less than 128kbps and you get its
channel.position at a particular point in time and try to play from that
position it jumps
http://www.stevensacks.net/2008/04/30/flashdevelop-flexbuilder-style-error-reporting-on-save/
Leandro Ferreira wrote:
How do you guys debug your movies using FlashDevelop + Flex SDK?
Leandro Ferreira
___
Flashcoders mailing list
It's a dangerous business removing instances when there are still
references to them. Check out as3 weak references.
So dangerous that you can't do it. ;)
The Flash 10 Player has a function to force the GC to run, btw.
___
Flashcoders mailing list
Don't ask questions. You won't learn anything. Make him code some stuff.
Something tricky. Come up with something good. That is, if you care if they
know how to code.
Nevermind. You should ask him what his strengths and weaknesses are. Those are
always good interview questions.
There's a company here in LA that gives you a choice of tests and you can take
them home and work on them. I heard what one of the tests was at 1:00am late
one night and I was so psyched about it that I ended up staying up til 5:30am
doing it. I wasn't happy with my first solution, which
Word.
laurent wrote:
hahahah awesome!
Lukas Ruebbelke a écrit :
This list would just die because Steven Sacks would have nothing to
complain
about. :D
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Allandt
Bik-Elliott (Receptacle)
Sent: zaterdag
I'm still here. ;)
allandt bik-elliott (thefieldcomic.com) wrote:
it brings up a serious point tho - can flash survive with the amount of
animosity there is towards it?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
Yeah, what you should do is the 50 percent recursive deletion.
Delete half the items and test. Then delete half of the half that has the bad
library item in it and test. Repeat until you hone in on it.
___
Flashcoders mailing list
Welcome to the seedy underbelly of Flash development.
What you've got here is the case of a corrupted library item. It happens
sometimes and there's only one thing you can do about it.
Not too long ago, my team inherited a Flash 8 file with a corrupted library item
that was so terribly
Now why would Adobe do that? Why would they want to play nice with others?
Give you, the developer, an option to release the camera or microphone? That
just makes too much sense, like being able to unload swfs in AS3.
And be aware that while Adobe might have this stopAndUnload() method
101 - 200 of 1049 matches
Mail list logo