[Flashcoders] AS3 for each loop / splice issue

2008-08-27 Thread noentourage
Hey flashcoders...
I'm parsing an xml doc and building an array then later trying to stuff a
value in to each object
in the array at the second part of each object.
[code]
//at the top of my class I have the variable for the cue_points array

// create array with text prompts and a dummy value

for each (var prmpt:XML in xmlData.prompt) {
//this works fine
cue_points.push([prmpt.text,2]);
}

// now add cue points to the previously created array

for each (var cue:XML in xmlData..step.training.cuein){
var cueIn = cue;
//following line returns the correct values from the xml nodes
trace("cueIn --> "+cueIn);
//the following line does not splice in the "cueIn" value to the
previously created
// array.
cue_points[cue].splice(1,1,cueIn);
}

[/code]

I'm trying to first push the text prompts into the array and build it with
to values in the one object so that
I can later come in and splice in new values to go along with the prompt
text.

I've tried to trace this out and can't seem to find the issue and can't find
anyone else that has done this.
So since it's new AS3 code I figured that maybe someone would have a tip.

Thanks!
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Access MainTimeline reference from within a component

2008-08-27 Thread Helmut Granda
It could be.. the only reason for trying to do this is to create a very
"smart" component, thus being able to pick up the file name would have been
of a great help for it. But again it seems almost hard to get it if you are
trying from somewhere else that is not strictly the timeline.
BTW the component is added to the stage and it has visuals so it is not a
component that runs in its own window...

Thanks for the help, I will continue trying to find other ways to go about
it...

On Wed, Aug 27, 2008 at 3:52 PM, Merrill, Jason <
[EMAIL PROTECTED]> wrote:

> Yes, but what I was getting at, if it's a component, why does it need to
> have access to the main timeline?  Components normally shouldn't be that
> tightly coupled.
>
> Could you instead pass a reference to a public property in the component
> of the filename instead of trying to access the filename from the
> component itself?
>
> Jason Merrill
> Bank of America
> Enterprise Technology & Global Risk L&LD
> Instructional Technology & Media
>
> Join the Bank of America Flash Platform Developer Community
>
> Are you a Bank of America associate interested in innovative learning
> ideas and technologies?
> Check out our internal  Innovative Learning Blog & subscribe.
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Helmut
> Granda
> Sent: Wednesday, August 27, 2008 4:31 PM
> To: Flash Coders List
> Subject: Re: [Flashcoders] Access MainTimeline reference from within a
> component
>
> Good question...
> If you use the methtod describeType for the main timeline you are able
> to
> extract the file name you are working with.
>
> //something like this:
> trace(describeType(root));
> 
> Now this has to be done on the timeline, once you try to do
> describeType(root) from within a movieclip (or a component) you will get
> the
> following:
>
> trace(describeType(root));
> 
> So I am trying to extract the file name by targeting the
> "MainTimeline"
> does that makes sense?
>
> On Wed, Aug 27, 2008 at 3:13 PM, Merrill, Jason <
> [EMAIL PROTECTED]> wrote:
>
> > OK, I'll be the one to ask this.  So just curious, since components
> > normally should be decoupled from objects outside themselves (i.e. the
> > main timeline) - what is driving this - is there a better way to
> > re-think this overall or must you really target the main timeline?
> >
> > Jason Merrill
> > Bank of America
> > Enterprise Technology & Global Risk L&LD
> > Instructional Technology & Media
> >
> > Join the Bank of America Flash Platform Developer Community
> >
> > Are you a Bank of America associate interested in innovative learning
> > ideas and technologies?
> > Check out our internal  Innovative Learning Blog & subscribe.
> >
> >
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Helmut
> > Granda
> > Sent: Wednesday, August 27, 2008 4:04 PM
> > To: Flash Coders List
> > Subject: Re: [Flashcoders] Access MainTimeline reference from within a
> > component
> >
> > Ok, so my component is being added to a blank FLA, which then it would
> > have
> > MainTimeline as the default name since there is no Document Class. Is
> > there
> > anyway to access the MainTimeline information from a blank FLA from
> > within a
> > component?
> >
> >
> > On Wed, Aug 27, 2008 at 2:45 PM, Eduardo Omine
> > <[EMAIL PROTECTED]>wrote:
> >
> > > I understand that Flash prepends the filename to "MainTimeline" as a
> > > convenience because there's no DocumentClass.
> > > "MainTimeline" is not a class or type definition, it's simply a
> > default
> > > name.
> > >
> > > --
> > > Eduardo Omine
> > > http://blog.omine.net/
> > > http://www.omine.net/
> > > ___
> > > Flashcoders mailing list
> > > Flashcoders@chattyfig.figleaf.com
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> >
> >
> >
> > --
> > ...helmut
> > ___
> > 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
> >
>
>
>
> --
> ...helmut
> ___
> 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
>



-- 
...helmut
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Access MainTimeline reference from within a component

2008-08-27 Thread Helmut Granda
I dont think it is hack-is if you get the file name as a reference right
before the file is being compiled. IMO...

On Wed, Aug 27, 2008 at 3:50 PM, Eduardo Omine <[EMAIL PROTECTED]>wrote:

> I think the question is: what do you need the FLA filename for?
> Relying on filename seems very hack-ish and unreliable -- it's common
> to have files renamed during the development process and for testing
> purposes.
>
> --
> Eduardo Omine
> http://blog.omine.net/
> http://www.omine.net/
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
...helmut
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Access MainTimeline reference from within a component

2008-08-27 Thread Merrill, Jason
Yes, but what I was getting at, if it's a component, why does it need to
have access to the main timeline?  Components normally shouldn't be that
tightly coupled. 

Could you instead pass a reference to a public property in the component
of the filename instead of trying to access the filename from the
component itself?

Jason Merrill 
Bank of America 
Enterprise Technology & Global Risk L&LD 
Instructional Technology & Media

Join the Bank of America Flash Platform Developer Community 

Are you a Bank of America associate interested in innovative learning
ideas and technologies?
Check out our internal  Innovative Learning Blog & subscribe. 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Helmut
Granda
Sent: Wednesday, August 27, 2008 4:31 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Access MainTimeline reference from within a
component

Good question...
If you use the methtod describeType for the main timeline you are able
to
extract the file name you are working with.

//something like this:
trace(describeType(root));
 wrote:

> OK, I'll be the one to ask this.  So just curious, since components
> normally should be decoupled from objects outside themselves (i.e. the
> main timeline) - what is driving this - is there a better way to
> re-think this overall or must you really target the main timeline?
>
> Jason Merrill
> Bank of America
> Enterprise Technology & Global Risk L&LD
> Instructional Technology & Media
>
> Join the Bank of America Flash Platform Developer Community
>
> Are you a Bank of America associate interested in innovative learning
> ideas and technologies?
> Check out our internal  Innovative Learning Blog & subscribe.
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Helmut
> Granda
> Sent: Wednesday, August 27, 2008 4:04 PM
> To: Flash Coders List
> Subject: Re: [Flashcoders] Access MainTimeline reference from within a
> component
>
> Ok, so my component is being added to a blank FLA, which then it would
> have
> MainTimeline as the default name since there is no Document Class. Is
> there
> anyway to access the MainTimeline information from a blank FLA from
> within a
> component?
>
>
> On Wed, Aug 27, 2008 at 2:45 PM, Eduardo Omine
> <[EMAIL PROTECTED]>wrote:
>
> > I understand that Flash prepends the filename to "MainTimeline" as a
> > convenience because there's no DocumentClass.
> > "MainTimeline" is not a class or type definition, it's simply a
> default
> > name.
> >
> > --
> > Eduardo Omine
> > http://blog.omine.net/
> > http://www.omine.net/
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
>
>
>
> --
> ...helmut
> ___
> 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
>



-- 
...helmut
___
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] Access MainTimeline reference from within a component

2008-08-27 Thread Eduardo Omine
I think the question is: what do you need the FLA filename for?
Relying on filename seems very hack-ish and unreliable -- it's common
to have files renamed during the development process and for testing
purposes.

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] textField fed htmlText renders title

2008-08-27 Thread H
Hi sebastian,

s = string and t = tag - that should help with using the function...

Well, I can briefly explain it.

It begins by checking whether you passed in for a string is actually a
string. I had this function hooked into a data driven series of processes,
so the actual string I was working with was on occasion null...

We set the tag var t to upper case, and set the string we are stripping to
upper case since lastIndexOf is a case sensitive method. Note that we don't
actually change the string - we assign the upper case version of the string
to upString. oT and cT are open tag and close tag. We don't need > for those
strings since we want to hit /> as well as > for self closing tags. i is our
index, we set it to the end of the string since we will be going in reverse.
I think I had originally done this to avoid throwing off the current index
when going through the string (this would happen since the string length
would change) but no longer seems relevant. In any case, it should be no
different than going forward since we copy the string to begin with.

I can see how it might have gotten confusing when I used a, b, c, and d as
index vars. I used to code like this, and I sometimes still do when I don't
think anyone will need to read the code but less so than I used to. It's
also sometimes easier to think with arbitrary vars instead of trying to
categorize them.

So, we start by defining c and d, which are the open and close tags we are
looking for. var a serves as the tag closer to the end of the string. If a
is -1 that just means that the opening or closing tag was never there to
begin with, or has been completely removed. Now that I look at this, I don't
think we need else there :) break would skip the rest of loop...

So, we run indexOf on ">" starting from a to get the end of the tag and
assign the result to b. We then set the string to the substring that is the
beginning of the string to a, to the substring starting from b to the end of
the string. This removes the tag...

But not the content between the tag... Good thing you made me go through
this again sebastian :S

Eh...

function stripTagAndContent(s:String, t:String):String {
if(typeof(s) == 'string'){
t = t.toUpperCase();
var i:Number = s.length-1, oT:String = '<'+t, cT:String = 'ctIndex) ctIndex = otIndex; //this is self closing or
dangling

var endIndex:Number = s.indexOf('>', ctIndex)+1;
s = s.substring(0, otIndex) + s.substring(endIndex, s.length);
i = otIndex-1;

}
} else s = '';
return s;
}

This one should be easier to read too :)

H

On Wed, Aug 27, 2008 at 2:16 PM, sebastian <[EMAIL PROTECTED]> wrote:

> Looks cool, but any chance you could replace your micro-variable names with
> real-world words for easy reading? Reminds me of moments when I decide I
> need to run for coffee at work...
> ;)
>
>
> H wrote:
>
>> Hey Mike,
>>
>>public static function stripTag(s:String, t:String):String {
>>if(typeof(s) == 'string'){
>>t = t.toUpperCase();
>>var i:Number = s.length-1, oT:String = '<'+t, cT:String =
>> '>while(true){
>>var c:Number = upString.lastIndexOf(oT, i);
>>var d:Number = upString.lastIndexOf(cT, i);
>>var a:Number = Math.max(c, d);
>>if(a==-1) break;
>>else {
>>var b:Number = s.indexOf('>', a)+1;
>>s = s.substring(0, a) + s.substring(b, s.length);
>>i = a-1;
>>}
>>}
>>} else s = '';
>>return s;
>>}
>>
>> A little something I had laying around...
>>
>> H
>>
>> On Wed, Aug 27, 2008 at 1:00 PM, Mendelsohn, Michael <
>> [EMAIL PROTECTED]> wrote:
>>
>>  Perfect answer, H.
>>>
>>> (Too bad it's AS2.)  :-(
>>>
>>> Thanks!
>>> - MM
>>>
>>>
>>> ___
>>> 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
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Access MainTimeline reference from within a component

2008-08-27 Thread Helmut Granda
Good question...
If you use the methtod describeType for the main timeline you are able to
extract the file name you are working with.

//something like this:
trace(describeType(root));
 wrote:

> OK, I'll be the one to ask this.  So just curious, since components
> normally should be decoupled from objects outside themselves (i.e. the
> main timeline) - what is driving this - is there a better way to
> re-think this overall or must you really target the main timeline?
>
> Jason Merrill
> Bank of America
> Enterprise Technology & Global Risk L&LD
> Instructional Technology & Media
>
> Join the Bank of America Flash Platform Developer Community
>
> Are you a Bank of America associate interested in innovative learning
> ideas and technologies?
> Check out our internal  Innovative Learning Blog & subscribe.
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Helmut
> Granda
> Sent: Wednesday, August 27, 2008 4:04 PM
> To: Flash Coders List
> Subject: Re: [Flashcoders] Access MainTimeline reference from within a
> component
>
> Ok, so my component is being added to a blank FLA, which then it would
> have
> MainTimeline as the default name since there is no Document Class. Is
> there
> anyway to access the MainTimeline information from a blank FLA from
> within a
> component?
>
>
> On Wed, Aug 27, 2008 at 2:45 PM, Eduardo Omine
> <[EMAIL PROTECTED]>wrote:
>
> > I understand that Flash prepends the filename to "MainTimeline" as a
> > convenience because there's no DocumentClass.
> > "MainTimeline" is not a class or type definition, it's simply a
> default
> > name.
> >
> > --
> > Eduardo Omine
> > http://blog.omine.net/
> > http://www.omine.net/
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
>
>
>
> --
> ...helmut
> ___
> 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
>



-- 
...helmut
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] Access MainTimeline reference from within a component

2008-08-27 Thread Merrill, Jason
OK, I'll be the one to ask this.  So just curious, since components
normally should be decoupled from objects outside themselves (i.e. the
main timeline) - what is driving this - is there a better way to
re-think this overall or must you really target the main timeline?  

Jason Merrill 
Bank of America 
Enterprise Technology & Global Risk L&LD 
Instructional Technology & Media

Join the Bank of America Flash Platform Developer Community 

Are you a Bank of America associate interested in innovative learning
ideas and technologies?
Check out our internal  Innovative Learning Blog & subscribe. 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Helmut
Granda
Sent: Wednesday, August 27, 2008 4:04 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Access MainTimeline reference from within a
component

Ok, so my component is being added to a blank FLA, which then it would
have
MainTimeline as the default name since there is no Document Class. Is
there
anyway to access the MainTimeline information from a blank FLA from
within a
component?


On Wed, Aug 27, 2008 at 2:45 PM, Eduardo Omine
<[EMAIL PROTECTED]>wrote:

> I understand that Flash prepends the filename to "MainTimeline" as a
> convenience because there's no DocumentClass.
> "MainTimeline" is not a class or type definition, it's simply a
default
> name.
>
> --
> Eduardo Omine
> http://blog.omine.net/
> http://www.omine.net/
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
...helmut
___
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] [Flashcoders tweening glowfilter from inner to outer

2008-08-27 Thread Hans Wichman
Hi,

I don't think tweening from inner to outer is possible, unless you use
multiple glow filters.

greetz
JC

On Wed, Aug 27, 2008 at 9:43 PM, eric e. dolecki <[EMAIL PROTECTED]> wrote:
> Can tweenfilterlite tween from inner to outer glows elegantly? The server
> isn't responding for me to check myself without setting up test code. Might
> do anyway.
> Eric
> ___
> 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] Access MainTimeline reference from within a component

2008-08-27 Thread Helmut Granda
Ok, so my component is being added to a blank FLA, which then it would have
MainTimeline as the default name since there is no Document Class. Is there
anyway to access the MainTimeline information from a blank FLA from within a
component?


On Wed, Aug 27, 2008 at 2:45 PM, Eduardo Omine <[EMAIL PROTECTED]>wrote:

> I understand that Flash prepends the filename to "MainTimeline" as a
> convenience because there's no DocumentClass.
> "MainTimeline" is not a class or type definition, it's simply a default
> name.
>
> --
> Eduardo Omine
> http://blog.omine.net/
> http://www.omine.net/
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
...helmut
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Access MainTimeline reference from within a component

