@Alexander,
trace(this.name, event.target.name);
you will notice that this refers to root1 and event.target to the sprite
HTH
Cor
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
Glad to be of help!
Kind regards
Cor
-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Alexander
Farber
Sent: zaterdag 17 januari 2009 23:03
To: Flash Coders List
Subject: Re: [Flashcoders] AS3: Custom
Wow that was the missing piece,
I've just fixed a lot of annoyances in my program :-)
On Sat, Jan 17, 2009 at 1:55 PM, Cor c...@chello.nl wrote:
MyButton.mouseChildren= false;
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
Thank you Cor that was it!
On Sat, Jan 17, 2009 at 1:55 PM, Cor c...@chello.nl wrote:
MyButton.mouseChildren= false;
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Frames aren't objects in memory; they are just concepts. (Key)frames are
simply time markers when actions occur. Some of these actions are authored
as ActionScript code; others are authored graphically, but the latter are
the equivalent of writing addChild() and removeChild() statements to the
Objects removed at any key
frame therefore should be eligible for garbage collection, assuming no event
listeners or other code created a reference to them.
Yes.
Another problem is: even if no listener or code references to these
objects, they continue playing when they are removed by a
@Jason,
Yes, that is the sad truth I was hoping to avoid here. It's just another
argument for adobe developing a built in Frame class.
@Olivier,
While listening for REMOVED_FROM_STAGE is a nice trick, its just one more
listener to remove as part of clean. I'll trust myself to stop, close and
I am looking for an AS3 knob that is close to this:
http://keith-hair.net/blog/examples/niceknobs/
yet is something I can use in the Flash CS4 IDE - a SWC would even be nice
to link up to. The URL above is just an example.
Being able to optionally check + or - movements on 360º revolutions
http://www.bit-101.com/blog/?p=1337
-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Eric E. Dolecki
Sent: Friday, January 16, 2009 11:51 AM
To: Flash Coders List
Subject: [Flashcoders] AS3 Nice Knob(s)
I
...@chattyfig.figleaf.com [mailto:
flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Eric E. Dolecki
Sent: Friday, January 16, 2009 11:51 AM
To: Flash Coders List
Subject: [Flashcoders] AS3 Nice Knob(s)
I am looking for an AS3 knob that is close to this:
http://keith-hair.net/blog/examples/niceknobs/
yet
-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Eric E. Dolecki
Sent: Friday, January 16, 2009 12:17 PM
To: Flash Coders List
Subject: Re: [Flashcoders] AS3 Nice Knob(s)
Thats nice, but it works like a slider (manipulated). Looking
Subject: Re: [Flashcoders] AS3 Nice Knob(s)
Thats nice, but it works like a slider (manipulated). Looking more for a
traditional behaving knob.
On Fri, Jan 16, 2009 at 3:06 PM, Patrick Matte|BLITZ
pma...@blitzagency.com
wrote:
http://www.bit-101.com/blog/?p=1337
realistic but are actually harder to use.
-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com [mailto:
flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Eric E. Dolecki
Sent: Friday, January 16, 2009 12:17 PM
To: Flash Coders List
Subject: Re: [Flashcoders] AS3 Nice Knob
: [Flashcoders] AS3 Nice Knob(s)
Thats nice, but it works like a slider (manipulated). Looking more
for a
traditional behaving knob.
On Fri, Jan 16, 2009 at 3:06 PM, Patrick Matte|BLITZ
pma...@blitzagency.com
wrote:
http://www.bit-101.com/blog/?p=1337
-Original Message-
From
, January 16, 2009 12:17 PM
To: Flash Coders List
Subject: Re: [Flashcoders] AS3 Nice Knob(s)
Thats nice, but it works like a slider (manipulated). Looking more for a
traditional behaving knob.
On Fri, Jan 16, 2009 at 3:06 PM, Patrick Matte|BLITZ pma...@blitzagency.com
wrote:
http
In working with the AS3 DataGrid and assigning a TextFormat object to the
headerTextFormat everything works but the align property. I have assigned a
TextFormatAlign.RIGHT and TextFormatAlign.CENTER constant to the TextFormat
object align property in succession with no luck. Assigning TextFormat
(Please Disregard typo in previous posting)
In working with the AS3 DataGrid and assigning a TextFormat object to the
headerTextFormat everything works but the align property. I have assigned a
TextFormatAlign.RIGHT and TextFormatAlign.CENTER constant to the TextFormat
object align property in
You are asking a key question with AS3. Cleaning up movie clips is *hard*.
There is a list of things that must be done, and they've made it hard to do
all that.
Here's a decent place to start reading:
http://www.gskinner.com/blog/archives/2008/04/failure_to_unlo.html
2009/1/14 Joel Stransky
I've read that before. a couple of times. The question here is what happens
to frames after the playhead leaves, not when Loader.unload() is called. I
wasn't sure if each frame had their own display list or or just one per
timeline. It seems like the sensible thing to do would have been to make a
Hi cool list,
I made a shoutcast streaming mp3-player and I'm having some little problems
with it.
When the stream is playing, the memory slowly builds up (really slowly), and
sometimes jumps up with 6 MB or something. I've read that you can't overcome
this, unless you close the stream and
If you declare target_mc in your Parent class and addChild(target_mc)it does
exist everywhere.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Are you saying display lists are persistent through an entire movieclips
timeline?
On Wed, Jan 14, 2009 at 7:32 AM, Cor c...@chello.nl wrote:
If you declare target_mc in your Parent class and addChild(target_mc)it
does exist everywhere.
___
I know this is old news and most of you have just left timelines and mc's
for dead and moved on. But I'm having a hard time believing AS3 screwed us
this bad. I'm also just now getting hip enough with as3 to understand the
topic.
I've created a little test case involving a parent.swf and a
Hello guys,
I'm struggling with my rotating menu and
have prepared a short test case - please see
http://pastebin.com/m40cf66ec and I'll also
paste the code at the bottom of this mail.
In my rotating menu I'd like to rotate
button like objects in an ellipse.
1) I'd like to stop rotating if the
- Original Message -
From: Alexander Farber alexander.far...@gmail.com
To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Sunday, December 28, 2008 10:13 AM
Subject: Re: [Flashcoders] AS3: Dispatching events to further listeners,but
not to itself
Hello,
may I please
Hello,
may I please rephrase my question,
maybe someone will have a hint for me?
By my PlayingCard objects I'd like to
dispatch 2 events: Event.CHANGE
and MouseEvent.CLICK
I do it because in my game you can
drag cards, but also you can select
them from a list and click a button.
So I could use
I think your event is bubbling.
-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Alexander
Farber
Sent: zondag 28 december 2008 11:14
To: Flash Coders List
Subject: Re: [Flashcoders] AS3: Dispatching events
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Alexander
Farber
Sent: zondag 28 december 2008 11:14
To: Flash Coders List
Subject: Re: [Flashcoders] AS3: Dispatching events to further listeners, but
not to itself
Hello,
may I please rephrase my question,
maybe someone
Mousechildren = false ?
Sent from my iPhone
On 28 Dec 2008, at 10:13, Alexander Farber
alexander.far...@gmail.com wrote:
Hello,
may I please rephrase my question,
maybe someone will have a hint for me?
By my PlayingCard objects I'd like to
dispatch 2 events: Event.CHANGE
and
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
Hello,
I have 2 classes: PlayingCard and PlayingTable.
The PlayingCard listens on MOUSE_UP, DOWN
and MOVE to call startDrag() and stopDrag().
I do not want to introduce custom events,
so I try to subscribe the PlayingTable to
MOUSE_MOVE and MOUSE_UP events
of each PlayingCard, so that the table
apologies if this is a tad vague, but i'm looking for a styling solution in
AS3. We're looking for something that is more along the lines of a style
manager to apply CSS formatting to be used in an MVC framework. if anyone
knows of such tools please advise. thanks.
you might find that using MOUSE_MOVE is a little heavy on the processor as
it can fire multiple times, even within the same frame
it's probably better to use Event.ENTER_FRAME and check for the mouseX and
mouseY and while you're at it, you might as well use the same listener to
move the card
what would you want to style with it?
On Tue, Dec 23, 2008 at 3:59 PM, Jah flash@gmail.com wrote:
apologies if this is a tad vague, but i'm looking for a styling solution in
AS3. We're looking for something that is more along the lines of a style
manager to apply CSS formatting to be
Why not just include the detection logic inside the handlers you already
have?
On Tue, Dec 23, 2008 at 9:52 AM, Alexander Farber
alexander.far...@gmail.com wrote:
Hello,
I have 2 classes: PlayingCard and PlayingTable.
The PlayingCard listens on MOUSE_UP, DOWN
and MOVE to call startDrag()
text in multiple views.
On Tue, Dec 23, 2008 at 12:01 PM, allandt bik-elliott (thefieldcomic.com)
alla...@gmail.com wrote:
what would you want to style with it?
On Tue, Dec 23, 2008 at 3:59 PM, Jah flash@gmail.com wrote:
apologies if this is a tad vague, but i'm looking for a styling
Dear flash coders,
I'm porting a small russian card game from AS2 to AS3
and currently struggle with the problem that the playing
card (which is a sprite) indices (which are TextFields)
do not display cyrillic letters (for jack, queen, king, ace).
The digits (7,8,9,10) are displayed just fine.
Thanks but neither
On Mon, Dec 22, 2008 at 2:18 PM, Cor c...@chello.nl wrote:
Change the indexN_txt.defaultTextFormat = BLACK; into
indexN_txt.setTextFormat(BLACK);
nor
Quick guess: set indexN_txt.embedFonts = true;
right after the ... NewTextField();
have worked for me. I've ended up
- alpha is a number from 0 to 1
- you can also apply the Xscale/,Yscale/ and alpha directyly on the
firstimage Loader
Latcho
William Adams wrote:
I'm trying to create a new project in ActionScript 3 in Flash CS3. I
have the code:
var firstImage:Loader = new Loader();
var
I'm trying to create a new project in ActionScript 3 in Flash CS3. I
have the code:
var firstImage:Loader = new Loader();
var empty_mc:MovieClip=new MovieClip();
var url:URLRequest = new URLRequest();
addChild(firstImage);
url = new URLRequest(test.jpg);
firstImage.load(url);
firstImage.x =
addChild(empty_mc);
-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of William
Adams
Sent: vrijdag 12 december 2008 18:10
To: Flash Coders List
Subject: [Flashcoders] AS3 - load an external graphic
Your empty_mc.addChild(firstImage) is right... what you're missing is
that this line:
addChild(firstImage);
should be:
addChild(empty_mc);
HTH,
Ian
On Fri, Dec 12, 2008 at 5:10 PM, William Adams will.ad...@frycomm.com wrote:
I'm trying to create a new project in ActionScript 3 in Flash
On Dec 12, 2008, at 12:18 PM, Ian Thomas wrote:
Your empty_mc.addChild(firstImage) is right... what you're missing is
that this line:
addChild(firstImage);
should be:
addChild(empty_mc);
Thanks! That's working (now I just need to learn all the differences
like scaleY for _yscale c.)
Thanks! That's working (now I just need to learn all the differences
like scaleY for _yscale c.)
Here's the perfect read and print for you:
http://actionscriptcheatsheet.com/blog/
Click on downloads on the right side and check out the AS3 Migration cheat
sheet.
Jason Merrill
Bank of
Im sure it has to be my fault, otherwise no one would be able to put videos
online, but once a video goes full screen after a few seconds it stops
running.
I can see the following items on the flashlog although I do not make
references to these items on my application.
Warning: Reference to
.
-Original Message-
From: Anthony Pace [mailto:[EMAIL PROTECTED]
Sent: dinsdag 25 november 2008 11:12
To: Cor
Subject: Re: [Flashcoders] as3 image loading and reusing amongst classes.
And listening to events fired by children.
Actually,
I thought I figured it out, and then it stopped working
PROTECTED]
Sent: dinsdag 25 november 2008 16:01
To: Cor; Flash Coders List
Subject: Re: [Flashcoders] as3 image loading and reusing amongst classes.
And listening to events fired by children.
I have done that , put when I pass the function...
newThumbNail(this.imageDataArray[this.imageDataArray.length-1
);
sprite.addChild( new Bitmap( bitmapData ) );
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Anthony Pace
Sent: Tuesday, November 25, 2008 10:42 AM
To: Cor; Flash Coders List
Subject: Re: [Flashcoders] as3 image loading and reusing amongst classes
regards
Cor
-Original Message-
From: Anthony Pace [mailto:[EMAIL PROTECTED]
Sent: dinsdag 25 november 2008 16:42
To: Cor; Flash Coders List
Subject: Re: [Flashcoders] as3 image loading and reusing amongst classes.
And listening to events fired by children.
I can trace out, and attach
Are there restrictions on how far you can traverse downwards to add
children from your class?... it seams I can't go beyond a specific point
I experience very weird display related errors.
Thanks,
Anthony
Anthony Pace wrote:
OMG... I am having the problem again... this time I checked the
OMG... its working again. Is something up with my version of the
player? Is the debugger whacked?
It is doing exactly what I asked it to; yet, it only took my 12 times
recompiling to get it to work... is it the flex SDK? I didn't change
one bit of code; yet, it works all of a sudden.
And just in case someone asks... Yes everything is loading in well as I
can trace to see all the objects and their properties as they are loaded.
well, now I have to figure out how to call a parent function without
having to traverse or go global. JOY
Thanks,
Anthony
Anthony Pace wrote:
AS3, FP9
I am using a substitute mouse cursor, so I use Mouse.hide();
When a user right-clicks, the Mouse is unhidden (good) but then it doesn't
return to the state it was before the context menu was open (unfortunate,
perhaps understandable).
When a user selects an item, I can listen for
5:27 PM
Subject: Re: [Flashcoders] AS3 - Cross Browser Issues
WIN 9,0,124,0 debug
Still does not work in IE. IE6 does throw an alert to continue loading the
content of this page.
On Thu, Nov 13, 2008 at 11:57 AM, Paul Andrews [EMAIL PROTECTED] wrote:
All good for FP 9,0,124,0
head hurts!
SJM
- Original Message -
From: Joel Stransky
To: Flash Coders List
Sent: Thursday, November 13, 2008 5:27 PM
Subject: Re: [Flashcoders] AS3 - Cross Browser Issues
WIN 9,0,124,0 debug
Still does not work in IE. IE6 does throw an alert to continue loading
Hi Guys,
Im having a wired problem with a flash project ive been wroking on for some
time now. The application works fine on my localhost for me but will not work
properly when the client views my localhost.
http://flashdev.dnsalias.org:8081/PartyDelights/pd/
Basically, when the flash loads
Works for me exactly as you describe in both FF2.0 and IE 7.0
- Original Message -
From: FlashDev [EMAIL PROTECTED]
To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Thursday, November 13, 2008 2:26 PM
Subject: [Flashcoders] AS3 - Cross Browser Issues
Hi Guys,
Im having
: Thursday, November 13, 2008 2:56 PM
Subject: Re: [Flashcoders] AS3 - Cross Browser Issues
Works for me exactly as you describe in both FF2.0 and IE 7.0
- Original Message -
From: FlashDev [EMAIL PROTECTED]
To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent
Thanks Paul, i cannot recreate the problem either! I dont know what to do!
- Original Message -
From: Paul Andrews
To: Flash Coders List
Sent: Thursday, November 13, 2008 2:56 PM
Subject: Re: [Flashcoders] AS3 - Cross Browser Issues
Works for me exactly as you describe
Andrews To: Flash Coders List
Sent: Thursday, November 13, 2008 2:56 PM
Subject: Re: [Flashcoders] AS3 - Cross Browser Issues
Works for me exactly as you describe in both FF2.0 and IE 7.0
- Original Message - From: FlashDev [EMAIL PROTECTED]
To: Flash Coders List flashcoders
Maybe a Flash 10 issue? I'm still using FP9.
Paul
- Original Message -
From: Glen Pike [EMAIL PROTECTED]
To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Thursday, November 13, 2008 3:23 PM
Subject: Re: [Flashcoders] AS3 - Cross Browser Issues
I was okay too - I would
Hey Glen
I just cant understand why now after months of development this problem has
occurred!
It was working fine untill a week or so ago!
- Original Message -
From: Glen Pike
To: Flash Coders List
Sent: Thursday, November 13, 2008 3:23 PM
Subject: Re: [Flashcoders] AS3
on 10,0,2,54
- Original Message -
From: Joel Stransky
To: Flash Coders List
Sent: Thursday, November 13, 2008 4:19 PM
Subject: Re: [Flashcoders] AS3 - Cross Browser Issues
You can always get a stand alone version of IE6 here.
http://browsers.evolt.org/?ie/32bit/standalone
All good for FP 9,0,124,0
Paul
- Original Message -
From: FlashDev [EMAIL PROTECTED]
To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Thursday, November 13, 2008 4:37 PM
Subject: Re: [Flashcoders] AS3 - Cross Browser Issues
The white image is directly underneath the blue
Coders List flashcoders@chattyfig.figleaf.com
Sent: Thursday, November 13, 2008 4:37 PM
Subject: Re: [Flashcoders] AS3 - Cross Browser Issues
The white image is directly underneath the blue image, you will have ot
click and drag the image to see the white one!
I have IE 5, 5.5, 6 7
I need to place project-titles in a multiline textfield, wherof the
width will be fixed, but sometimes this box might be of less height
because of more space used by other displaying project elements.
Is there a class that can dynamically regulate the font it's size to fit
the loaded text to a
Sounds like a bad design decision to make titles of the same category
various sizes. But I think you can just set the .width property, then set
the .scaleY equal to the .scaleX or visa versa depending on which dimension
is more important.
On Wed, Nov 12, 2008 at 9:40 AM, Latcho [EMAIL PROTECTED]
I'm talking about font size, not stretching a container.
Increasing / decreasing font size to get an optimal fill of a box which
will have a fixed width and a certain height which can only be
determined during load time.
I could increase the font size of a textfield in a loop and measure it's
Is there an important distinction between scaling a TextField object and
changing the font size? Perhaps you are storing the formatting or there are
visual rendering implications or anything?? Otherwise, it seems like Joel's
solution would work nicely to achieve what you want.
-jonathan
On Wed,
Hi Joel, Jonathan anf Dave for your answers
Dave could you explain what you mean with a binary search ?
Stijn
David Hershberger wrote:
Text flow of variable-width fonts with word-wrapping is inherently
messy... there's no way to compute the number of lines with some nice
math, you just have
Joel, Jonathan and Dave: thanks for your answers
Dave could you explain what you mean with a binary search ? I haven't
got a clue.
Stijn
David Hershberger wrote:
Text flow of variable-width fonts with word-wrapping is inherently
messy... there's no way to compute the number of lines with
No problem.
A binary search is an order log(N) method for finding something in an
ordered list of elements, as compared to linear search, which is order N.
(N is the number of elements, in this case, font sizes you are willing to
use.)
You have a sequence of font sizes. For each size, it either
The distinction is that wordwrapping should be optimal, as you know when
you increase / decrease a fontsize, the wordwrapping changes.
jonathan howe wrote:
Is there an important distinction between scaling a TextField object and
changing the font size? Perhaps you are storing the formatting or
Text flow of variable-width fonts with word-wrapping is inherently messy...
there's no way to compute the number of lines with some nice math, you just
have to run the text-flow machinery and measure the result, which is exactly
what you have suggested. I'm pretty certain there is nothing built
Hi guys,
I am working on a mp3 player that receives a javascript call with the
name of the file to be loaded. On the first call from JS, it plays
fine, but if another file is selected it fails. It only works once, in
other words. I tried putting the new Sound() and new SoundChannel()
Hi List,
As an anxious AS2 developer, I was wondering if anyone could recommend an
AS3 training course in Sydney (Australia). So far, I have come across this
course at Dynamic Web Training -
http://www.dynamicwebtraining.com.au/courses/flash-training-3.htm - but was
wondering if there were others
I did a course with this company years ago (2004 I think it was) and it was
great. Linda was my trainer and she did a great job at answering questions
for different levels of people in the room from advanced to beginners. I
remember researching before I did the course and someone mentioned to me
There are 5 conditions in dealing with deep links and swfaddress seems to
only have focused on one. Internally you need to evaluate your condition
(previous location vs. new location) and communicate (or not at all) with
swfaddress accordingly. One of those conditions is starting at home, another
This does happen in swfaddress -- in the setValue method:
if (SWFAddress._value == value) return;
Which makes it all the more odd to me that it would go home (using /)
twice.
JASON VAN PELT • SENIOR INTERACTIVE DEVELOPER
PETER A MAYER ADVERTISING
324 CAMP ST • NEW ORLEANS, LA 70130
TEL
Sorry it's been a while since I messed with it. If I remember correctly, the
javascript tries to start things off when flash should be the only one
initializing anything. I rigged swfaddress into a PureMVC page a while back
and it took some serious hacking to get it to leave the home page alone. I
Ok, I think I've found the answer in the javascript... if you're using the
readable version of SWFAddress 2.1 In...
this.setValue = function(value) {
the line
if (value == '/') value = '';
changes the slash to an empty string. I presume what's happening is the
value gets changed
I can also look into the issue if you can provide a simple test case.
Best,
Rostislav
Asual - Open software that pushes the limits
http://www.asual.com/
On Sat, Nov 8, 2008 at 2:09 AM, Jason Van Pelt [EMAIL PROTECTED] wrote:
Hello all,
I'm using swfaddress and puremvc on a site that is about 90% done.
Everything works well in the Flash IDE and in the browser with one
exception -- I have a home button that navigates to / using swfaddress.
However, ONLY in the browser the SWFAddressEvent is fired twice. If I
replace /
Hi I had this issue a couple of years ago too. It's hard for me to
remember exactly, but I believe that I changed the onChange function to
simply set a variable with the page name, instead of calling the page
event immediately -- and then used a different event to read the set
variable when it
Hi Steven,
Thanks for the explanation.
If you mean Moock's Essential Actionscript, I've had a read of that
section and AFAICS it doesn't mention a bug.
The only real issue I know of in try/catch do with return is that
you shouldn't put a return in a finally clause, because finally gets
AM
To: Flash Coders List
Subject: Re: [Flashcoders] AS3 - Checking if a Function Exists
Hi Steven,
Thanks for the explanation.
If you mean Moock's Essential Actionscript, I've had a read of that
section and AFAICS it doesn't mention a bug.
The only real issue I know of in try/catch do
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
I'm afraid I don't think either Han's or Steven's solutions work in
AS3 - you'd still get a ReferenceError (unless currentSection is
dynamic).
I'd do it using flash.utils.describeType, like so:
import flash.utils.describeType;
:
var desc:XML=flash.utils.describeType(currentSection);
if
Or, thinking about it, you could catch the reference error in a
try/catch block. It's more of a kludge, but might give you much higher
performance!
Ian
On Tue, Oct 28, 2008 at 8:33 AM, Ian Thomas [EMAIL PROTECTED] wrote:
I'm afraid I don't think either Han's or Steven's solutions work in
AS3 -
Method:
public static function refExists(obj:Object,name:String):Boolean
{
try
{
if (obj[name]!=null)
return true;
}
catch (e:ReferenceError) {}
return false;
}
HTH,
Ian
On Tue, Oct 28, 2008 at 8:36 AM, Ian
This is great - thank you
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas
Sent: 28 October 2008 08:46
To: Flash Coders List
Subject: Re: [Flashcoders] AS3 - Checking if a Function Exists
Method:
public static function refExists
28, 2008 at 2:13 PM, Karim Beyrouti [EMAIL PROTECTED] wrote:
This is great - thank you
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas
Sent: 28 October 2008 08:46
To: Flash Coders List
Subject: Re: [Flashcoders] AS3 - Checking
It's normal behavior for AS3. In fact, there is no Associative Array
in AS3 (that's a PHP term and convention).
You'd want to look into using a Dictionary object or iterating over a
dynamic object:
var foo:Object ={item1: val, item2: val};
var count:int = 0;
for (var bar:* in foo) {
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;
}
- Original Message -
From: Steven Sacks [EMAIL PROTECTED]
To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, October 29, 2008 2:20 AM
Subject: Re: [Flashcoders] AS3 - Checking if a Function Exists
Do not call return in a try catch.
Are you suggesting
Hey guys,
I need a little help here... I'm working on porting some existing AS2 code
to AS3. A porting of the AS2 class watched _root variables which were
updated by javascript (using setVariable) - When a change occurred the
callback method would change instance properties, fire events etc etc...
Hi,
I use an array to store object with their name like that:
views[ viewName ] = Object
then views.length return 0
...
It's normal behaviour ?? length work only on numerical indexes ?
L
___
Flashcoders mailing list
Message -
From: laurent [EMAIL PROTECTED]
To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Monday, October 27, 2008 1:35 PM
Subject: [Flashcoders] AS3 associativ array length=0
Hi,
I use an array to store object with their name like that:
views[ viewName ] = Object
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 ) {
currentSection.refresh();
}
/code
But I get ReferenceError: Error #1069: Property
The ethos of AS3 is that instead of watching something, you indeed setup
events that are fired when they change. So instead you just do an
.addEventListener() to the object created.
Each object type has particular events it can fire. A LoaderInfo class
dispatches complete, httpStatus, init,
401 - 500 of 1482 matches
Mail list logo