Re: [Flashcoders] addEventListener - repeat function call

2010-04-23 Thread Henrik Andersson
Merrill, Jason wrote: Yes, although he says in that post, "So I'm not saying it's a bad thing [to use the Timer class], just realize that timers are susceptible to being slowed down by intensive code and slow CPUs, just like enterFrame is." There is also the fact that no matter how accurate t

RE: [Flashcoders] addEventListener - repeat function call

2010-04-23 Thread Merrill, Jason
..@chattyfig.figleaf.com] On Behalf Of Matt S. Sent: Friday, April 23, 2010 2:53 PM To: Flash Coders List Subject: Re: [Flashcoders] addEventListener - repeat function call Although its not as accurate as is sometimes believed: Programming with Timers: Don't be fooled. http://www.bit-101.co

Re: [Flashcoders] addEventListener - repeat function call

2010-04-23 Thread Matt S.
Although its not as accurate as is sometimes believed: Programming with Timers: Don’t be fooled. http://www.bit-101.com/blog/?p=910 On Fri, Apr 23, 2010 at 2:21 PM, Merrill, Jason wrote: > I would recommend using the Timer class instead of the EnterFrame event.   > Timer gives you more control,

RE: [Flashcoders] addEventListener - repeat function call

2010-04-23 Thread Merrill, Jason
List Subject: Re: [Flashcoders] addEventListener - repeat function call Hello :) you can try MouseEvent.MOUSE_MOVE or you can use Event.ENTER_FRAME, you run the enterFrame in the mouseOver event and you stop it with the mouseOut. EKA+ :) 2010/4/23 Lehr, Theodore > How can I have a function ca

RE: [Flashcoders] addEventListener - repeat function call

2010-04-23 Thread Lehr, Theodore
Thanks! From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of ekameleon [ekamel...@gmail.com] Sent: Friday, April 23, 2010 1:41 PM To: Flash Coders List Subject: Re: [Flashcoders] addEventListener

Re: [Flashcoders] addEventListener - repeat function call

2010-04-23 Thread ekameleon
Hello :) you can try MouseEvent.MOUSE_MOVE or you can use Event.ENTER_FRAME, you run the enterFrame in the mouseOver event and you stop it with the mouseOut. EKA+ :) 2010/4/23 Lehr, Theodore > How can I have a function called as long as MOUSE_OVER > > I am trynig: > > bn1.addventListener(Mouse

Re: [Flashcoders] addEventListener - repeat function call

2010-04-23 Thread Matt S.
bn1.addEventListener(MouseEvent.MOUSE_OVER,funcOver); bn1.addEventListener(MouseEvent.MOUSE_OUT,funcOut); function funcOver(e:MouseEvent) { trace(e.target.name); bn1.addEventListener(Event.ENTER_FRAME,func,false,0,true); } function funcOut(e:MouseEvent) { trace(e.target.name); bn1.re

[Flashcoders] addEventListener - repeat function call

2010-04-23 Thread Lehr, Theodore
How can I have a function called as long as MOUSE_OVER I am trynig: bn1.addventListener(MouseEvent.MOUSE_OVER,func); function func(e:Event) { trace(e.target.name); } I would like it to fire off as long as the mouse is over ___ Flashcoders mail

Re: [Flashcoders] addEventListener Problem

2010-03-02 Thread Susan Day
On Tue, Mar 2, 2010 at 9:58 AM, Susan Day wrote: > On Tue, Mar 2, 2010 at 9:47 AM, Geografiek wrote: > >> Hi Susan, >> >> Didn't you attach that url in DisplayPicLoaded in the line >> displayObject.url = myURLs[countRounds];? >> > > No. I attached jpgs. > > >> Error 1119 has to do with referring

Re: [Flashcoders] addEventListener Problem

2010-03-02 Thread Susan Day
On Tue, Mar 2, 2010 at 9:47 AM, Geografiek wrote: > Hi Susan, > Didn't you attach that url in DisplayPicLoaded in the line > displayObject.url = myURLs[countRounds];? > No. I attached jpgs. > Error 1119 has to do with referring to a non-existent property. Do you know > which? > Yes. url. >

Re: [Flashcoders] addEventListener Problem

2010-03-02 Thread Geografiek
Hi Susan, Didn't you attach that url in DisplayPicLoaded in the line displayObject.url = myURLs[countRounds];? Error 1119 has to do with referring to a non-existent property. Do you know which? Tracing is your friend here I would say. To be honest I don't know if the Navigate.to line is corre

Re: [Flashcoders] addEventListener Problem

2010-03-02 Thread Susan Day
On Tue, Mar 2, 2010 at 9:15 AM, Geografiek wrote: > Hi Susan, > In DisplayPicLoaded you add displayObject as a child of container. > So in navToURL you can reference it as e.currentTarget.displayObject > Half-way there. I now have this code: function DisplayPicLoaded(evt:Event):void { var conta

Re: [Flashcoders] addEventListener Problem

2010-03-02 Thread Geografiek
Hi Susan, In DisplayPicLoaded you add displayObject as a child of container. So in navToURL you can reference it as e.currentTarget.displayObject HTH Willem van den Goorbergh On 2-mrt-2010, at 13:59, Susan Day wrote: 2010/3/1 Beatrix Krümmer-Frau Did you check the spelling? Thank you all.

Re: [Flashcoders] addEventListener Problem

2010-03-02 Thread Susan Day
2010/3/1 Beatrix Krümmer-Frau > Did you check the spelling? > Thank you all. Yes, yesterday's lesson was brought to me by the letter 'N' lol. Today's lesson is different. Here's my code: function DisplayPicLoaded(evt:Event):void { var container:Sprite = new Sprite(); var myXArray:Array = new Ar

Re: [Flashcoders] addEventListener Problem

2010-03-01 Thread Nathan Mynarcik
Change your function to this: function navToURL(e:Event):void { trace(e.currentTarget); trace('hi'); } --Original Message-- From: Susan Day Sender: flashcoders-boun...@chattyfig.figleaf.com To: Flash Coders List ReplyTo: Flash Coders List Subject: [Flashcoders] addEventListen

Re: [Flashcoders] addEventListener Problem

2010-03-01 Thread Beatrix Krümmer-Frau
Did you check the spelling? 1120: Access to undefined property NavToURL -> navToURL() Susan Day schrieb: Hi; I have the following code: function DisplayPicLoaded(evt:Event):void { var container:Sprite = new Sprite(); var myXArray:Array = new Array(10,176,342,508,674,840); var loaderInfo:Load

Re: [Flashcoders] addEventListener Problem

2010-03-01 Thread Todd Kerpelman
Flash is case-sensitive. Looks like your "NavToURL" in your addEventListener call should really be "navToURL" --T On Mon, Mar 1, 2010 at 10:50 AM, Susan Day wrote: > Hi; > I have the following code: > > function DisplayPicLoaded(evt:Event):void > { > var container:Sprite = new Sprite(); > var my

RE: [Flashcoders] addEventListener Problem

2010-03-01 Thread Cor
Of Susan Day Sent: maandag 1 maart 2010 19:50 To: Flash Coders List Subject: [Flashcoders] addEventListener Problem Hi; I have the following code: function DisplayPicLoaded(evt:Event):void { var container:Sprite = new Sprite(); var myXArray:Array = new Array(10,176,342,508,674,840); var

RE: [Flashcoders] addEventListener Problem

2010-03-01 Thread Merrill, Jason
>>1120: Access to undefined property NavToURL Today's show was brought to you by the capital letter "N" vs. the lower-case letter "n". Jason Merrill Bank of America Global Learning Learning & Performance Solutions Join the Bank of America Flash Platform Community and visit our Instruction

[Flashcoders] addEventListener Problem

2010-03-01 Thread Susan Day
Hi; I have the following code: function DisplayPicLoaded(evt:Event):void { var container:Sprite = new Sprite(); var myXArray:Array = new Array(10,176,342,508,674,840); var loaderInfo:LoaderInfo = evt.target as LoaderInfo; var displayObject:DisplayObject = loaderInfo.content; displayObject.width =

Re: [Flashcoders] AddEventListener

2010-01-25 Thread beno -
mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of beno - > Sent: Monday, January 25, 2010 10:57 AM > To: Flash Coders List > Subject: [Flashcoders] AddEventListener > > Hi; > I have the following line of code in the init: > > picLoader.addEventListener(Event.ENTER_FR

RE: [Flashcoders] AddEventListener

2010-01-25 Thread Nathan Mynarcik
Have you tried tracing to see if that function you added is firing? -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of beno - Sent: Monday, January 25, 2010 10:57 AM To: Flash Coders List Subject: [Flashcoders

[Flashcoders] AddEventListener

2010-01-25 Thread beno -
Hi; I have the following line of code in the init: picLoader.addEventListener(Event.ENTER_FRAME, checkFrame3); and this code further on: public function checkFrame3(e:Event):void { if (e.target.currentFrame == 10) { e.target.removeEventListener(Event.ENT

Re: [Flashcoders] AddEventListener and DispatchCustom Events AS3

2008-02-01 Thread Helmut Granda
Interesting approach.. Thanks Jer On 1/31/08, Jer Brand <[EMAIL PROTECTED]> wrote: > > There are probably a hundred other ways to do this, but an easy one > (off the top of my head) would be to make your holder variable a > custom element that extends sprite, but has it's own variables, like: > >

Re: [Flashcoders] AddEventListener and DispatchCustom Events AS3

2008-02-01 Thread Helmut Granda
You are correct, that is the part that I was overlooking. For some odd reason I was feeling like I couldn't dispatch that information from within the component. Thanks... On 1/31/08, Steven Sacks <[EMAIL PROTECTED]> wrote: > > Now that I look at it, it's more an architecture issue than a custom >

Re: [Flashcoders] AddEventListener and DispatchCustom Events AS3

2008-01-31 Thread Steven Sacks
Now that I look at it, it's more an architecture issue than a custom event issue. Your drop down component should listen to the items inside it for when they are selected, and your drop down component should fire a change event when it changes. item.addEventListener(SELECT, onItemSelect); p

Re: [Flashcoders] AddEventListener and DispatchCustom Events AS3

2008-01-31 Thread Helmut Granda
Thanks, I know how to extend the Event class to create your custom events, what I am having an issue with was capturing an event that hasnt been declared yet :) On 1/31/08, Steven Sacks <[EMAIL PROTECTED]> wrote: > > You make a custom event class that extends Event, and you pass the > params that

Re: [Flashcoders] AddEventListener and DispatchCustom Events AS3

2008-01-31 Thread Steven Sacks
You make a custom event class that extends Event, and you pass the params that Event is expecting first. http://3lbmonkeybrain.blogspot.com/2008/01/how-to-extend-event-once-and-for-all.html ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.co

Re: [Flashcoders] AddEventListener and DispatchCustom Events AS3

2008-01-31 Thread Jer Brand
There are probably a hundred other ways to do this, but an easy one (off the top of my head) would be to make your holder variable a custom element that extends sprite, but has it's own variables, like: class HolderClass extends Sprite { private var _myParam:String public function Hol

[Flashcoders] AddEventListener and DispatchCustom Events AS3

2008-01-31 Thread Helmut Granda
I am having a little bit of issue wrapping my head about this easy task. I think my brain is fried. I have created a dropdown component... now when the user selects an element from the dropdown i can listen for the MOUSE_UP and call a method, that method dispatches a custom event. Now I am assig

Re: [Flashcoders] addEventListener --> removeAllListenersEventDispatcher class

2006-02-23 Thread Michael Nisi
This delegate implementation sends a reference to the receiver. http://dynamicflash.com/2005/02/delegate-class-refined/ Maybe you could store references to all your delegations somewhere. Something like a DelegateLocator . ;) Just a thought... Regards, Michael On 2/23/06, Miguel Angel Sánchez <[

Re: [Flashcoders] addEventListener --> removeAllListenersEventDispatcher class

2006-02-23 Thread Miguel Angel Sánchez
Try this: var dcb:Function = Delegate.create(controller, controller.correctButton_OnRelease); correctButton.addEventListener("onRelease", dcb); ... correctButton.removeEventListener("onRelease", dcb); [EMAIL PROTECTED] escribió: The problem is this : ... correctButton.addEventListene

[Flashcoders] addEventListener --> removeAllListeners EventDispatcher class

2006-02-23 Thread lieven.cardoen
The problem is this : ... correctButton.addEventListener("onRelease", Delegate.create(controller, controller.correctButton_OnRelease)); solutionButton.addEventListener("onRelease", Delegate.create(controller, controller.solutionButton_OnRelease)); nextButton.addEventListener("onRelease", De

Re: [Flashcoders] addEventListener - MovieClip wants to pass event to containing class

2006-02-14 Thread Steve Warren
Thanks for the tips Moses! I'm gonna download and check out CallbackDispatcher 2.0 now... Where are you from? I'm living in NJ, working in Manhattan. -steve On 2/12/06, Moses Gunesch <[EMAIL PROTECTED]> wrote: > > Steve - > > Yes there are 2 things available for this. MM added that > functiona

Re: [Flashcoders] addEventListener - MovieClip wants to pass event to containing class

2006-02-12 Thread Moses Gunesch
Steve - Yes there are 2 things available for this. MM added that functionality in some event classes that are pretty much undocumented and a little tough to learn - UIEventDispatcher and LowLevelEvents. Secondly, I wrote a class called CallbackDispatcher that makes it really easy to use e

RE: [Flashcoders] addEventListener - MovieClip wants to pass event tocontaining class

2006-01-19 Thread Bjorn Schultheiss
al Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lanny McNie Sent: Friday, 20 January 2006 9:40 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] addEventListener - MovieClip wants to pass event tocontaining class Thats not how EventDispatcher works. Firstly

Re: [Flashcoders] addEventListener - MovieClip wants to pass event to containing class

2006-01-19 Thread Lanny McNie
Thats not how EventDispatcher works. Firstly, you need a movieclip whose class has EventDispatcher tied into it (like the v2 components do). Once that's working, the correct syntax is: mc.addEventListener("click", this); function click() { // do stuff } On 1/19/06, Steve Warren <[EMAIL PROT

[Flashcoders] addEventListener - MovieClip wants to pass event to containing class

2006-01-19 Thread Steve Warren
Hey folks, I'm having a little trouble getting addEventListener to work. I've tried a bunch of combinations, but have yet to find the right one. I'm trying to assign onRelease functions to a bunch of buttons in my LanguageChooser class. All I want to do is call a function inside LanguageChooser