2008-08-27 Thread Eduardo Omine
I understand that Flash prepends the filename to "MainTimeline" as a
convenience because there's no DocumentClass.
"MainTimeline" is not a class or type definition, it's simply a default name.

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] [Flashcoders tweening glowfilter from inner to outer

2008-08-27 Thread eric e. dolecki
Can tweenfilterlite tween from inner to outer glows elegantly? The server
isn't responding for me to check myself without setting up test code. Might
do anyway.
Eric
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Access MainTimeline reference from within a component

2008-08-27 Thread Helmut Granda
Thanks Leandro... this still gives me the following:
[class Stage]
[object MovieClip]

hum

On Wed, Aug 27, 2008 at 12:27 PM, Leandro Amano
<[EMAIL PROTECTED]>wrote:

> Hi Helmut, try:
>
> for(var i:uint; i  trace(stage.getChildAt(i));
> }
>
> best regards
> --
> Leandro Amano
> Digital Bug
> Chief Creative Officer
> Adobe Certified Expert
> Adobe Certified Instructor
> Adobe User Group Leader
>
>
> On 8/27/08, Helmut Granda <[EMAIL PROTECTED]> wrote:
> >
> > yeah, still get [object LivePreviewParent]...
> >
> > On Wed, Aug 27, 2008 at 12:00 AM, poste9 <[EMAIL PROTECTED]> wrote:
> >
> > > have u tried this.root ?
> > >
> > > 2008/8/27 Helmut Granda <[EMAIL PROTECTED]>
> > >
> > > > Is it possible to access the MainTimeline from within a component? So
> > far
> > > I
> > > > havent been able to access it trying different methods. Most times I
> > get
> > > > the
> > > > same result:
> > > > trace(parent);
> > > > trace(root);
> > > > trace(this.parent);
> > > > trace(this);
> > > > trace(this.parent.parent);
> > > >
> > > > [object LivePreviewParent]
> > > > [object LivePreviewParent]
> > > > [object LivePreviewParent]
> > > > [object MyComponent]
> > > > [object Stage]
> > > >
> > > > But it seems to skip the MainTimeline... basically what I am trying
> to
> > > > access is the File name which I can extract with Describe type for
> the
> > > > MainTimeline, and of course this is easy with objects on the
> timeline.
> > I
> > > > have an init function in a component that tries to get the reference
> to
> > > the
> > > > MainTimeline but so far no luck... any tips?
> > > >
> > > > --
> > > > ...helmut
> > > > ___
> > > > Flashcoders mailing list
> > > > Flashcoders@chattyfig.figleaf.com
> > > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > > >
> > >
> > >
> > >
> > > --
> > > =
> > > Grupo Comunidade de Comunicação
> > > Rafael Lúcio 29809.099333,
> > > fazendo do seu website uma aplicação em tempo real
> > > ms xsl js(dom) css xhtml php mysql pgsql ajax json smarty drupal
> > > ___
> > > Flashcoders mailing list
> > > Flashcoders@chattyfig.figleaf.com
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> >
> >
> >
> > --
> > ...helmut
> > ___
> > 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
>



-- 
...helmut
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] pythagoras question

2008-08-27 Thread Merrill, Jason
Why not just use Point.polar()?  That would do exactly what it seems you
are describing.

Jason Merrill 
Bank of America 
Enterprise Technology & Global Risk L&LD 
Instructional Technology & Media

Join the Bank of America Flash Platform Developer Community 

Are you a Bank of America associate interested in innovative learning
ideas and technologies?
Check out our internal  Innovative Learning Blog & subscribe. 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of allandt
bik-elliott (thefieldcomic.com)
Sent: Wednesday, August 27, 2008 1:00 PM
To: Flash Coders List
Subject: [Flashcoders] pythagoras question

hi guys

I'm doing something wrong in my pythagoras theorum but i'm not seeing
what
it is right now

i'm trying to find out the coordinates for a point on a line. I know the
start x, end x, start y, end y, c length for the line and i know how far
along c the point should be (call it vector length) but i'm a little
stumped
as to where to go from there

the psuedo code for what i've been trying is

vector x = start x / end x
vector y = start y / end y
train x = (vector x * vector length) + start x
train y = (vector x * vector length) + start y

I think i have my maths very wrong here - hope you guys can help

a
___
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] textField fed htmlText renders title

2008-08-27 Thread Mendelsohn, Michael
Excellent H!  Thanks very much!  Glad you had that lying around.

- MM


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] textField fed htmlText renders title

2008-08-27 Thread sebastian
Looks cool, but any chance you could replace your micro-variable names 
with real-world words for easy reading? Reminds me of moments when I 
decide I need to run for coffee at work...

;)

H wrote:

Hey Mike,

public static function stripTag(s:String, t:String):String {
if(typeof(s) == 'string'){
t = t.toUpperCase();
var i:Number = s.length-1, oT:String = '<'+t, cT:String =
'', a)+1;
s = s.substring(0, a) + s.substring(b, s.length);
i = a-1;
}
}
} else s = '';
return s;
}

A little something I had laying around...

H

On Wed, Aug 27, 2008 at 1:00 PM, Mendelsohn, Michael <
[EMAIL PROTECTED]> wrote:


Perfect answer, H.

(Too bad it's AS2.)  :-(

Thanks!
- MM


___
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] pythagoras question

2008-08-27 Thread Steve Abaffy
It sounds to me like your trying to find the x,y coordinates along a line.
If this is the case then:

M = (starty-endy)/(startx-endx)
and
B = -startx + starty

Then
Y = m*x + b where x is the current x location of the train and y will be the
y-coordinate of the train.

I hope this helps.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of allandt
bik-elliott (thefieldcomic.com)
Sent: Wednesday, August 27, 2008 12:00 PM
To: Flash Coders List
Subject: [Flashcoders] pythagoras question

hi guys

I'm doing something wrong in my pythagoras theorum but i'm not seeing what
it is right now

i'm trying to find out the coordinates for a point on a line. I know the
start x, end x, start y, end y, c length for the line and i know how far
along c the point should be (call it vector length) but i'm a little stumped
as to where to go from there

the psuedo code for what i've been trying is

vector x = start x / end x
vector y = start y / end y
train x = (vector x * vector length) + start x
train y = (vector x * vector length) + start y

I think i have my maths very wrong here - hope you guys can help

a
___
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] pythagoras question

2008-08-27 Thread Hans Wichman
Hi,

I don't think pythagoras is involved here.

try:

factor = vectorLength/c;
coordX = startX + (endX-startX)*factor;
coordY = startY + (endY-startY)*factor;

greetz
JC

On Wed, Aug 27, 2008 at 7:00 PM, allandt bik-elliott
(thefieldcomic.com) <[EMAIL PROTECTED]> wrote:
> hi guys
>
> I'm doing something wrong in my pythagoras theorum but i'm not seeing what
> it is right now
>
> i'm trying to find out the coordinates for a point on a line. I know the
> start x, end x, start y, end y, c length for the line and i know how far
> along c the point should be (call it vector length) but i'm a little stumped
> as to where to go from there
>
> the psuedo code for what i've been trying is
>
> vector x = start x / end x
> vector y = start y / end y
> train x = (vector x * vector length) + start x
> train y = (vector x * vector length) + start y
>
> I think i have my maths very wrong here - hope you guys can help
>
> a
> ___
> 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] saving local (XML) files, two projectors talkin'

2008-08-27 Thread sebastian

Hello,

Been searching for answers and I was wondering what options there was 
for saving local XML files; as this seems to be a stickler... (?)


I have two flash files; the two flash applications will run on different 
screens connected to the same computer.


One of them is an already built application that I don't want to edit 
very much, cause it's an ugly monster. Previously it loaded XML files 
from a web-server [which collected SMS/text entries from users], but now 
it needs to read the XML file from the local disk where it is running 
and there is NO internet access anymore. As it reads items from the XML 
it needs to delete the entries. It's display is actually a very large 
projector/LCD mounted on a wall for everyone to see.


The other application, which is connected to a touchscreen interface 
[replacing the need for a user's mobile/cell phone], needs to generate 
lines that feed into the same XML file the beast is reading, so that it 
can generate a sort of queue for it to run through.


The original beast is in AS2 and messy [read: painful to edit any code], 
the new touch screen is clean and in AS3. It's running on all on local 
Window computers as a pair of dual full-screen projectors [.exe files], 
no PHP facilities or local DB I'm afraid.


My question is:

* is there anyway at all to have these two applications read and 
write/delete entries from the XML files?


* If not, what workarounds do I have at my disposal? Can I read/write to 
a text file (*.txt) instead?


* I know "shared objects" exist, am I forced to use this in this situation?

* finally, is there any 'smart' way to "lock" a file or have one of the 
flash files prevent the other from writing/reading to the same file at 
the same time? I don't know if this is an issue, but I could foresee 
file corruption if both flash files try and write to a file at the same 
instant.


Thanks for your insight!!

With kind,

Sebastian.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] textField fed htmlText renders title

2008-08-27 Thread H
Hey Mike,

public static function stripTag(s:String, t:String):String {
if(typeof(s) == 'string'){
t = t.toUpperCase();
var i:Number = s.length-1, oT:String = '<'+t, cT:String =
'', a)+1;
s = s.substring(0, a) + s.substring(b, s.length);
i = a-1;
}
}
} else s = '';
return s;
}

A little something I had laying around...

H

On Wed, Aug 27, 2008 at 1:00 PM, Mendelsohn, Michael <
[EMAIL PROTECTED]> wrote:

> Perfect answer, H.
>
> (Too bad it's AS2.)  :-(
>
> Thanks!
> - MM
>
>
> ___
> 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] Access MainTimeline reference from within a component

2008-08-27 Thread Leandro Amano
Hi Helmut, try:

for(var i:uint; i wrote:
>
> yeah, still get [object LivePreviewParent]...
>
> On Wed, Aug 27, 2008 at 12:00 AM, poste9 <[EMAIL PROTECTED]> wrote:
>
> > have u tried this.root ?
> >
> > 2008/8/27 Helmut Granda <[EMAIL PROTECTED]>
> >
> > > Is it possible to access the MainTimeline from within a component? So
> far
> > I
> > > havent been able to access it trying different methods. Most times I
> get
> > > the
> > > same result:
> > > trace(parent);
> > > trace(root);
> > > trace(this.parent);
> > > trace(this);
> > > trace(this.parent.parent);
> > >
> > > [object LivePreviewParent]
> > > [object LivePreviewParent]
> > > [object LivePreviewParent]
> > > [object MyComponent]
> > > [object Stage]
> > >
> > > But it seems to skip the MainTimeline... basically what I am trying to
> > > access is the File name which I can extract with Describe type for the
> > > MainTimeline, and of course this is easy with objects on the timeline.
> I
> > > have an init function in a component that tries to get the reference to
> > the
> > > MainTimeline but so far no luck... any tips?
> > >
> > > --
> > > ...helmut
> > > ___
> > > Flashcoders mailing list
> > > Flashcoders@chattyfig.figleaf.com
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> >
> >
> >
> > --
> > =
> > Grupo Comunidade de Comunicação
> > Rafael Lúcio 29809.099333,
> > fazendo do seu website uma aplicação em tempo real
> > ms xsl js(dom) css xhtml php mysql pgsql ajax json smarty drupal
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
>
>
>
> --
> ...helmut
> ___
> 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] textField fed htmlText renders title

2008-08-27 Thread Mendelsohn, Michael
Perfect answer, H.  

(Too bad it's AS2.)  :-(

Thanks!
- MM


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] pythagoras question

2008-08-27 Thread allandt bik-elliott (thefieldcomic.com)
hi guys

I'm doing something wrong in my pythagoras theorum but i'm not seeing what
it is right now

i'm trying to find out the coordinates for a point on a line. I know the
start x, end x, start y, end y, c length for the line and i know how far
along c the point should be (call it vector length) but i'm a little stumped
as to where to go from there

the psuedo code for what i've been trying is

vector x = start x / end x
vector y = start y / end y
train x = (vector x * vector length) + start x
train y = (vector x * vector length) + start y

I think i have my maths very wrong here - hope you guys can help

a
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] textField fed htmlText renders title

2008-08-27 Thread Jim Hayes
Naaa! It will still render anything in the  tag, I ran into this
myself! Very annoying, and you wouldn't really expect it.

Only way I found to fix it was to strip out that tag and it's
contents...

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: 27 August 2008 16:23
To: Flash Coders List
Subject: RE: [Flashcoders] textField fed htmlText renders title

myTextField.html = true;
myTextField.htmlText = "yourText"

Jason Merrill 
Bank of America 
Enterprise Technology & Global Risk L&LD 
Instructional Technology & Media

Join the Bank of America Flash Platform Developer Community 

Are you a Bank of America associate interested in innovative learning
ideas and technologies?
Check out our internal  Innovative Learning Blog & subscribe. 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Mendelsohn, Michael
Sent: Wednesday, August 27, 2008 10:03 AM
To: Flash Coders List
Subject: [Flashcoders] textField fed htmlText renders title

Hi list...

I'm feeding some htmlText into a TextField and the string within the
 tag of the html is rendering in the TextField.  Is there a trick
to hide this?

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

__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
__

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Xml menu recursion - AS3 - SOLVED

2008-08-27 Thread Vayu Robins
Yes, it should be child.title instead, and I am sure I tried that many a
times, but for some reason it only works after posting it on the forum. He
he.

Thanks for your help nevertheless Kenneth and Matt.


On 8/27/08 5:18 PM, "Kenneth Kawamoto" <[EMAIL PROTECTED]> wrote:

> Shouldn't it be "trace(child.title);" instead?
> 
> Kenneth Kawamoto
> http://www.materiaprima.co.uk/
> 
> Vayu Robins wrote:
>> Hi.
>> 
>> I am trying to build a dynamic menu system with unlimited submenus.
>> 
>> I have this from Colin Moock's book (Essential AS3) and it works fine.
>> 
>> var xml:XML =  
>> 
>> 
>> Menu1
>> 
>> Menu1 - Sub
>> 
>> Menu1 ­ Sub Sub
>> 
>> 
>> 
>> ;
>> 
>> var xmlList:XMLList = xml.children();
>> parseStructure(xmlList);
>> function parseStructure(xml:XMLList):void
>> {
>> for each (var child:XML in xml)
>> {
>> trace(xml.title);
>> if (child.section != null) parseStructure(child.section);
>> }
>> }
>> 
>> The problem for me arises when I add another section of menus like this:
>> 
>> var xml:XML =  
>> 
>> 
>> Menu1
>> 
>> Menu1 - Sub
>> 
>> Menu1 ­ Sub Sub
>> 
>> 
>> 
>> 
>> 
>> Menu2
>> 
>> Menu2 - Sub
>> 
>> Menu2 ­ Sub Sub
>> 
>> 
>> 
>> ;
>> 
>> Is it the xml that is wrong?
>> 
>> Thanks
>> Vayu 
> ___
> 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] textField fed htmlText renders title

2008-08-27 Thread H
I think pre parsing the string is your only option.

textField.htmlText = myString.replace(/.+?<\/title>/g, "");

Might be easier to do if the html text is xml compliant. Make it an xml
object and run an xml query on to get all nodes where node.name().toString()
!= "title"...

H

On Wed, Aug 27, 2008 at 10:03 AM, Mendelsohn, Michael <
[EMAIL PROTECTED]> wrote:

> Hi list...
>
> I'm feeding some htmlText into a TextField and the string within the
>  tag of the html is rendering in the TextField.  Is there a trick
> to hide this?
>
> 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


RE: [Flashcoders] textField fed htmlText renders title

2008-08-27 Thread Merrill, Jason
myTextField.html = true;
myTextField.htmlText = "yourText"

Jason Merrill 
Bank of America 
Enterprise Technology & Global Risk L&LD 
Instructional Technology & Media

Join the Bank of America Flash Platform Developer Community 

Are you a Bank of America associate interested in innovative learning
ideas and technologies?
Check out our internal  Innovative Learning Blog & subscribe. 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Mendelsohn, Michael
Sent: Wednesday, August 27, 2008 10:03 AM
To: Flash Coders List
Subject: [Flashcoders] textField fed htmlText renders title

Hi list...

I'm feeding some htmlText into a TextField and the string within the
 tag of the html is rendering in the TextField.  Is there a trick
to hide this?

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


Re: [Flashcoders] Xml menu recursion - AS3

2008-08-27 Thread Matt S.
I just tried your code and it works fine for me. Can you elaborate on
the problem you're having?

.m

On Wed, Aug 27, 2008 at 10:54 AM, Vayu Robins <[EMAIL PROTECTED]> wrote:
> Hi.
>
> I am trying to build a dynamic menu system with unlimited submenus.
>
> I have this from Colin Moock's book (Essential AS3) and it works fine.
>
> var xml:XML =
>
>
>Menu1
>
>Menu1 - Sub
>
>Menu1 ­ Sub Sub
>
>
>
>;
>
> var xmlList:XMLList = xml.children();
> parseStructure(xmlList);
> function parseStructure(xml:XMLList):void
> {
>for each (var child:XML in xml)
>{
>trace(xml.title);
>if (child.section != null) parseStructure(child.section);
>}
> }
>
> The problem for me arises when I add another section of menus like this:
>
> var xml:XML =
>
>
>Menu1
>
>Menu1 - Sub
>
>Menu1 ­ Sub Sub
>
>
>
>
>
>Menu2
>
>Menu2 - Sub
>
>Menu2 ­ Sub Sub
>
>
>
>;
>
> Is it the xml that is wrong?
>
> Thanks
> Vayu
> ___
> 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] Xml menu recursion - AS3

2008-08-27 Thread Kenneth Kawamoto

Shouldn't it be "trace(child.title);" instead?

Kenneth Kawamoto
http://www.materiaprima.co.uk/

Vayu Robins wrote:

Hi.

I am trying to build a dynamic menu system with unlimited submenus.

I have this from Colin Moock's book (Essential AS3) and it works fine.

var xml:XML =  



Menu1

Menu1 - Sub

Menu1 ­ Sub Sub



;

var xmlList:XMLList = xml.children();
parseStructure(xmlList);
function parseStructure(xml:XMLList):void
{
for each (var child:XML in xml)
{
trace(xml.title);
if (child.section != null) parseStructure(child.section);
}
}

The problem for me arises when I add another section of menus like this:

var xml:XML =  



Menu1

Menu1 - Sub

Menu1 ­ Sub Sub





Menu2

Menu2 - Sub

Menu2 ­ Sub Sub



;

Is it the xml that is wrong?

Thanks
Vayu 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Xml menu recursion - AS3

2008-08-27 Thread Vayu Robins
Hi.

I am trying to build a dynamic menu system with unlimited submenus.

I have this from Colin Moock's book (Essential AS3) and it works fine.

var xml:XML =  


Menu1

Menu1 - Sub

Menu1 ­ Sub Sub



;

var xmlList:XMLList = xml.children();
parseStructure(xmlList);
function parseStructure(xml:XMLList):void
{
for each (var child:XML in xml)
{
trace(xml.title);
if (child.section != null) parseStructure(child.section);
}
}

The problem for me arises when I add another section of menus like this:

var xml:XML =  


Menu1

Menu1 - Sub

Menu1 ­ Sub Sub





Menu2

Menu2 - Sub

Menu2 ­ Sub Sub



;

Is it the xml that is wrong?

Thanks
Vayu
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] textField fed htmlText renders title

2008-08-27 Thread Mendelsohn, Michael
Hi list...

I'm feeding some htmlText into a TextField and the string within the
 tag of the html is rendering in the TextField.  Is there a trick
to hide this?

Thanks,
- Michael M.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Access MainTimeline reference from within a component

2008-08-27 Thread Helmut Granda
yeah, still get [object LivePreviewParent]...

On Wed, Aug 27, 2008 at 12:00 AM, poste9 <[EMAIL PROTECTED]> wrote:

> have u tried this.root ?
>
> 2008/8/27 Helmut Granda <[EMAIL PROTECTED]>
>
> > Is it possible to access the MainTimeline from within a component? So far
> I
> > havent been able to access it trying different methods. Most times I get
> > the
> > same result:
> > trace(parent);
> > trace(root);
> > trace(this.parent);
> > trace(this);
> > trace(this.parent.parent);
> >
> > [object LivePreviewParent]
> > [object LivePreviewParent]
> > [object LivePreviewParent]
> > [object MyComponent]
> > [object Stage]
> >
> > But it seems to skip the MainTimeline... basically what I am trying to
> > access is the File name which I can extract with Describe type for the
> > MainTimeline, and of course this is easy with objects on the timeline. I
> > have an init function in a component that tries to get the reference to
> the
> > MainTimeline but so far no luck... any tips?
> >
> > --
> > ...helmut
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
>
>
>
> --
> =
> Grupo Comunidade de Comunicação
> Rafael Lúcio 29809.099333,
> fazendo do seu website uma aplicação em tempo real
> ms xsl js(dom) css xhtml php mysql pgsql ajax json smarty drupal
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
...helmut
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] OT: List of all uk towns and cities with their longitude and latitudes

2008-08-27 Thread Paul Steven
Thanks Glen

I will take a look though I suspect the Post Office data is very expensive!!

P

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Glen Pike
Sent: 26 August 2008 20:56
To: Flash Coders List
Subject: Re: [Flashcoders] OT: List of all uk towns and cities with their 
longitude and latitudes

Hi,

Have a look at some of the Post Office "Address Products":


http://postcode.royalmail.com/portal/rm/jump1?catId=400120&mediaId=400084 


The "Post Town Gazetter" looks promising.  You may be able to hook 
into the Google API with this, or similar to get Long & Latitude:

http://developer.yahoo.com/maps/rest/V1/geocode.html


http://jamesewelch.wordpress.com/2007/10/05/how-to-convert-a-street-address-to-longitude-and-latitude-geocoding-via-web-services/
 
  


HTH

Glen

Paul Steven wrote:
> I am creating a UK based estate agent site and would like to implement a 
> proximity search function.
>
> i.e the user would type in the area that they are looking for a house as well 
> as a search radius and the site would display a list of all matching houses 
> for sale in this area.
>
> I am assuming I will need a list of every town, village and city in the UK 
> with their associated longitude and latitude however I am really struggling 
> to find one. Can anyone suggest where I can find such a list. I don't mind 
> paying for one assuming I don't have to sell my house to do so.
>
> If I can get this list, then my theory is to use pythagoras theorem to work 
> out which properties are within the specified radius. Not sure how practical 
> this will be.
>
> So if anyone has created similar functionality I would really appreciate some 
> tips.
>
> Thanks in advance
>
> Paul
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
>
>   

-- 

Glen Pike
01326 218440
www.glenpike.co.uk 

___
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] RE: is there a recognised date format for xml?

2008-08-27 Thread S0 F1
Not that I'm aware of.

Just use as3 inbuilt getTime() method and run it through an algorithm - then
display it however you want.

Or use server side code for similar effect - probably a little more evolved
than as3 at this stage.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] A Question that I've been asking for years!!

2008-08-27 Thread Ian Thomas
On Wed, Aug 27, 2008 at 7:30 AM, Mark Winterhalder <[EMAIL PROTECTED]> wrote:

> Say you write a class that draws a pretty chart. It has a method that
> reads a series of values by repeatedly calling readInt(), which is
> guaranteed by IDataInput, and draws that data. If your method takes a
> ByteArray, it works fine for preloaded or locally stored data. If it
> takes a Socket, it works for a live data stream off the net. But if it
> takes an IDataInput, it can do both, without any additional effort --
> you pass it a /data source/, and decide at runtime where you get it
> from.

Mark wins the clear explanation award. :-D

> You don't have to work in a team to appreciate interfaces.

I agree. Other places that I find them useful are:

- Writing some sort of plugin-based system, where app A wants to talk
to app B; both are compiled in isolation (and possibly by different
people or teams). Agreeing on and writing a simple interface means
that both apps can be compiled against that interface, and it really
doesn't matter about the internals of either app. For example, a
portal site that loads games; the portal might offer an interface to
the loaded games to be able to record their scores. If written to an
interface (rather than compiled against potentially changing more
complex code), games written for portal v1 will work for portal v3 and
beyond. Or maybe even for other people's portals. :-)

- The same applies to an app that's broken into modules; if the main
app contains all the 'real' code and the submodules are written to
talk to interfaces, then the bulk of the code is only compiled (and
loaded) once. (You can achieve the same thing with externs or exclude
lists, but I find it easier with interfaces.)

- As a marker or tag. (This is used a lot in Java). If you want to
mark somehow that a class is 'special' - the typical example would be
if you want to mark a class as being safely serialisable without
additional code - you have it implement an interface with no methods
e.g. public interface ISerializable {}.  If your class implements that
interface, then the test 'if (yourObj is ISerializable)' comes out
true, and your code can make decisions based on that. (This is how
things were done before metadata - in AS3, I'd do it with metadata.)

- Where inheritance really doesn't work. For example, what if you want
to offer a common logging facility - say a log() method - to loaded
classes within your application. You could pass them an instance of
your main application, MyApp, which defines the log() method. But what
if you reuse that code in another app, MyApp2? Then you'd either need
to recompile, or find a common base class. Fine, create a common base
class - CommonApp, which defines the log() method, and have MyApp and
MyApp2 both derive from that. But what if those two apps are unrelated
and can't inherit from a common user-defined base class - for example,
one is a WindowedApplication (for use in AIR) and the other is a plain
old Application? They can't share a common base... so what do you pass
to your classes that want a logger and where do you define log()? The
answer is to define a common interface, e.g. IApp that supports log(),
and pass that instead.

That is probably far less clear than Mark's example. :-)

Ian
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders