[Flashcoders] polymorphism question (design)

2006-12-18 Thread Millie Niss
I am trying to design an application that will need a Graph object.  For some 
things, I need only a graph data structure (ie a set of nodes along with an 
adjacency matrix that says which nodes are connected to which other nodes).  In 
other parts of the application, I will need a graph movie clip (GraphClip 
object), in which there is a an icon (movieclip) for each node and the nodes 
have coordinates on the screen and so forth.  For this second kind of graph, 
the nodes will be draggable and the edges and nodes will be selectable.  I 
already made this work in one big class but now I see I will want sometimes to 
have only the data structure without the movieclips so I think I should break 
the class in two.  

The most obvious design would seem to use inheritance: Graphclip
extends Graph, but I was just reading a book on design patterns
(Design Patterns Explained by Shalloway and Trott) which has a big
emphasis on using composition rather than inheritance, so this made me
think maybe that the GraphClip class should have a property that is a
Graph.

I envision needing graphs that need to interact with the user in different 
ways.  One kind needs draggable nodes where the edges follow alomg as you drag 
(I did that).  Another will need nodes you can click on to trigger some event.  
Another might need the edges to be selectable, or the polygons formed by the 
edges (this is for graphs whose edges do not cross, which was a problem I 
posted about previously).   The variations don't logically fall into a singfle 
chain of inheritance since I might need a combination of features.  I vaguely 
recall that the Decorator Pattern deals with this, however, so that isn't what 
really confuses me.

I become confused and my class diagram looks like spaghett when I start to try 
to deal with the nodes.  The nodes in the Graph don't need any data whatsoever: 
all nodes in a mathematical graph are identical.  The nodes (NodeClips) in the 
GraphClip need to know where they are and what icon is used to display them.  
Again, translating this stupidly into an OO design would use inheritance (the 
nodes that have a position would inherit from the generic node type), but then 
it gets confusing because GraphClips would need an array of NodeClips, whereas 
Graphs could use plain Nodes.  But if the GraphClip contained a Graph property, 
then that Graph would either have to have NodeClips instead of plain Nodes, or 
one would need a second array of NodeClips to store the node positions.   
Yucch.  The first way is confusing but possible to do since NodeClips are Nodes 
and so you could construct a Graph that had NodeClips.  The second thing 
(duplicating the node array) is obviously bad.  I
 am sure the correct solution uses neither of these designs.

I sometimes find that every time I read a book on software architecture, it 
messes me up and I design worse programs.  The design patterns book is quite 
good and as I read I felt I was understanding it.  But when I went to start 
designing a program after reading the book, I found myself more confused.  I 
don't think it is the book's fault -- it is good and quite clear -- but that 
half-digested design advice mixed with half-understood new ideas make for worse 
program architectures than one's previous more limited but well-worked 
repertoire of design methods.  Hopefully, after reading the book again or 
taking more time to think the ideas through, I will actually benefit from 
having read it.  If I cannot do that, at least the bad effect should wear off 
once I forget the book's advice...

Millie

(By the way, I used Grant Skinner's gModeler to draw possible class
diagrams and I was quite pleased with the way the diagrams printed
etc.  I found it slightly hard to edit links, but otherwise the program
was quite easy to use.)

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] TextArea Component (Flash 8)

2006-12-15 Thread Millie Niss
I'm embarking on a project which will use text from 
a mySQL database and I will probably want to embed images and have links in the 
text.  The obvious way to do this is to encode the text as HTML, but my 
previous 
experience (with Flash MX 2004 Pro) was that the TextArea component was very 
broken and especially bad at rendering HTML.  In my last project that used a 
ton 
of text, I think I resorted to using TextFields with TextFormat objects to 
decorate the text (bold etc.) and I made my own scrollbars.  Obviously, I would 
prefer to use the prebuilt component, if it has been fixed in Flash 8.  (The 
worst bug was that using the scrollbar on the component selected all the text 
and I couldn't make it unselectable.)

 

Have they increased the puny amount of HTML that is 
allowed in Flash?

 

Have other people tried to use CSS in Flash?  I 
read the docs and it seemed cumbersome but I have enough text to process in 
this 
project that it may be worth the trouble.

 

If I don't mark up the text itself as HTML, I will 
have to do a bunch of string searching (which doesn't seem to be provided for 
with library functions in Flash) to locate the words that I will need to 
boldface, plus making them clickable could be very painful if I have to attach 
invisible buttons above the textfield, for example.  (Positioning the buttons 
sounds very painful!)

 

Millie Niss
[EMAIL PROTECTED]
http://www.sporkworld.org


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Actionscript 3 Books

2006-12-15 Thread Millie Niss
I was just looking at Joey Lott's Advanced Actionscript 3 With Design 
Patterns book in the store, and it looked pretty good, but it had knowledge 
of Actionscript 3 as a pre-requisite.  I am not aware of any (print) books 
introducing Actionscript 3...  Are there any?  I'd like to start learning it (I 
saw that regular expressions are supported and that alone would be nice...) but 
I don't like the idea of learning a programming language from beta versions of 
Adobe's Help...

Millie

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] charting/graphing component needed

2006-11-26 Thread Millie Niss
Are there good free charting (I need customizable bar graphs and line graphs of 
small data sets) components or class libraries?  I know ex-Macromedia had some 
v1 Charting Components but they cost $$ and of course I do not want v1 
components (do they have v2 versions for this?) available on line?  I have a 
good idea of how to roll my own, so I don't need code examples (it's easier to 
start from scratch than to rewrite someone else's code) but if there is a nice 
open source or at least free package I would be very interested.  I would 
prefer not to have to learn an entire framework just to get the charts, and I 
definitely don't want something that weights down the published swfs.  I am 
using the Flash 8 Pro IDE w/Actionsript 2.0.

Thanks.

Millie


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] migrating to Flex

2006-11-26 Thread Millie Niss
Am I the only one on this list who (still) uses the Flash IDE (Flash 8 Pro) and
hasn't migrated to AS 3.0 or any version of Flex? 

I am interested in
both but do not want to fork over any more $$ to ex-Macromedia.  (I feel 
cheated by having paid for many versions of the educational versions because 
they don't upgrade then many versions of full software because the Macromedia 
packages I had didn't have an upgrade path to the newer bundled Adobe products 
such as Creative Suite 2 or the Adobe Video Bundle.)

What
is the minimum cost to start using Flex?  (I mean in a production
version.  I do not want to start using a beta or a trial of something
and then have it break and be stuck.)  What are the ongoing costs to
deploy Flex apps?  I have looked at the website but found it confusing
and they keep changing pricing...   I want a rough idea of what it
actually costs developers to switch to Flex and deploy the apps etc.

What if anything will I lose by switching to Flex?  I use the Flash IDE a lot 
for design now but most projects have extensive coding as well.  Can I use Flex 
for the code and still use the IDE for design?


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Google queries / iweb services / API in A.S. 2.0.

2006-11-12 Thread Millie Niss
Please forgive me if this is a repost.  It did not appear for over 24 hours 
after I posted it.  I changed the subject line in case the spam filters 
blocked it due to killwords in the subject...


This may be a very stupid question, but I did search online and not find the 
answer.  I saw examples of Flash apps (eg the quite fun Guess-the-Google 
http://grant.robinson.name/projects/guess-the-google/ game) that grab images 
from Google Image search, but I couldn't find any coding examples.  I don't 
even know if the right way to do it is stupidly low-tech (by making a query 
string URL and parsing the page Google returns) or involves web services 
etc. (which I have never used).


I am supposed to call the potential client tonight to tell her whether I can 
do it and how much work is involved etc.  She hired someone else a few years 
ago (a professional programmer on her campus IT staff) to do it  who was 
unable to figure out how to grab Google images and incorporate them into the 
page.  He used Javascript/DHTML as the front end.  I intend to use Flash as 
there are many multimedia elements.


I have a potential client who wants their site to incorporate Google Image 
Search results.  I have never used Google web services or their APIs,  so I 
don't know how much work this will involve and what server side resources 
are required.  I will be using Flash 8 and PHP (if necessary).


Also, do people use the Flash webservices component/class for anything 
real or does one always end up doing one's own server-side coding (aside 
from wrapping the web services call to get around security restrictions)? 
Is there a reason to use a web service rather than constructing a query 
string and parsing the results?


Forgive me if this is newbieish.  I am a server side newbie, but not an 
Actionscript newbie.


Millie Niss
[EMAIL PROTECTED]
http://www.sporkworld.org



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Google image search from Actionscript

2006-11-12 Thread Millie Niss
I have a potential client who wants their program to incorporate Google 
Image Search results.  I have never used Google web services or other 
programming tools, so I don't know how much work this will involve and what 
server side resources are required.  I will be using Flash 8 and PHP (if 
necessary).


Also, do people use the Flash webservices component/class for anything real 
or does one always end up doing one's own server-side coding (aside from 
wrapping the web services call to get around security restrictions)?  Is 
there a reason to use a web service rather than constructing a query string 
and parsing the results?


Forgive me if this is newbieish.  I am a server side newbie, but not an 
Actionscript newbie.


Millie Niss
[EMAIL PROTECTED]
http://www.sporkworld.org

regards

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com






___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Noob, basic questions on actionscript, book suggestion

2006-11-10 Thread Millie Niss
I looked at that XML book in the bookstore and dicovered its ghastliness in 
time. The very worst Flash book I ever bought was one of the first 
Actionscript 2.0 books: Object-Oriented Programming with ActionScript 2.0 by 
Tapper, Talbot, Haffner (New Riders, usually an ok press).  I read it and 
thought one would have to write about 10,000 lines of very cryptic code to 
make a component or even a subclass of MovieClip.


Early on, I bought loads of early friendsofed books that were really, really 
bad, in the Flash 5 days when they were almost the only press to cover 
advanced Flash programming.  But several of their more recent books are 
actually good.  Aside from the XML one, Flash 8 Essentials actually covers 
the new Actionscript (along with IDE stuff) in a serious way in a short 
book, and the new Object Oriented Actionscript (Elst/Yard) is also good and 
uses design patterns.



Millie Niss
[EMAIL PROTECTED]
http://www.sporkworld.org
- Original Message - 
From: Ryan Potter [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Friday, November 10, 2006 11:51 AM
Subject: RE: [Flashcoders] Noob, basic questions on actionscript,book 
suggestion



I bought that book too.  It is the worst computer book I have ever read.
At their talk they gave on the subject at MAX a couple of years ago (it
could have been flash forward), Joey Lott kept having to correct them from
the audience.  He was so nice about it, but it was pretty obvious they
didn't know what they were talking about.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: Thursday, November 09, 2006 4:21 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Noob, basic questions on actionscript,book
suggestion


This is not the same book as some older friendsofed books on XML and

Flash

(using A.S. 1.0/older versions of Flash) which were terrible.


LOL.  Another XML and Flash book to avoid is Flash and XML: A
Developer's Guide by Dov Jacobsen and Jesse Jacobsen.  Very pretty, but
filled full of off-topic stuff and hardly anthing you can make much use
of, let alone understand.  Not only that, filled full of Flash
worst-practices.  I wasted a good $35 on that one a few years back.
Should have plopped into one of those cushy chairs at Borders and
skimmed for a good while instead of making a quick impulse buy. Anyway,
just have to get that off my chest  =:)


Jason Merrill
Bank of America
Learning  Organizational Effectiveness



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] efficient line segment intersection algorithm?

2006-11-09 Thread Millie Niss
hitTest has a version that tests a point against the actual shape of a 
MovieClip.  The other varaiation tests two MovieClips, but only compares 
their bounding boxes, not the actual shapes.


I found a useful segment intersection algorithm in the book

_Computational Geometry: Algorithms and Applications_, by Mark de Berg
http://www.amazon.com/Computational-Geometry-Algorithms-Applications-Second/dp/3540656200/ref=pd_ys_qtk_rvi_img/102-1020427-4119337

which I bought (will be shipped tomorrow).

The algorithm is quite understandable and efficient.  It does use binary 
trees, so I have to code a binary tree class before I can implement the 
algorithm.  I guess that is good practice for me because I just started 
doing AS 2.0 OOP stuff.   (I did C++ in the Bad Old Days, so I am not an OO 
neophyte, but the bad old days were a long time ago.  I don't even think 
design patterns were invented.  If they were, they were not taught at my 
university.)


ObGripe: I was impatient so I also bought the online electronic edition ($10 
after buying the book at regular price) from Amazon and was able to get the 
algorithm I needed (good explanation with background, discussion of 
time/space issues, and pseudocode; no sample source but that's the way I 
prefer it).  I was annoyed to discover that one has to print the pages in 
the e-book one at a time (and they come up slowly -- on DSL -- and print 
slowly...) rather than by specifying a range of pages.  The ad about the 
online book said it was printable, and it never occurred to me that the 
printing would be so difficult and slow.  Also, the pubisher has a limit on 
how many pages you are allowed to print (not specified either, so I guess it 
will just stop printing when I reach the limit).  Aaagh.


Millie Niss
[EMAIL PROTECTED]
http://www.sporkworld.org
- Original Message - 
From: JulianG [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Thursday, November 09, 2006 8:00 AM
Subject: Re: [Flashcoders] efficient line segment intersection algorithm?


I think HitTest only works with the bounding box of the MovieClip. So it's 
not appropriate for what you're doing.
Try this Metanet Tutorial: Beyond HitTest() 
http://www.harveycartel.org/metanet/tutorials.html Collision Detection 
in Flash.


cheers,
JulianG


Millie Niss wrote:


It occurred to me that possibly hitTest doesn't work to check whether a 
point intersects with a clip that has strokes but no fills (ie my 
edges)... Does hitTest use the pixels of strokes or does it only use the 
insides of fills as the area it checks the test point against?



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] efficient line segment intersection algorithm?

2006-11-09 Thread Millie Niss
I want to see if a circle hits a network of line segments.  Alternatively, I 
need to test for self-intersections in the nework of line segments.  The 
problem is to allow the user to drag nodes of the network but not let them 
make the lines cross or drag nodes on top of each other.  The circle is 
small enough (it's just a small circle on top of the node (places where 
segements meet) that it would be enough to test if the center hits a line 
segment, which is why I initially tried to do it with hitTest.


I think the sweep algorithm is what I need.  The book does seem to be good 
at least in that one chapter.


Thanks to the person who recommended an AS 2.0 implementation of the 
priority queue.  I just looked and it is a better implementation than I 
would have done.  I am lazy and would have a tendency to implement only the 
methods I need in a stupid inefficient manner, thus going against the whole 
modularity/reusability goal of OO.


(On the other hand, that is what Extreme Programming gurus advocate -- they 
say most code never gets reused and that you should code only to specs you 
actually need for the specific problem you are solving.  In my case, the 
network of line segments has to be pretty small because it will be drawn and 
manipulated by the user on the screen.)


Are there comprehensive graphics libraries for AS 2.0.?  I am interested 
only in 2d, but it would be cool to have a lib that does image processing 
stuff along with 2d shape stuff.  Of course 3d would be cool also, but my 
guess is that fake 3d in Flash would be too slow to make it worthwhile to 
have a really serious 3d library ala OpenGL.  (Such a thing wasn't even 
conceivable prior to Flash 8 because you need the bitmap classes to do 
shading and lighting, let alone texture mapping.


BTW (off-topic): What is the standard comprehensive computer graphics text 
these days?  When I was in grad school, it was Foley-Van Dam (and some of my 
friends worked for Andy Van Dam so they considered no other book) but I have 
heard it is quite out-of-date.



Millie Niss
[EMAIL PROTECTED]
http://www.sporkworld.org

- Original Message - 
From: Glen Pike [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Thursday, November 09, 2006 3:57 PM
Subject: Re: [Flashcoders] efficient line segment intersection algorithm?



Hi,

   If the movie clips are circular, you may be faster using your own 
maths...


   Hit test will see if a point is in a clip, but you only want to see if 
2 circles are touching.


   Jobe Makar's book Macromedia Flash MX Game Design Demystified gives 
this solution - called Circle to Circle detection.

   To summarise:

   It you have circle_1 and circle_2
  distance from circle_1 to circle_2 centre is found with Pythagoras. 
Math.sqrt( x * x + y * y)


   If distance = (circle_1.radius - circle_2.radius)  (the circles are 
touching / overlapping)


   Hope this helps.


Glen
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Noob, basic questions on actionscript, book suggestion

2006-11-09 Thread Millie Niss
If you plan to do a lot of Flash XML stuff, the book XML for Flash by Sas 
Jacobs (2006, friendsofed) is pretty good.  It is overkill however if you 
only downloaded the 30 day trial version of Flash or don't need to know 
about XML handling in detail.  I had a lot of trouble figuring out how to 
parse XML in Actionscript (do other people also find the XML class to be 
clunky?) and now find it fairly easy as a result of reading the book.


Two caveats however: 1) book explains XML from scratch so if you already 
understand XML in general that part is a waste.  2) book contains some 
Microsoft-centric stuff which irritated me but is probably useful to many 
readers.  (Stuff on how to use Excel and Word to handle XML files in a Flash 
development workflow which I felt was off-topic)


This is not the same book as some older friendsofed books on XML and Flash 
(using A.S. 1.0/older versions of Flash) which were terrible.


Millie Niss
[EMAIL PROTECTED]
http://www.sporkworld.org
- Original Message - 
From: Scott Haneda [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Thursday, November 09, 2006 5:13 PM
Subject: Re: [Flashcoders] Noob, basic questions on actionscript, 
withmethodology suggestions




Hi,

You will need to move external_xml.load call below the onLoad
function because your file will probably be loaded before the handler is
defined (locally).

with trace(myXML) you have defined myXML inside the function -
this means it is not in scope outside the function.  Try:

  var external_xml:XML = new XML();

   //trace if loaded, or not
  external_xml.onLoad = function(success:Boolean) {
if (success) {
trace(xml loaded successfully.);
//Do something with the XML in here.
}  else {
  trace(xml failed to load.);
}
 };

//variable loads external XML file afterwards
external_xml.load(example1.xml);

trace(external_xml);


I get nothing at all on the final trace, not null, not undefined, just
blank.
--
-
Scott HanedaTel: 415.898.2602
http://www.newgeo.com Novato, CA U.S.A.


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Best way to detect an idle user?

2006-11-09 Thread Millie Niss
you might want a general purpose system where you could specify what is to 
be considered in determining idleness.  For example, do you check:


-- only clicking (on the grounds that someone could be moving the mouse 
around, for example to check tooltips or just aimlessly, but that they are 
idle of they aren't selecting/dragging etc.

-- mouse movements
--keystrokes (which ones?)
--data flow from/to server
--playing videos or sounds
--playing loaded swfs or subclips
etc.

seems to beg for some kind of observer or broadcaster pattern where you 
subscribe your idel detector to various events


Millie Niss
[EMAIL PROTECTED]
http://www.sporkworld.org
- Original Message - 
From: Ben [EMAIL PROTECTED]

To: 'Flashcoders mailing list' flashcoders@chattyfig.figleaf.com
Sent: Thursday, November 09, 2006 5:19 PM
Subject: RE: [Flashcoders] Best way to detect an idle user?



Is it possible for you to decide wether a user is idle or not, by judging
his mouse movements? Or is it required to actually measure the usage of
particular elements? If you can suffice with the movement, it might be
enough to create a seperate 'idle checking' class which either listens to
mousemove events of for even less overhead, checks the mouse coordinates 
at

given intervals. Then say after e.g. 3 check intervals if the coords are
still the same, assume the user is inactive.



 _

Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Pete Miller
Verzonden: donderdag 9 november 2006 22:45
Aan: Flashcoders mailing list
Onderwerp: [Flashcoders] Best way to detect an idle user?




My application starts with a user login/authentication.  I want to
implement an idle user process that logs the user out after X amount of
time of no activity.

The most obvious way I can think to do this is to start an interval
timer, and keep reseting it any time a widget is used.  That means
adding a reset-function call to every component event handler, plus
adding event handlers for many components that otherwise don't have
relevant events.

Does anyone have a more clever way of handling this?
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] efficient line segment intersection algorithm?

2006-11-08 Thread Millie Niss
As part of an app I'm writing, I need users to be able to manipulate a 
drawing of a graph:   Specifically, I have a bunch of circles (nodes) 
connected to each other by line segments (edges).  Users can drag the 
nodes around within a fixed area (this part works), but I need to stop them 
from making the edges intersect each other (except where they meet at the 
nodes).


I tried to do this using MovieClip.hitTest (each edge is its own MovieClip, 
and I know the coordinates of all the nodes) but it didn't work.  I am sure 
there is a bug in my code, which I need to find.


Even if I fix it, however, the stupid algorithm that goes through every node 
and checks if it hits any edge in the obvious (2 nested for loops) way is 
horribly inefficient -- I probably need to do the math myself rather than 
relying on hitTest.  The number of nodes is user-configurable so even if I 
get the stupid algorithm to work on my baby test case, I am worried that it 
won't scale.


It occurred to me that possibly hitTest doesn't work to check whether a 
point intersects with a clip that has strokes but no fills (ie my edges)... 
Does hitTest use the pixels of strokes or does it only use the insides of 
fills as the area it checks the test point against?


Millie Niss
[EMAIL PROTECTED]
http://www.sporkworld.org 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] [ot-ish] Screen recording software for Windows?

2006-11-05 Thread Millie Niss
I have used the flash to video encoder from www.geovid.com   I think it is 
probably not high enough quality for your needs, but you might want to give 
it a try.  The free version puts a watermark on the output, but there is a 
very easy workaround.


Millie Niss
[EMAIL PROTECTED]
http://www.sporkworld.org
- Original Message - 
From: Josh Santangelo [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Friday, November 03, 2006 3:58 PM
Subject: [Flashcoders] [ot-ish] Screen recording software for Windows?


I'm usually a Mac guy and have lots of fun with SnapzProX, but I need 
something similar for recording on-screen interactions to video files in 
Windows. Preferably I'd like to be able to get big, uncompressed video 
files out of it for later editing. Does anyone have a favorite for this 
sort of thing? I've heard of Camtasia Studio, but it looks like it's $300. 
I think my limit would be about $100.


thanks,
-josh
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] push info from server to flash?

2006-10-22 Thread Millie Niss
Is there any way to push information from a server side script (PHP) to a 
flash client, rather than having the Flash ask for it by calling a PHP page? 
I want to create a virtual world whose state will be maintained in a MySQL 
database.


Multiple users will be able to connect, view, and interact with the world.

I need a way for the view (flash client) seen by one user to know when 
something another user has done has changed the world.  I could poll the 
server regularly with a setInterval, but that seems wasteful of bandwidth.


Most of the action in the world will be computed by the clients on their 
own; they just need to be informed when relatively rare events happen caused 
by other users.  (The creatures who live in the world will keep moving 
around on their own according to a prescribed behavior, and will just need 
to be informed when someone does something to them.)  Ideally, the creatures 
would do the same thing in all the users' views, but this would require 
constant back-and-forth communication with the server.  I am debating 
whether to fake it by having them work independently (so that viewers won't 
really see the same world) except when they interact.


Millie Niss
[EMAIL PROTECTED]
http://www.sporkworld.org 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] hot spots for buttons not where they appear

2005-11-11 Thread Millie Niss
Hello---

I hope someone can help me with this problem, which I have had a bunch of times 
in Flash:  I often make hypertext in Flash by making an invisible button and 
placing instances of it on a layer above the text I want to make clickable.  I 
make the button by having nothing in the up, over, or down frames and a square 
in the hit frame.  Then when you drag the button onto the stage, it appears as 
a transparent blue square which you can resize and place over the text you want 
people to click, and then you define call-back functions on each instance to 
make it execute whatever code is desired...  (I can't use HTML links to do what 
I want since I want complex Actionscript to execute when there is a click, not 
just to load a web page...)

Unfortunately, when I test my movies sometimes, the acual hot area is not quite 
where the blue area is in the authoring environment.  I just did a piece with 
30 hyperlinked words this way, and the buttons had to be positioned by trial 
and error and to make them work, they had to be put at least 30 pixels offset 
from where it looked like they should be placed.

Does anyone have an explanation or fix for this?  It happens only in some 
projects and I always create the invisible buttn the same way.  I am using 
Flash MX 2004 Pro on a PC/Win XP.

Millie
www.sporkworld.org
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders