Re: [Flashcoders] Calculator
Right. I believe that one. So Steve, what is the correct equation for my code then. Since I'm dumb and your smart. Explain to me why you get 0.05 when you do it the way you say and you get 450 when you do it the retarded way I did it? We ALL know 15% of 3000 is 450. Even the mathematically challenged. Karl On Mar 17, 2010, at 10:22 PM, Merrill, Jason wrote: Sorry, I meant all the time. Jason Merrill Bank of America Global Learning Learning & Performance Solutions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks Sent: Wednesday, March 17, 2010 11:12 PM To: Flash Coders List Subject: Re: [Flashcoders] Calculator I sincerely apologize for my sarcastic remark regarding the current state of the public educational system in America, and for any emotional trauma it may have caused to those whose proficiency at arithmetic is equivalent to or less than that of an elementary school student. In the future, I will moderate my tone accordingly. Apparently, my social maturity is equal to their mathematics maturity. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Calculator
Sorry, I meant all the time. Jason Merrill Bank of America Global Learning Learning & Performance Solutions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks Sent: Wednesday, March 17, 2010 11:12 PM To: Flash Coders List Subject: Re: [Flashcoders] Calculator I sincerely apologize for my sarcastic remark regarding the current state of the public educational system in America, and for any emotional trauma it may have caused to those whose proficiency at arithmetic is equivalent to or less than that of an elementary school student. In the future, I will moderate my tone accordingly. Apparently, my social maturity is equal to their mathematics maturity. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calculator
I sincerely apologize for my sarcastic remark regarding the current state of the public educational system in America, and for any emotional trauma it may have caused to those whose proficiency at arithmetic is equivalent to or less than that of an elementary school student. In the future, I will moderate my tone accordingly. Apparently, my social maturity is equal to their mathematics maturity. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Calculator
>> I guess I didnt think these list were places of crucifiction, but >> more a place to ask questions. Don't worry about Steve, he can be an unapologetic jerk sometimes. Jason Merrill Bank of America Global Learning Learning & Performance Solutions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calculator
How about pulling in your claws. on 3/17/10 2:43 PM, Steven Sacks at flash...@stevensacks.net wrote: > I've heard that education in America was bad, but this is like 7th grade > pre-Algebra. John R. Sweeney Jr. Interactive Multimedia Developer OnDemand Interactive Inc 945 Washington Blvd. Hoffman Estates, IL 60169 Office/Fax: 847.310.5959 Cellular: 847.651.4469 www.ondemandinteractive.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] bubbling listening
What he said - events only bubble up the display list. EventDispatcher doesn't extend DisplayObject (rather the other way round) - so even if your Sprite is an instance inside an EventDispatcher it can't be on the EventDispatcher's stage (EventDispatcher doesn't have a stage). Instead of subclassing EventDispatcher, consider subclassing a DisplayObject (Sprite or MovieClip) - which because they extend EventDispatcher will give you access to all the functionality you need. Barry. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steve Mathews Sent: Thursday, 18 March 2010 2:08 p.m. To: Flash Coders List Subject: Re: [Flashcoders] bubbling listening Might be obvious, but bubbling only works on the display list. So if your classes aren't all on the display list, then it won't work. Steve On Wed, Mar 17, 2010 at 11:39 AM, Mendelsohn, Michael < michael.mendels...@fmglobal.com> wrote: > Hi Jason, thanks for responding! > > > Make sense? > Almost. :-) > > > What do you mean "The EventDispatcher contains an instance of a sprite." > > The EventDispatcher has a private var that's a reference to a custom class > that extends Sprite. > The Event Dispatcher is instanced in the singleton, it's not on the stage, > it just directs traffic, so to speak. > > > Normally what you would do is not create an instance of EventDispatcher, > but instead have your custom class extend Sprite (which already extends > EventDispatcher anyway), have that sprite dispatch a custom event. > > Yes, that's happening. > > > Then have your class listen to the instance of that class for the custom > event you dispatch. > > Yes, I'm doing that too. > > > So in summary, you write an event class, dispatch > that custom event from the "sprite" class (the custom class that extends > sprite) and listen for that event on that instance in your Singleton > (the fact that it's a Singleton should be irrelevant). > > This is the part I'm not getting to work. What I have working is the > following: > > Singleton >- has private var EventDispatcher > > EventDispatcher >- has private var CustomSprite > > CustomSprite dispatches CustomEvent. > > EventDispatcher catches CustomEvent from Sprite. > EventDispatcher dispatches same CustomEvent. <-- unnecessary step?? > Singleton catches CustomEvent from EventDispatcher (passed along from > CustomSprite). > > What I want is: > CustomSprite dispatches CustomEvent > Singleton catches CustomEvent. > > Within singleton, this does *not* work: > myEventDispatcher[myCustomSprite].addEventListener... > > I have to "pass" the event up the ladder to the singleton. I'd rather leap > over the EventDispatcher. > > - Michael M. > > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] bubbling listening
>>. What I have working is the following: >>Singleton - has private var EventDispatcher >>EventDispatcher- has private var CustomSprite >>CustomSprite dispatches CustomEvent. Yes, and what I am saying is, that architecture is wrong. You don't create instances of EventDispatcher and then put Display object inside of them. >> I have to "pass" the event up the ladder to the singleton. I'd rather leap over the EventDispatcher. Right, exactly, so don't use it at all. >> What I want is: >>CustomSprite dispatches CustomEvent >>Singleton catches CustomEvent. Right, so just do that. Like this. First, create your custom event: //MyCustomEvent.as package { import flash.events.Event; public class MyCustomEvent extends Event { public static const MYEVENT:String = "myevent"; public function MyCustomEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) { super(type, bubbles, cancelable); } public override function clone():Event { return new MyCustomEvent(type, bubbles, cancelable); } public override function toString():String { return formatToString("MyCustomEvent", "type", "bubbles", "cancelable", "eventPhase"); } } } Then, create your custom display object and dispatch that event: //MyCustomEvent.as package { import flash.display.Sprite; public class MyCustomDisplayObject extends Sprite { public function MyCustomDisplayObject() { somethingHappens(); } private function somethingHappens() { dispatchEvent(new MyCustomEvent(MyCustomEvent.MYEVENT)); } } } Then, in your class (which in your case happens to be a Singleton class, (which again, is irrelevant whether it is a Singleton or not), listen to it: //MyClass.as package { import MyCustomEvent; public class MyClass extends { private var _myCustomDisplayObject:MyCustomDisplayObject; public function MyClass() { _myCustomDisplayObject = new MyCustomDisplayObject(); _myCustomDisplayObject.addEventListener(MyCustomEvent.MYEVENT, onMyEvent); } private function onMyEvent(event:MyCustomEvent):void { trace("MyCustomEvent fired") } } } For only moving one level up the display object chain, you don't need to bother with bubbling. If you go more than one level up, then turn bubbling on when you dispatch from the MyCustomDisplayObject class: dispatchEvent(new MyCustomEvent(MyCustomEvent.MYEVENT, true)); Jason Merrill Bank of America Global Learning Learning & Performance Solutions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mendelsohn, Michael Sent: Wednesday, March 17, 2010 2:39 PM To: Flash Coders List Subject: RE: [Flashcoders] bubbling listening Hi Jason, thanks for responding! > Make sense? most. :-) > What do you mean "The EventDispatcher contains an instance of a sprite." The EventDispatcher has a private var that's a reference to a custom class that extends Sprite. The Event Dispatcher is instanced in the singleton, it's not on the stage, it just directs traffic, so to speak. > Normally what you would do is not create an instance of EventDispatcher,[Merrill, Jason] t but instead have your custom class extend Sprite (which already extends EventDispatcher anyway), have that sprite dispatch a custom event. Yes, that's happening. > Then have your class listen to the instance of that class for the custom event you dispatch. Yes, I'm doing that too. > So in summary, you write an event class, dispatch that custom event from the "sprite" class (the custom class that extends sprite) and listen for that event on that instance in your Singleton (the fact that it's a Singleton should be irrelevant). This is the part I'm not getting to work. What I have working is the following: Singleton - has private var EventDispatcher EventDispatcher - has private var CustomSprite CustomSprite dispatches CustomEvent. EventDispatcher catches CustomEvent from Sprite. EventDispatcher dispatches same CustomEvent. <-- unnecessary step?? Singleton catches CustomEvent from EventDispatch
Re: [Flashcoders] bubbling listening
Might be obvious, but bubbling only works on the display list. So if your classes aren't all on the display list, then it won't work. Steve On Wed, Mar 17, 2010 at 11:39 AM, Mendelsohn, Michael < michael.mendels...@fmglobal.com> wrote: > Hi Jason, thanks for responding! > > > Make sense? > Almost. :-) > > > What do you mean "The EventDispatcher contains an instance of a sprite." > > The EventDispatcher has a private var that's a reference to a custom class > that extends Sprite. > The Event Dispatcher is instanced in the singleton, it's not on the stage, > it just directs traffic, so to speak. > > > Normally what you would do is not create an instance of EventDispatcher, > but instead have your custom class extend Sprite (which already extends > EventDispatcher anyway), have that sprite dispatch a custom event. > > Yes, that's happening. > > > Then have your class listen to the instance of that class for the custom > event you dispatch. > > Yes, I'm doing that too. > > > So in summary, you write an event class, dispatch > that custom event from the "sprite" class (the custom class that extends > sprite) and listen for that event on that instance in your Singleton > (the fact that it's a Singleton should be irrelevant). > > This is the part I'm not getting to work. What I have working is the > following: > > Singleton >- has private var EventDispatcher > > EventDispatcher >- has private var CustomSprite > > CustomSprite dispatches CustomEvent. > > EventDispatcher catches CustomEvent from Sprite. > EventDispatcher dispatches same CustomEvent. <-- unnecessary step?? > Singleton catches CustomEvent from EventDispatcher (passed along from > CustomSprite). > > What I want is: > CustomSprite dispatches CustomEvent > Singleton catches CustomEvent. > > Within singleton, this does *not* work: > myEventDispatcher[myCustomSprite].addEventListener... > > I have to "pass" the event up the ladder to the singleton. I'd rather leap > over the EventDispatcher. > > - Michael M. > > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] bubbling listening
(feel free to shoot me if this is a bad idea) Cheat. Assuming EventDispatcher is a custom class and you're using AS3, create a method within EventDispatcher to add Singleton as an event listener to CustomSprite. Something like public function myAddCustomSpriteListener(eventName:String, listener:Function):void { CustomSprite.addEventListener(eventName, listener) ; } And just call the method within Singleton like so: EventDispatcher.myAddCustomSpriteListener("myEventName", listenerFunction) ; Jer On Wed, Mar 17, 2010 at 1:39 PM, Mendelsohn, Michael < michael.mendels...@fmglobal.com> wrote: > Hi Jason, thanks for responding! > > > Make sense? > Almost. :-) > > > What do you mean "The EventDispatcher contains an instance of a sprite." > > The EventDispatcher has a private var that's a reference to a custom class > that extends Sprite. > The Event Dispatcher is instanced in the singleton, it's not on the stage, > it just directs traffic, so to speak. > > > Normally what you would do is not create an instance of EventDispatcher, > but instead have your custom class extend Sprite (which already extends > EventDispatcher anyway), have that sprite dispatch a custom event. > > Yes, that's happening. > > > Then have your class listen to the instance of that class for the custom > event you dispatch. > > Yes, I'm doing that too. > > > So in summary, you write an event class, dispatch > that custom event from the "sprite" class (the custom class that extends > sprite) and listen for that event on that instance in your Singleton > (the fact that it's a Singleton should be irrelevant). > > This is the part I'm not getting to work. What I have working is the > following: > > Singleton >- has private var EventDispatcher > > EventDispatcher >- has private var CustomSprite > > CustomSprite dispatches CustomEvent. > > EventDispatcher catches CustomEvent from Sprite. > EventDispatcher dispatches same CustomEvent. <-- unnecessary step?? > Singleton catches CustomEvent from EventDispatcher (passed along from > CustomSprite). > > What I want is: > CustomSprite dispatches CustomEvent > Singleton catches CustomEvent. > > Within singleton, this does *not* work: > myEventDispatcher[myCustomSprite].addEventListener... > > I have to "pass" the event up the ladder to the singleton. I'd rather leap > over the EventDispatcher. > > - Michael M. > > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calculator
True, true. One should think before they speak.. My question wasn't to try and relearn what I already had known, but in working on my calculator, I kept trying equations. I tried 15/3000 * 100 and it kept coming out 0.05 I tried 15*3000 / 100 and it came out 450, so I was a little baffled.. I knew it should be the other way and I got to Algebra 2 Trig in school, I was just drawing a blank at the time and made the mistake of asking the list. Now Steve thinks All americans are as dumb as me evidently be cause I did. And no, a war is not what I am looking for, just help. Even if I ask what 1 + 1 is, I should never get a response that Steve Sacks sent. And yes I have been helped from him before too, but like I said in the beginning of this message. One should think before they speak.. Thank you to those who did help me with my brain fart. Karl On Mar 17, 2010, at 5:24 PM, Kerry Thompson wrote: Karl DeSaulniers wrote: And he's less of an asshole too. Now, we don't want to get a flame war going. That was Steven Sacks, and he is most certainly one of the most helpful and knowledgeable people on the list. Making one negative post doesn't make him an asshole. On the lighter side, yeah, we should probably all know how to do percentages, but we're not all good at math. I asked the guy behind the seafood counter at Safeway for a fifth of a pound of crab meat, and he carefully weighed out .05 pounds for me. I probably ruined his day when I said something like "Holy crap! Didn't they teach you fractions in high school?" Cordially, Kerry Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calculator
Karl DeSaulniers wrote: > And he's less of an asshole too. Now, we don't want to get a flame war going. That was Steven Sacks, and he is most certainly one of the most helpful and knowledgeable people on the list. Making one negative post doesn't make him an asshole. On the lighter side, yeah, we should probably all know how to do percentages, but we're not all good at math. I asked the guy behind the seafood counter at Safeway for a fifth of a pound of crab meat, and he carefully weighed out .05 pounds for me. I probably ruined his day when I said something like "Holy crap! Didn't they teach you fractions in high school?" Cordially, Kerry Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calculator
And he's less of an asshole too. Karl On Mar 17, 2010, at 4:57 PM, Kerry Thompson wrote: Karl DeSaulniers wrote: I guess I didnt think these list were places of crucifiction, but more a place to ask questions. Next time I think ill ask the teddy bear. The teddy bear seldom fails me. Google helps too :-) Cordially, Kerry Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calculator
Karl DeSaulniers wrote: > I guess I didnt think these list were places of crucifiction, but more a > place to ask questions. > Next time I think ill ask the teddy bear. The teddy bear seldom fails me. Google helps too :-) Cordially, Kerry Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calculator
I guess I didnt think these list were places of crucifiction, but more a place to ask questions. Next time I think ill ask the teddy bear. Karl On Mar 17, 2010, at 2:43 PM, Steven Sacks wrote: Holy crap. Was there seriously just a thread about how to solve a percent value of a number? I've heard that education in America was bad, but this is like 7th grade pre-Algebra. x * y = z Therefore: x = z / y 3000 * y = 450 y = 450 / 3000 y = 0.15 or 15% ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calculator
Holy crap. Was there seriously just a thread about how to solve a percent value of a number? I've heard that education in America was bad, but this is like 7th grade pre-Algebra. x * y = z Therefore: x = z / y 3000 * y = 450 y = 450 / 3000 y = 0.15 or 15% ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] bubbling listening
Hi Jason, thanks for responding! > Make sense? Almost. :-) > What do you mean "The EventDispatcher contains an instance of a sprite." The EventDispatcher has a private var that's a reference to a custom class that extends Sprite. The Event Dispatcher is instanced in the singleton, it's not on the stage, it just directs traffic, so to speak. > Normally what you would do is not create an instance of EventDispatcher, but instead have your custom class extend Sprite (which already extends EventDispatcher anyway), have that sprite dispatch a custom event. Yes, that's happening. > Then have your class listen to the instance of that class for the custom event you dispatch. Yes, I'm doing that too. > So in summary, you write an event class, dispatch that custom event from the "sprite" class (the custom class that extends sprite) and listen for that event on that instance in your Singleton (the fact that it's a Singleton should be irrelevant). This is the part I'm not getting to work. What I have working is the following: Singleton - has private var EventDispatcher EventDispatcher - has private var CustomSprite CustomSprite dispatches CustomEvent. EventDispatcher catches CustomEvent from Sprite. EventDispatcher dispatches same CustomEvent. <-- unnecessary step?? Singleton catches CustomEvent from EventDispatcher (passed along from CustomSprite). What I want is: CustomSprite dispatches CustomEvent Singleton catches CustomEvent. Within singleton, this does *not* work: myEventDispatcher[myCustomSprite].addEventListener... I have to "pass" the event up the ladder to the singleton. I'd rather leap over the EventDispatcher. - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] bubbling listening
What do you mean "The EventDispatcher contains an instance of a sprite." Normally what you would do is not create an instance of EventDispatcher, but instead have your custom class extend Sprite (which already extends EventDispatcher anyway), have that sprite dispatch a custom event. Then have your class listen to the instance of that class for the custom event you dispatch. So in summary, you write an event class, dispatch that custom event from the "sprite" class (the custom class that extends sprite) and listen for that event on that instance in your Singleton (the fact that it's a Singleton should be irrelevant). Your singleton class then has a handler you write that runs when the event is heard. Make sense? Jason Merrill Bank of America Global Learning Learning & Performance Solutions Join the Bank of America Flash Platform Community and visit our Instructional Technology Design Blog (note: these are for Bank of America employees only) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mendelsohn, Michael Sent: Wednesday, March 17, 2010 1:38 PM To: Flash Coders List Subject: [Flashcoders] bubbling listening Hi list... I have a singleton that contains an instance of an EventDispatcher. The EventDispatcher contains an instance of a sprite. I want that sprite to dispatch a custom event that is listened to by the singleton, but I can't seem to make it happen, even by saying bubbles = true. I could have a listener on the EventDispatcher, then dispatch another event going one level higher to the singleton, but I'm wondering if there's a way to bypass that sort of step by step architecture. I thought that within the singleton, I could have referred directly to the sprite itself within the EventDispatcher, but I have not been able to do that either. Any feedback is appreciated, thanks! - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] bubbling listening
Hi list... I have a singleton that contains an instance of an EventDispatcher. The EventDispatcher contains an instance of a sprite. I want that sprite to dispatch a custom event that is listened to by the singleton, but I can't seem to make it happen, even by saying bubbles = true. I could have a listener on the EventDispatcher, then dispatch another event going one level higher to the singleton, but I'm wondering if there's a way to bypass that sort of step by step architecture. I thought that within the singleton, I could have referred directly to the sprite itself within the EventDispatcher, but I have not been able to do that either. Any feedback is appreciated, thanks! - Michael M. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calculator
lol i was trying to make things as simple as possible... although google *could* be wrong ;) On 17 March 2010 17:27, jonathan howe wrote: > Funny thing is, I'm in a talk right now with Grant Skinner presenting and > he > just threw up this slide: > > "Math > > At a bare minimum, you will require basic knowledge of elementary math, > spatial math, bitwise operations, and trigonometry. Advanced trig and some > calculus or physics can pay off as well." > > -jonathan > > > On Wed, Mar 17, 2010 at 9:18 AM, jonathan howe >wrote: > > > I apologize for misusing the word 'sum' earlier, thereby confusing this > > already terrifying conversation! > > I edited the last response to try to undo my mistake. > > > > -jonathan > > On Wed, Mar 17, 2010 at 8:28 AM, Steve Abaffy >wrote: > > > >> The question what is 15% of 3000 is different then 450 is what > percentage > >> of > >> 3000. > >> The equation part/whole * 100 = percent is valid. > >> > >> > >> In the first question we have > >> > >> part/3000 * 100 = 15 solves to part = 450 > >> > >> > >> In the second question > >> 450/3000 * 100 = percent solves to 15 > >> > >> > >> > >> -Original Message- > >> From: flashcoders-boun...@chattyfig.figleaf.com > >> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of > Mattheis, > >> Erik (MIN - WSW) > >> Sent: Wednesday, March 17, 2010 9:58 AM > >> To: Flash Coders List > >> Subject: RE: [Flashcoders] Calculator > >> > >> What's the difference between a sum and a total? > >> > >> Knock knock. > >> Who's there? > >> Nose! > >> Nose who? > >> Who knows? > >> > >> _ _ _ > >> Erik Mattheis > >> Senior Web Developer > >> Minneapolis > >> T 952 346 6610 > >> C 612 377 2272 > >> > >> Weber Shandwick > >> Advocacy starts here. > >> > >> PRWeek Global Agency Report Card 2009 - Gold Medal Winner > >> The Holmes Report Global Agency of the Year > >> PR News Agency of the Year > >> > >> -Original Message- > >> From: flashcoders-boun...@chattyfig.figleaf.com > >> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik > >> Andersson > >> Sent: Wednesday, March 17, 2010 4:11 AM > >> To: Flash Coders List > >> Subject: Re: [Flashcoders] Calculator > >> > >> Karl DeSaulniers wrote: > >> > Hey Jonathan, > >> > Isn't it sum*total / 100 = percentage? > >> > > >> > Karl > >> > > >> > >> No, it is not and has never been. *mumbeling about kids these days* > >> > >> ___ > >> Flashcoders mailing list > >> Flashcoders@chattyfig.figleaf.com > >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > >> > >> ___ > >> Flashcoders mailing list > >> Flashcoders@chattyfig.figleaf.com > >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > >> > >> > >> __ Information from ESET NOD32 Antivirus, version of virus > >> signature > >> database 4952 (20100317) __ > >> > >> The message was checked by ESET NOD32 Antivirus. > >> > >> http://www.eset.com > >> > >> > >> > >> > >> __ Information from ESET NOD32 Antivirus, version of virus > >> signature > >> database 4952 (20100317) __ > >> > >> The message was checked by ESET NOD32 Antivirus. > >> > >> http://www.eset.com > >> > >> > >> > >> ___ > >> Flashcoders mailing list > >> Flashcoders@chattyfig.figleaf.com > >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > >> > > > > > > > > -- > > -jonathan howe > > > > > > -- > -jonathan howe > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calculator
Funny thing is, I'm in a talk right now with Grant Skinner presenting and he just threw up this slide: "Math At a bare minimum, you will require basic knowledge of elementary math, spatial math, bitwise operations, and trigonometry. Advanced trig and some calculus or physics can pay off as well." -jonathan On Wed, Mar 17, 2010 at 9:18 AM, jonathan howe wrote: > I apologize for misusing the word 'sum' earlier, thereby confusing this > already terrifying conversation! > I edited the last response to try to undo my mistake. > > -jonathan > On Wed, Mar 17, 2010 at 8:28 AM, Steve Abaffy wrote: > >> The question what is 15% of 3000 is different then 450 is what percentage >> of >> 3000. >> The equation part/whole * 100 = percent is valid. >> >> >> In the first question we have >> >> part/3000 * 100 = 15 solves to part = 450 >> >> >> In the second question >> 450/3000 * 100 = percent solves to 15 >> >> >> >> -Original Message- >> From: flashcoders-boun...@chattyfig.figleaf.com >> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mattheis, >> Erik (MIN - WSW) >> Sent: Wednesday, March 17, 2010 9:58 AM >> To: Flash Coders List >> Subject: RE: [Flashcoders] Calculator >> >> What's the difference between a sum and a total? >> >> Knock knock. >> Who's there? >> Nose! >> Nose who? >> Who knows? >> >> _ _ _ >> Erik Mattheis >> Senior Web Developer >> Minneapolis >> T 952 346 6610 >> C 612 377 2272 >> >> Weber Shandwick >> Advocacy starts here. >> >> PRWeek Global Agency Report Card 2009 - Gold Medal Winner >> The Holmes Report Global Agency of the Year >> PR News Agency of the Year >> >> -Original Message- >> From: flashcoders-boun...@chattyfig.figleaf.com >> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik >> Andersson >> Sent: Wednesday, March 17, 2010 4:11 AM >> To: Flash Coders List >> Subject: Re: [Flashcoders] Calculator >> >> Karl DeSaulniers wrote: >> > Hey Jonathan, >> > Isn't it sum*total / 100 = percentage? >> > >> > Karl >> > >> >> No, it is not and has never been. *mumbeling about kids these days* >> >> ___ >> Flashcoders mailing list >> Flashcoders@chattyfig.figleaf.com >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> >> ___ >> Flashcoders mailing list >> Flashcoders@chattyfig.figleaf.com >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> >> >> __ Information from ESET NOD32 Antivirus, version of virus >> signature >> database 4952 (20100317) __ >> >> The message was checked by ESET NOD32 Antivirus. >> >> http://www.eset.com >> >> >> >> >> __ Information from ESET NOD32 Antivirus, version of virus >> signature >> database 4952 (20100317) __ >> >> The message was checked by ESET NOD32 Antivirus. >> >> http://www.eset.com >> >> >> >> ___ >> Flashcoders mailing list >> Flashcoders@chattyfig.figleaf.com >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> > > > > -- > -jonathan howe > -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calculator
I apologize for misusing the word 'sum' earlier, thereby confusing this already terrifying conversation! I edited the last response to try to undo my mistake. -jonathan On Wed, Mar 17, 2010 at 8:28 AM, Steve Abaffy wrote: > The question what is 15% of 3000 is different then 450 is what percentage > of > 3000. > The equation part/whole * 100 = percent is valid. > > In the first question we have > > part/3000 * 100 = 15 solves to part = 450 > > In the second question > 450/3000 * 100 = percent solves to 15 > > > > -Original Message- > From: flashcoders-boun...@chattyfig.figleaf.com > [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mattheis, > Erik (MIN - WSW) > Sent: Wednesday, March 17, 2010 9:58 AM > To: Flash Coders List > Subject: RE: [Flashcoders] Calculator > > What's the difference between a sum and a total? > > Knock knock. > Who's there? > Nose! > Nose who? > Who knows? > > _ _ _ > Erik Mattheis > Senior Web Developer > Minneapolis > T 952 346 6610 > C 612 377 2272 > > Weber Shandwick > Advocacy starts here. > > PRWeek Global Agency Report Card 2009 - Gold Medal Winner > The Holmes Report Global Agency of the Year > PR News Agency of the Year > > -Original Message- > From: flashcoders-boun...@chattyfig.figleaf.com > [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik > Andersson > Sent: Wednesday, March 17, 2010 4:11 AM > To: Flash Coders List > Subject: Re: [Flashcoders] Calculator > > Karl DeSaulniers wrote: > > Hey Jonathan, > > Isn't it sum*total / 100 = percentage? > > > > Karl > > > > No, it is not and has never been. *mumbeling about kids these days* > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > __ Information from ESET NOD32 Antivirus, version of virus > signature > database 4952 (20100317) __ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > > > > __ Information from ESET NOD32 Antivirus, version of virus > signature > database 4952 (20100317) __ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > -- -jonathan howe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Re: Embedding fonts CS3 vs FD
Hi Not sure if this will help. But when i embed fonts. I use flash cs4 ide to make a library file swf or swc and add my fonts to that as font symbols. Bring that into flashbuilder But what i have found in my AS3 i had to use this var headingFormat:TextFormat = new TextFormat(); var headingFont:Font = new GothamBlack() // name of the library instance so e.g Arial() // headingFormat.font = headingFont.fontName; headingtxt.embedFonts = true; headingtxt.text = "SOME TEXT"; headingtxt.setTextFormat(headingFormat); Even if you have made a textfield in the flashIDE and set it to access the library item or even use embed font. It didnt seem to work unless i hard coded it to use it. There does seem to be probs with flash cs4 and fonts still. Andrew Kenward a...@milkybrain.co.uk www.milkybrain.co.uk 07590 609 554 On 17 Mar 2010, at 15:00, flashcoders-requ...@chattyfig.figleaf.com wrote: > Embedding fonts CS3 vs FD ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Calculator
The question what is 15% of 3000 is different then 450 is what percentage of 3000. The equation sum/total * 100 = percent is valid. In the first question we have Sum/3000 * 100 = 15 solves to sum = 450 In the second question 450/3000 * 100 = percent solves to 15 -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mattheis, Erik (MIN - WSW) Sent: Wednesday, March 17, 2010 9:58 AM To: Flash Coders List Subject: RE: [Flashcoders] Calculator What's the difference between a sum and a total? Knock knock. Who's there? Nose! Nose who? Who knows? _ _ _ Erik Mattheis Senior Web Developer Minneapolis T 952 346 6610 C 612 377 2272 Weber Shandwick Advocacy starts here. PRWeek Global Agency Report Card 2009 - Gold Medal Winner The Holmes Report Global Agency of the Year PR News Agency of the Year -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson Sent: Wednesday, March 17, 2010 4:11 AM To: Flash Coders List Subject: Re: [Flashcoders] Calculator Karl DeSaulniers wrote: > Hey Jonathan, > Isn't it sum*total / 100 = percentage? > > Karl > No, it is not and has never been. *mumbeling about kids these days* ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders __ Information from ESET NOD32 Antivirus, version of virus signature database 4952 (20100317) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __ Information from ESET NOD32 Antivirus, version of virus signature database 4952 (20100317) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Calculator
What's the difference between a sum and a total? Knock knock. Who's there? Nose! Nose who? Who knows? _ _ _ Erik Mattheis Senior Web Developer Minneapolis T 952 346 6610 C 612 377 2272 Weber Shandwick Advocacy starts here. PRWeek Global Agency Report Card 2009 - Gold Medal Winner The Holmes Report Global Agency of the Year PR News Agency of the Year -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson Sent: Wednesday, March 17, 2010 4:11 AM To: Flash Coders List Subject: Re: [Flashcoders] Calculator Karl DeSaulniers wrote: > Hey Jonathan, > Isn't it sum*total / 100 = percentage? > > Karl > No, it is not and has never been. *mumbeling about kids these days* ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Embedding fonts CS3 vs FD
> Silly question: shouldn't they be backslashes to get to the correct path? Probably not, actually. Windows does support the use of slashes instead of backslashes (as it should). and many programming environments reserve the use of backslashes as metacharacters. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Embedding fonts CS3 vs FD
Silly question: shouldn't they be backslashes to get to the correct path? - MM [Embed(source='C:/WINDOWS/Fonts/ARIAL.TTF', fontName='_Arial', unicodeRange='U+05B0-U+05FF')]//,U+FB1D-U+FB4F,U+2000-U+206F,U+20A0-U+20CF,U+2100-U+2183)] ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Embedding fonts CS3 vs FD
Hi, I am trying to get runtime font loading working in my project. I have managed to do this fine for Chinese characters using the method of creating a Font symbol in the IDE and loading at runtime, but I am struggling with Hebrew fonts. My font appears to be loaded, and ASCII characters are displayed fine, but my Hebrew characters are not displayed - looking at the font in a decompiler, I can only see 243 characters embedded and no Hebrew, so I am guessing that CS3 does not really embed the whole font? Is there a way of hacking it to do this - library fonts, not embedding on stage? I also tried using Flash Develop to embed my font, but I get an error when I try to register the font it throws an error. It decompiles okay with the decompiler. Error #2136: The SWF file file ... contains invalid data. I found a couple of posts about this, but trying the fixes did not solve anything.. (http://www.ultrashock.com/forums/actionscript/font-embedding-using-flash-as3-and-flex-3-a-109509.html) I have googled everywhere and read about 20 articles on Font embedding, so I can't see what I am doing wrong. My font code is here: public class _Arial extends Sprite { [Embed(source='C:/WINDOWS/Fonts/ARIAL.TTF', fontName='_Arial', unicodeRange='U+05B0-U+05FF')]//,U+FB1D-U+FB4F,U+2000-U+206F,U+20A0-U+20CF,U+2100-U+2183)] public static var _Arial:Class } Thanks in advance Glen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Calculator
that might be a bit confusing with just words. so 15% of 3000 is: 0.15*3000=450; and 450 as a percentage of 3000 is: (450/3000)*100=15; > From: davehunte...@hotmail.com > To: flashcoders@chattyfig.figleaf.com > Subject: RE: [Flashcoders] Calculator > Date: Wed, 17 Mar 2010 11:26:42 + > > > you are talking about two different equations. one to find out how much in > percent a given amount is of a given total; the other to find out an amount > with a given percent of a given total. > > > From: k...@designdrumm.com > > Subject: Re: [Flashcoders] Calculator > > Date: Wed, 17 Mar 2010 06:02:42 -0500 > > To: flashcoders@chattyfig.figleaf.com > > > > Hmmm, thats interesting then. > > I did a search on google for "15 percent of 3000" and it came back > > with 450. > > I am thinking google doesn't have it wrong, but whoo knows. > > When I run the script with those parameters, it equates correctly > > > > 15 * 3000 / 100 = 450 (15% of 3000) > > however 15 / 3000 * 100 = 0.5 > > > > What am I missing here then if it is not percent*total/100? > > > > Karl > > > > > > On Mar 17, 2010, at 4:11 AM, Henrik Andersson wrote: > > > > Karl DeSaulniers wrote: > > > Hey Jonathan, > > > Isn't it sum*total / 100 = percentage? > > > > > > Karl > > > > > > > No, it is not and has never been. *mumbeling about kids these days* > > > > ___ > > Flashcoders mailing list > > Flashcoders@chattyfig.figleaf.com > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > Karl DeSaulniers > > Design Drumm > > http://designdrumm.com > > > > ___ > > Flashcoders mailing list > > Flashcoders@chattyfig.figleaf.com > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > _ > Got a cool Hotmail story? Tell us now > http://clk.atdmt.com/UKM/go/195013117/direct/01/___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _ Do you have a story that started on Hotmail? Tell us now http://clk.atdmt.com/UKM/go/195013117/direct/01/___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calculator
that's not finding out the percentage, you know the percentage, 15%. 15% means, 15 in every hundred right? so 15% of $3000 you find like this... (3000/100) * 15 = 450 (total/100) * percent = amount in plain english, first you need to divide the total by 100, to get 1% of 3000, 1 in every 100 of 3000. then once you have 1%, you multiply by 15 to get your 15%. as david said they're 2 different equations, one to find what percentage of a total a given amount is (which i explained before) and one to work out the amount of a total given a percentage. On 17 March 2010 12:29, Karl DeSaulniers wrote: > No, that makes TOTAL sense. > but why does 15/3000*100 = 0.5? > > 15% of $3,000 dollars is not 5¢ its $450 > > http://wiki.answers.com/Q/What_is_15_percent_of_3000 > > Maybe my mac calculator is broken? > > Frustrating.. > > > Karl > > > > On Mar 17, 2010, at 6:14 AM, tom rhodes wrote: > > percent = percento = per cento = for/in every 100 > > so when you say 15% you are saying 15 in every 100. s > > if i have 100 apples and 25 of them are red... > > (25 / 100) * 100 = 25% of the apples are red. > > if i have 200 apples and 25 of them are red... > > (25 / 200) * 100 = 12.5% of the apples are red. > > (amount / total) * 100 = %. > > hth. > > On 17 March 2010 12:02, Karl DeSaulniers wrote: > > Hmmm, thats interesting then. >> I did a search on google for "15 percent of 3000" and it came back with >> 450. >> I am thinking google doesn't have it wrong, but whoo knows. >> When I run the script with those parameters, it equates correctly >> >> 15 * 3000 / 100 = 450 (15% of 3000) >> however 15 / 3000 * 100 = 0.5 >> >> What am I missing here then if it is not percent*total/100? >> >> Karl >> >> >> >> On Mar 17, 2010, at 4:11 AM, Henrik Andersson wrote: >> >> Karl DeSaulniers wrote: >> >> Hey Jonathan, >>> Isn't it sum*total / 100 = percentage? >>> >>> Karl >>> >>> >>> No, it is not and has never been. *mumbeling about kids these days* >> >> ___ >> Flashcoders mailing list >> Flashcoders@chattyfig.figleaf.com >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> >> Karl DeSaulniers >> Design Drumm >> http://designdrumm.com >> >> ___ >> Flashcoders mailing list >> Flashcoders@chattyfig.figleaf.com >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> >> ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Karl DeSaulniers > Design Drumm > http://designdrumm.com > > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calculator
No, that makes TOTAL sense. but why does 15/3000*100 = 0.5? 15% of $3,000 dollars is not 5¢ its $450 http://wiki.answers.com/Q/What_is_15_percent_of_3000 Maybe my mac calculator is broken? Frustrating.. Karl On Mar 17, 2010, at 6:14 AM, tom rhodes wrote: percent = percento = per cento = for/in every 100 so when you say 15% you are saying 15 in every 100. s if i have 100 apples and 25 of them are red... (25 / 100) * 100 = 25% of the apples are red. if i have 200 apples and 25 of them are red... (25 / 200) * 100 = 12.5% of the apples are red. (amount / total) * 100 = %. hth. On 17 March 2010 12:02, Karl DeSaulniers wrote: Hmmm, thats interesting then. I did a search on google for "15 percent of 3000" and it came back with 450. I am thinking google doesn't have it wrong, but whoo knows. When I run the script with those parameters, it equates correctly 15 * 3000 / 100 = 450 (15% of 3000) however 15 / 3000 * 100 = 0.5 What am I missing here then if it is not percent*total/100? Karl On Mar 17, 2010, at 4:11 AM, Henrik Andersson wrote: Karl DeSaulniers wrote: Hey Jonathan, Isn't it sum*total / 100 = percentage? Karl No, it is not and has never been. *mumbeling about kids these days* ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Calculator
you are talking about two different equations. one to find out how much in percent a given amount is of a given total; the other to find out an amount with a given percent of a given total. > From: k...@designdrumm.com > Subject: Re: [Flashcoders] Calculator > Date: Wed, 17 Mar 2010 06:02:42 -0500 > To: flashcoders@chattyfig.figleaf.com > > Hmmm, thats interesting then. > I did a search on google for "15 percent of 3000" and it came back > with 450. > I am thinking google doesn't have it wrong, but whoo knows. > When I run the script with those parameters, it equates correctly > > 15 * 3000 / 100 = 450 (15% of 3000) > however 15 / 3000 * 100 = 0.5 > > What am I missing here then if it is not percent*total/100? > > Karl > > > On Mar 17, 2010, at 4:11 AM, Henrik Andersson wrote: > > Karl DeSaulniers wrote: > > Hey Jonathan, > > Isn't it sum*total / 100 = percentage? > > > > Karl > > > > No, it is not and has never been. *mumbeling about kids these days* > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Karl DeSaulniers > Design Drumm > http://designdrumm.com > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _ Got a cool Hotmail story? Tell us now http://clk.atdmt.com/UKM/go/195013117/direct/01/___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calculator
percent = percento = per cento = for/in every 100 so when you say 15% you are saying 15 in every 100. s if i have 100 apples and 25 of them are red... (25 / 100) * 100 = 25% of the apples are red. if i have 200 apples and 25 of them are red... (25 / 200) * 100 = 12.5% of the apples are red. (amount / total) * 100 = %. hth. On 17 March 2010 12:02, Karl DeSaulniers wrote: > Hmmm, thats interesting then. > I did a search on google for "15 percent of 3000" and it came back with > 450. > I am thinking google doesn't have it wrong, but whoo knows. > When I run the script with those parameters, it equates correctly > > 15 * 3000 / 100 = 450 (15% of 3000) > however 15 / 3000 * 100 = 0.5 > > What am I missing here then if it is not percent*total/100? > > Karl > > > > On Mar 17, 2010, at 4:11 AM, Henrik Andersson wrote: > > Karl DeSaulniers wrote: > >> Hey Jonathan, >> Isn't it sum*total / 100 = percentage? >> >> Karl >> >> > No, it is not and has never been. *mumbeling about kids these days* > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Karl DeSaulniers > Design Drumm > http://designdrumm.com > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calculator
Hmmm, thats interesting then. I did a search on google for "15 percent of 3000" and it came back with 450. I am thinking google doesn't have it wrong, but whoo knows. When I run the script with those parameters, it equates correctly 15 * 3000 / 100 = 450 (15% of 3000) however 15 / 3000 * 100 = 0.5 What am I missing here then if it is not percent*total/100? Karl On Mar 17, 2010, at 4:11 AM, Henrik Andersson wrote: Karl DeSaulniers wrote: Hey Jonathan, Isn't it sum*total / 100 = percentage? Karl No, it is not and has never been. *mumbeling about kids these days* ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calculator
Karl DeSaulniers wrote: Hey Jonathan, Isn't it sum*total / 100 = percentage? Karl No, it is not and has never been. *mumbeling about kids these days* ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Recurisve Functions
On 16/03/2010 23:49, Paul Andrews wrote: On 16/03/2010 20:19, Lehr, Theodore wrote: Any good tuts on recursive functions in as3? I am basically making an org chatr and would love to have one function to run through some xml to build the org chart (import a pic and name) and place them in the right position based on the xml. My xml would look something like: I have the code working from one person I just would love to find a way to make a recursive function to go through all the xml entries ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Your XML should really be more like: You should then be able to iterate through . I should add that your original XML could be used, but then your just using XML to hold an old-fashioned tree list and it's not really an XML relationship problem (since your original XML is just a flat list) but a problem of traversing a tree of links. Your original XML is just an array with references to other links in the array. The thing that makes it difficult to handle is that your links point in the wrong direction - you can't easily tell where the children are for a given element. If I had to use the original XML, I would load them into an array which also had forward pointers. Initially those pointers would be unset and I would then search out all the children for a given element and continue until I had mapped all children. Then I can build the tree from the root element - I can recursively descend the tree. To space the tree out you need to know the spacing characteristics of the level below. Not sure that helps. Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders