Re: [Flashcoders] removeChild - targeting question

2008-04-01 Thread Forrest Maready
Steven said "event.currentTarget" Leandro said "emitter.parent" Thanks guys! I think the removeChild is working below (event.currentTarget), but now I'm getting the "Cannot access property or method of a null object reference" which is usually what happens when the EventListener is calling a non-e

Re: [Flashcoders] removeChild - targeting question

2008-04-01 Thread Leandro Ferreira
emitter.parent? Leandro Ferreira On 4/1/08, Forrest Maready <[EMAIL PROTECTED]> wrote: > > The code below has a problem. The line within the removeDead function > is supposed to removeChild on the emitter object. > I can't for the life of me figure out what the path is- is it > event.tar

Re: [Flashcoders] removeChild - targeting question

2008-04-01 Thread Steven Sacks
try event.currentTarget ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

[Flashcoders] removeChild - targeting question

2008-04-01 Thread Forrest Maready
The code below has a problem. The line within the removeDead function is supposed to removeChild on the emitter object. I can't for the life of me figure out what the path is- is it event.target.parent.removeChild(event.target) or is it parent.removeChild( event.target) or what? I've tried eve

Re: [Flashcoders] Interfaces

2008-04-01 Thread Muzak
Have the panel with the button dispatch an event to which the parent (main) listens, The listener then takes care of things (like moving the panel). Interfaces have nothing to do with this. regards, Muzak - Original Message - From: "Omar Fouad" <[EMAIL PROTECTED]> To: "Flash Coders L

Re: [Flashcoders] Interfaces

2008-04-01 Thread Omar Fouad
Well, the example in the blog explained it a lot, though it is in Actionscript 2.0. And yes, I wont need Interfaces unless I really feel like I HAVE to use them. In my project I have some Panels (screens) in the fla Library and each one of them is linked to a Class (linkage). Each class or Panel e

Re: [Flashcoders] An error I cant iron out...

2008-04-01 Thread Glen Pike
It might happen if you are doing things inside the class that the IDE does not "support" - there are lots of things on the internet about this. Many of them seem to be because people are using [Embed] (this does not work with the IDE), but it could be something similar: http://www.google.co.u

Re: [Flashcoders] Interfaces

2008-04-01 Thread Muzak
If you're the only person working on a project, interfaces can be less useful unless you know how to use them well. Putting them in just to put them in serves no purpose other than bloating your code. But, sometimes you need to do that in order to figure them out. I'd even go as far as s

Re: [Flashcoders] Interfaces

2008-04-01 Thread robert
On Apr 1, 2008, at 1:19 PM, Omar Fouad wrote: list, I've been reading tons of books and I still can't get the concept of Interfaces. Can someone explain it with an easy example for me? Help will be really appreciated. This guy's example gave me a good foothold. Maybe it will help: http://la

Re: [Flashcoders] Interfaces

2008-04-01 Thread Steven Sacks
Interfaces can do much more than just help multiple coders stay on track. In Actionscript 3, they can be used to mimic multiple inheritance, decrease file size of loaded swfs, and clarify your own code. Interfaces are simple, but understanding Interfaces and how and when to use them takes a b

Re: [Flashcoders] using scrollRect and the width / height properties in AS3 F9 - weirdness

2008-04-01 Thread John Eriksson
This code is about the width and height properties not getting changed until some time in the future (perhaps one frame ahead or a few ms ahead) when setting a scrollRect. This causes all kinds of problems. The code was very very simple, just to show that the values are not immediately changed when

Re: [Flashcoders] Interfaces

2008-04-01 Thread EECOLOR
An interface is used to make sure your code is not tightly coupled. Instead of saying which class should be given, you say which interface should be given. This means that a developer has more freedom to implement his own version of an interface. Lets say you make a person interface called IPerson

RE: [Flashcoders] Interfaces

2008-04-01 Thread Merrill, Jason
>>Yeah, but I've read that a Class that implements an interface >>an call function from other classes that allready extends >>other Classes. >>it's like a multiple inheritance. But how can I achieve it? I don't quite follow what the issue is, but don't confuse inheritance with implements. Do yo

Re: [Flashcoders] Interfaces

2008-04-01 Thread Omar Fouad
Yeah, but I've read that a Class that implements an interface an call function from other classes that allready extends other Classes. it's like a multiple inheritance. But how can I achieve it? On Tue, Apr 1, 2008 at 10:30 PM, Merrill, Jason < [EMAIL PROTECTED]> wrote: > >>I've been reading tons

Re: [Flashcoders] Multiple SWFs (50) in one html page dramaticly increase memory ?

2008-04-01 Thread Bob Wohl
Are you saying that you are loading 50 images into 1 swf? OR 50 images into 50 swfs and loading those into 1 swf? OR 50 swfs embeded into a browser? On Tue, Apr 1, 2008 at 8:08 AM, Flap Flap <[EMAIL PROTECTED]> wrote: > Hi there, > > We have a php dev here that have embed a simple swf in a ph

RE: [Flashcoders] Interfaces

2008-04-01 Thread Merrill, Jason
>>I've been reading tons of books and I still can't get the >>concept of Interfaces. It's actually very very simple. An interface is just a special class that sets the rules of other classes. So an interface doesn't do anything in your application, it just helps the coder(s) to make sure they w

[Flashcoders] Interfaces

2008-04-01 Thread Omar Fouad
list, I've been reading tons of books and I still can't get the concept of Interfaces. Can someone explain it with an easy example for me? Help will be really appreciated. -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the i

RE: [Flashcoders] AS3 MouseEvent target?

2008-04-01 Thread Merrill, Jason
Well, you still haven't convinced me it isn't kludy, but no bother your perspective - my perspective - both different, doesn't matter in the end. :) Jason Merrill Bank of America GT&O and Risk L&LD Solutions Design & Development eTools & Multimedia Bank of America Flash Platform Develope

Re: [Flashcoders] books for flash programming

2008-04-01 Thread Alan MacDougall
On 3/24/08, Naveen Bhaskar <[EMAIL PROTECTED]> wrote: Hi, I am a flash designer and I am in intermediate in programming.(AS2). anybody pls tellme what are the good books I can refer. And remember, just learning Actionscript in particular will not teach you programming in general. J

Re: [Flashcoders] using scrollRect and the width / height properties in AS3 F9 - weirdness

2008-04-01 Thread Pedro Kostelec
I don't get your problem. What is this code about? It has no scrollbar??!! If you want to refresh the stage faster (using a timer) just add t.updateAfterEvent(); On Tue, Apr 1, 2008 at 8:26 PM, John Axel Eriksson <[EMAIL PROTECTED]> wrote: > Hi. > > > I'm building a simple scrollbar and a scrollc

Re: [Flashcoders] AS3 MouseEvent target?

2008-04-01 Thread Steven Sacks
Extending DisplayObject to access some of its native functionality (e.g. event bubbling) seems fine to me, especially if you look at it from the perspective of EventDispatcher has events and DisplayObject extends EventDispatcher and adds bubbling functionality. If you need bubbling, extend the

[Flashcoders] An error I cant iron out...

2008-04-01 Thread Patrick Jakub Jankun
Hello everyone, I have a issue with an error I cant get rid off: TypeError: Error #1007: Instantiation attempted on a non-constructor. Strange thing is, it occurs only when I try to compile with Flash IDE as Document class, It¹s not there when I compile it through Linux free command line compiler

RE: [Flashcoders] AS3 MouseEvent target?

2008-04-01 Thread Merrill, Jason
>>I don't necessary see extending DisplayObject as a hack. >>It's creative leveraging of AS3's native architecture. Extending a display object to get the event bubbling of for a non-visual class - if not a hack, then it's certainly kludgy. Jason Merrill Bank of America GT&O and Risk L&LD So

Re: [Flashcoders] TextFieldAutoSize [AS3]

2008-04-01 Thread EECOLOR
Indeed, if you set the width of a TextField and autoSize to LEFT, it will automatically resize only the height. Greetz Erik On 4/1/08, Andrew Murphy <[EMAIL PROTECTED]> wrote: > > You can also do it like this: > > var tf:TextField = new TextField(); > with(tf){ > autoSize = TextFieldAut

[Flashcoders] using scrollRect and the width / height properties in AS3 F9 - weirdness

2008-04-01 Thread John Axel Eriksson
Hi. I'm building a simple scrollbar and a scrollcontent class. I'm using these in dialogs among other things. These dialogs draw a frame around their content based on the contents width and height + a margin (to describe it simply). I've not had any problems with this until I started using

Re: [Flashcoders] AS2 SOAP web service

2008-04-01 Thread Gert-Jan van der Wel
No, they're not on the same domain. I thought that you only needed a crossdomain.xml when communicating between swf's. Do you also need one with web services? Gert-Jan 2008/4/1, Kevin Newman <[EMAIL PROTECTED]>: > > Is the posted swf and the webservice on the same servers (url)? > > If not, you m

RE: [Flashcoders] TextFieldAutoSize [AS3]

2008-04-01 Thread Andrew Murphy
You can also do it like this: var tf:TextField = new TextField(); with(tf){ autoSize = TextFieldAutoSize.LEFT; wordWrap = true; // width wordWrap set to true it autosizes // the height to fit the text w = 300; text = "Blahblahblah yac

Re: [Flashcoders] AS3 MouseEvent target?

2008-04-01 Thread Steven Sacks
I don't necessary see extending DisplayObject as a hack. It's creative leveraging of AS3's native architecture. :) Merrill, Jason wrote: I think that's because only display objects can bubble events, I don't think non-visual classes can bubble events (unless they extend a display object lik

Re: [Flashcoders] AS2 SOAP web service

2008-04-01 Thread Kevin Newman
Is the posted swf and the webservice on the same servers (url)? If not, you may have a crossdomain.xml policy issue. Kevin N. Gert-Jan van der Wel wrote: Thanks for your suggestion, but it doesn't seem to work... Gert-Jan 2008/4/1, Jason Van Cleave <[EMAIL PROTECTED]>: you can try and

Re: [Flashcoders] TextFieldAutoSize [AS3]

2008-04-01 Thread Stuart (FunkDaWeb)
Worked like a charm many thanks! :o) SM ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] TextFieldAutoSize [AS3]

2008-04-01 Thread Cedric Muller
very sketchy idea: var txtHeight:Number = txtField.textHeight + 4;// (see Flash docs for further information on how text is laidout in a TextField object) txtField.height = txtHeight; hth, Cedric Hi All Is there any way to autosize the height of a textfield only? I want to manually set t

[Flashcoders] TextFieldAutoSize [AS3]

2008-04-01 Thread Stuart (FunkDaWeb)
Hi All Is there any way to autosize the height of a textfield only? I want to manually set the width of a dynamic textbox but have the user increase the size of the text via a button. I currently have it working how i need but the textbox cuts off the bottom of the text when its bigger than the

Re: [Flashcoders] Root casting as Main big problem [solved]

2008-04-01 Thread laurent
yes! var mcRoot:MovieClip = MovieClip( root ).parent.parent as MovieClip; finaly got it right, as natural as it has to be the MovieClip( root ) point to the root of the mc your calling it from. Then you have to go through the parents till you find the root1. Thanks so much for the MovieCLip c

[Flashcoders] Multiple SWFs (50) in one html page dramaticly increase memory ?

2008-04-01 Thread Flap Flap
Hi there, We have a php dev here that have embed a simple swf in a php file that show search result. Each result line show an image with an effect so the image is loaded by a swf. When we make a test with 50 line of result, the memory of the browser raise up of 50 Mo... Even if the swf is empty of

RE: [Flashcoders] AS3 MouseEvent target?

2008-04-01 Thread Merrill, Jason
>>the problem with most explanations about event bubbling is >>that it concentrates on the displaylist (understandable), i'd >>like to see an example of custom events being bubbled. I think that's because only display objects can bubble events, I don't think non-visual classes can bubble events

RE: [Flashcoders] Re: How to take screenshot of sites , as seen on snap.com

2008-04-01 Thread Merrill, Jason
I'll second Snagit - it's awesome and doeswhat Vlado describes. Has a ton of other features too - best capture utility out there IMO. Jason Merrill Bank of America GT&O and Risk L&LD Solutions Design & Development eTools & Multimedia Bank of America Flash Platform Developer Community Are y

Re: [Flashcoders] AS3 MouseEvent target?

2008-04-01 Thread Meinte van't Kruis
the problem with most explanations about event bubbling is that it concentrates on the displaylist (understandable), i'd like to see an example of custom events being bubbled. Though Steven's probably right, playing with it helps alot. On Tue, Apr 1, 2008 at 12:49 PM, Allandt Bik-Elliott (Receptac

Re: [Flashcoders] AS2 SOAP web service

2008-04-01 Thread Hans Wichman
hi, creating a webservice is asynchronous, at least in as2, you will have to wait for the creation to complete. That probably doesnt solve your problem ,but is a prerequisite anyway greetz JC On Tue, Apr 1, 2008 at 11:46 AM, Gert-Jan van der Wel <[EMAIL PROTECTED]> wrote: > Thanks for your sugges

Re: [Flashcoders] Some feedback on a coding design question

2008-04-01 Thread Raymond Simmons
Jiri, Sounds like the state pattern would be helpful here. Define a class for each state of the application. Each class will contain methods for actions the user can take in that state, like selectListItem. When the user takes the given action (ex., selecting a list item), the associated fu

Re: [Flashcoders] Re: How to take screenshot of sites , as seen on snap.com

2008-04-01 Thread Vlado Krempl
Hi there, Another great tool to take snaps of your websites is to use "snagit". http://www.snagit.com Hope that helps, vlado krempl sydney, australia - Original Message - From: "Digg Yeah" <[EMAIL PROTECTED]> To: "Flash Coders List" Sent: Tuesday, April 01, 2008 5:01 PM Subject: R

Re: [Flashcoders] AS3 MouseEvent target?

2008-04-01 Thread Allandt Bik-Elliott (Receptacle)
thanks Jiri i've just got the design patterns book so i'll be digging into that at some point in the near future a On 1 Apr 2008, at 10:40, Jiri Heitlager wrote: I think the best way to learn about Event Bubbling is understanding the Composite desing pattern. This is the pattern the Displ

[Flashcoders] Some feedback on a coding design question

2008-04-01 Thread Jiri Heitlager
Hello List, I am currently building an application that uses panels. The Panels implement a Composite Pattern. The panel holds instances of panelButtonSets class. The panel displays certain sets based on a selected item in the client code. Now my question is, how do I get around a lot of if s

[Flashcoders] some dying logic ...

2008-04-01 Thread Cedric Muller
Hello, I did develop a global process, in which my customized objects do have a 'die' method which is called in the end of an object's life in order to clean *everything* (like removing internal movieclips, sprites, listeners, timers, ..) this is what I came up with: the following block c

Re: [Flashcoders] AS3 MouseEvent target?

2008-04-01 Thread Jiri Heitlager
I think the best way to learn about Event Bubbling is understanding the Composite desing pattern. This is the pattern the DisplayList is implementing and bubbling will make much more sense when you understand the workings of the Composite Pattern. At least it did for me. Jiri Steven Sacks wro

Re: [Flashcoders] AS2 SOAP web service

2008-04-01 Thread Gert-Jan van der Wel
Thanks for your suggestion, but it doesn't seem to work... Gert-Jan 2008/4/1, Jason Van Cleave <[EMAIL PROTECTED]>: > > you can try and authenticate before you go to the page or hardcode your > user/pass like > > var url:String = http://user:[EMAIL PROTECTED]; > > > On Mon, Mar 31, 2008 at 11:32

Re: [Flashcoders] AS3 MouseEvent target?

2008-04-01 Thread Allandt Bik-Elliott (Receptacle)
ah yes - i couldn't get the mouseChildren to work before when i had drawn in the movieclip but now i've separated the container movieclip from the drawn-in shape, it' s working thanks for your help guys here's a copy of my code in case anyone else is interested: CODE // on xm

Re: [Flashcoders] AS2 SOAP web service

2008-04-01 Thread Jason Van Cleave
you can try and authenticate before you go to the page or hardcode your user/pass like var url:String = http://user:[EMAIL PROTECTED]; On Mon, Mar 31, 2008 at 11:32 AM, Gert-Jan van der Wel < [EMAIL PROTECTED]> wrote: > Hi everybody, > > I'm having some trouble with connecting to a SOAP web serv