Re: [Flashcoders] small code question

2006-01-26 Thread Morten Barklund Shockwaved
Fumio Nonaka wrote: Using new Number is... silly. The Number-object is quite useless and can't be used for anything, that a regular number can't. Use normal numbers and use numbers: The Number object can have a property, which a regular number can't. I don't know if it is useful, though. I

Re: [Flashcoders] getting the name of an object

2006-01-23 Thread Morten Barklund Shockwaved
Sascha Balkau wrote: Ok but it there a way to get the name of the variable that is reffering to the object? First I thought eval() could be used for that but it seems not. There is no one variable holding the name of an object. If your idea is something along a trace-function: function

Re: [Flashcoders] Can't redefine class method

2006-01-16 Thread Morten Barklund Shockwaved
Hi, i've had a look with flasm, it explicitly calls A.dothis() in A.doit. writing this.dothis() isn't possible because it's a static function -- there is no object this could refer to. there is, as far as i know, nothing you can do about it except to work around it by either cutting'n'pasting

Re: [Flashcoders] XML GALLERY

2005-12-20 Thread Morten Barklund Shockwaved
Jose Maria Barros wrote: Hello! Im trying to do a portfolio gallery with a grid and small thumbnails with xml. I ve been doing some tutorials to help me..but this thing doesnt work. [snip] The xml file is made correctly and the path for the images is link=imagens/somepic.jpg The problem

Re: [Flashcoders] Array like access to custom class?

2005-12-20 Thread Morten Barklund Shockwaved
Dan Thomas wrote: Can I provide array like access to a custom collection object? E.g. Class MyClass { private var myArray:Array; public function getArray():Array { return this.myArray; } } [snip] How can I change it so I can achieve

Re: [Flashcoders] Array like access to custom class?

2005-12-20 Thread Morten Barklund Shockwaved
someClass.elem(0) = myObj; Nope - of course not. elem is a function - you can't use it that way. You can do anything you like, though. Create your own function for instance: someClass.setElem(0, myObj); Or a general addElem, that doesn't take a position argument but just pushes to the end:

Re: [Flashcoders] Out of curiosity, XPath and String Datatype Oddity

2005-12-20 Thread Morten Barklund Shockwaved
Mike Boutin wrote: Doesnt XPath.selectNodes(myxml, pathtocontent/text()); return the text value as well? The documentation says, that selectNodes *always* returns an array of XMLNode-objects - and it does. Always. The text()-syntax is only used to get the XMLNode representing a text node -

Re: [Flashcoders] double byte character sets

2005-12-15 Thread Morten Barklund Shockwaved
nik crosina wrote: Has anybody worked with Flash and double byte (e.g. chinese) characters sets? Or is that a non issue in Flash. We are having to convert a Director application into a fully unicoded Flash version (the missing unicdoe implementation of Director being the main reason for this).

Re: [Flashcoders] can't remove a clip attached to root???

2005-12-14 Thread Morten Barklund Shockwaved
Jason Rayles wrote: Is there a reason that a movie clip attached to _root cannot be removed using removeMovieClip? If _root.getNextHighestDepth() returns a negative value, then you cannot remove the movieclip unless you swap it up to some positive depth. I'm not sure, but that might be it.

Re: [Flashcoders] alpha -= 10 = wtf

2005-12-14 Thread Morten Barklund Shockwaved
Jason Rayles wrote: Has this been discussed? Flash player 8 trace(this._alpha); this._alpha -= 10; trace(this._alpha); Output: 100 89.84375 Yup, alpha is stored internally as values dividable by 100/256. Thus the value upon setting will be rounded to the nearest legal value. Use another

Re: [Flashcoders] Xpath and HTML tags inside XML bug?

2005-12-07 Thread Morten Barklund Shockwaved
Mike Boutin wrote: Still wasnt able to get it working. I had to resort to using nodeValue instead. pain in the ass Why is it a workaround? Doesn't the XPath return the XMLNode? You can't just use the regular toString-method of the XMLNode-object - that'll return the wrong encoding. The

Re: [Flashcoders] Xpath and HTML tags inside XML bug?

2005-12-07 Thread Morten Barklund Shockwaved
Mike Boutin wrote: even in this case the result is undefined string = XPath.selectNodes(my_xml, /pathto[1]/xml).nodeValue; I've just gotten the libraries, and it is exactly as I expected. selectNodes returns an Array of XMLNode-objects. Even the notion of /text() is just to get the node,

[Flashcoders] Compiler bug when extending MovieClip and calling super-function in subclass constructor

2005-11-29 Thread Morten Barklund Shockwaved
Hi, I believe, that I've found a bug in the Flash 8 compiler. Just for the facts: I have Flash 8 Professional (English edition) for Windows XP - no other version number, as far as I can see. The bug is, that the compiler will result in a missing pop-operation thus leaving an extra item on

Re: [Flashcoders] Is Not a Number

2005-10-31 Thread Morten Barklund Shockwaved
Martin Klasson wrote: Run this, once in flash player6-setting, and one time in 7/8, both compiled with as2. The Strong-typing of the parameter doesn't affect the result. But how come this is so indifferent results, was perhaps the output of flsahplayer6 wrong accordingly to ecma?

Re: [Flashcoders] Newbie AS3 question

2005-10-31 Thread Morten Barklund Shockwaved
Andreas Rønning wrote: [snip] *Yawn* here we go again, another new guy trying to understand this OBVIOUS concept that we've been through so many times already. I can't believe he's bothering us with this again! [snip] Sorry, I was in a bad mood due to other circumstances, had just