[Flashcoders] flash changing size on mouseover

2007-04-26 Thread Darren Cook
Hi FlashCoders,
I'd like to make a flash movie that displays small most of the time but
when clicked, or on mouseover, it opens up big (either covering up the
rest of the web page - which will be standard HTML - or shuffling down
the rest of the web page). This isn't for a banner, but I've seen it
used with some advertising banners.

Could someone tell me if this is something done in the flash, or is the
actual resizing being done by javascript? Is there a standard name for
this technique, as my googling is not turning up much. The closest I've
seen is this:
  http://www.flashdesignerzone.com/tutorials/t1020.php

But (in firefox with linux flash 9 plugin) that simply does not work - I
see a big white rectangle for the expanded size, and it is covering up
the text in the web page!

Thanks in advance,
Darren



-- 
Darren Cook
http://dcook.org/mlsn/ (English-Japanese-German-Chinese free dictionary)
http://dcook.org/work/ (About me and my work)
http://dcook.org/work/charts/  (My flash charting demos)
___
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] Drawing pie charts?? (using Flash MX)

2006-12-22 Thread Darren Cook
A month ago, Boyd asked:
 Anyone know where to find algorythms or code scraps that would let me
 draw pie graphs using dynamic data? I am using the older Flash 6.

And, also a month ago, Eric Dolecki asked:
 Q: Has anyone seen a dynamic pie chart component that allows one to add
 slices with code, remove them with code, and also allows one to click and
 drag edges of slices around to allow a user to manually change the % data
 for slices? 

Then, nearly a month ago, Millie Niss asked:
 Are there good free charting (I need customizable bar graphs and line
 graphs of small data sets) components or class libraries? ...
 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.


Sorry for the late reply. dcflash is an open source ActionScript 2
library with a main focus on charting (also support classes for storing
time series data, statistics - especially for financial charting,
back-end connections, etc.).

Version 0.1.0 was release a month ago. Some chart styles are still to be
brought in, but the pie chart class is quite solid and quite advanced.
You can see my pie chart demo here:
   http://dcook.org/work/charts/pie_chart_demo.html

To Boyd: all classes in the library work with Flash 6 (the above demo is
Flash 7 solely because of using Aswing for the UI).

To Eric: you can add/remove slices easily enough (modify the data array
and redraw). Support for mouse actions is not in yet, sorry. (Actually,
I've never seen an interactive pie chart like you describe - are you
free to describe the application?)

To Millie: for simple bar charts look in the Line/Shapes classes for the
drawVerticalColumns(); for line charts look at drawLinesToRight() and
drawMountain(). More complex charts, will be in the 0.3.0 release, a
month or two away.


Some other examples of what the library can do, or will do Real Soon Now:
  http://dcook.org/work/charts/

The library is hosted on sourceforge, here:
  http://dcflash.sf.net/

Please join the users or announce mailing lists if interested!

Darren
___
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] Re: [osflash] OpenSource Data Charting framework wanted ?

2006-10-17 Thread Darren Cook
 I'm currently search for an OpenSource Data charting framework,...

I've been working on such a library for a long time, with the intention
to release as open source. I've a sourceforge page set up (
http://dcflash.sf.net/ ) and some demos (links and screenshots on the SF
page), and am in the process of preparing the code for a first release.

There is also some code for statistics (with a financial charting
emphasis), and also client code that ties in with a PHP XML server (also
open source) that eases the pushing of financial data for charting
(though is more general than that).

Nagging me to get the release out the door will probably be effective,
so let me know if you are interested :-).

Darren


___
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] Flash 9 ready for kiosk use?

2006-08-11 Thread Darren Cook
 he was able to publish as 7, so he's having some other issue and I'm
 willing to bank that he is experiencing memory waste (a leak is
 different) ...

No: the flash player is able to correctly delete the memory when I
minimize then maximize the window. If I was still somehow holding on to
a pointer to the memory (which was my original thought too) it would not
be able to do that.

Or in other words, whatever additional clean-up it does when I minimize
the window it should be doing when running normally, every 10 seconds or
something. It doesn't, even after running for hours. Therefore I
describe it as a bug.

It sounds like Flash 9 may have fixed that bug; hopefully my client will
request a Flash 9 version and I can find out for sure.

Darren
___
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] Flash 9 ready for kiosk use?

2006-08-10 Thread Darren Cook
 I've just downloaded the Adobe Flash 9 Public alpha and used it to compile 
 one of my old kiosk
 projects. As far as I can see it has none of memory leak issues which 
 affected Flash 8 and stopped
 it being suitable for kiosks. This is great

This is very interesting. Is it just a matter of loading a Flash 8 fla,
and making a Flash 9 swf? Or would we need to convert from AS2 to AS3, etc.?

 I have no idea what memory leak issues you're talking about with the
 Flash player.  ...

There is one described here:
  http://www.gskinner.com/blog/archives/2005/10/major_flash_pla.html

And the one I've had problems with described in the thread here:
http://chattyfig.figleaf.com/pipermail/flashcoders/2006-March/161859.html

Beyond what is written there I convinced myself it is a player bug
simply because it will correctly free up all memory if you minimize then
maximize the player window.

Without doing the minimize/maximize trick it seems like it does not do
certain types of garbage collection (but it does garbage collect
something, as I see the memory usage wobbling up and down).

Darren


___
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] server-side FLV encoder ?

2006-05-01 Thread Darren Cook
 are there any linux tools that can use a PHP or command-line interface to 
 batch
 convert incoming files to flash video?

ffmpeg is probably what you want:
  http://ffmpeg.sourceforge.net/

Note that it can only convert from/to the older flash video format (i.e.
the Flash 7 format).

 what is needed to serve flash video? is apache OK?

I believe so, and I believe it streams (i.e. it starts playing before
the flv is fully loaded). If you need something more sophisticated and
are looking for an open source solution try Red5:
  http://osflash.org/red5

Darren
___
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] Find Nearest Color?

2006-04-03 Thread Darren Cook
Hi,
A minor optimization, but you can drop the Math.sqrt(). I.e.
   x^2  y^2  == x  y

for all positive values of x and y.

Darren


 That's what I actually ended up doing, and it worked out pretty good:
 
 private function getClosest (red1:Number, green1:Number, 
 blue1:Number):Number {

 var totalColors:Number = __palette.length;
 var tempDistance:Number;
 var closestColor:Number;

 for (var i:Number = 0; i  totalColors; i++) {
 // first, break up the color to check
 var red2:Number = (__palette[i]  0xFF)  16;
 var green2:Number = (__palette[i]  0x00FF00)  8;
 var blue2:Number = __palette[i]  0xFF;

 // now, get the distance from the source
 var tempD:Number = Math.sqrt ((Math.abs(red1 - red2) ^ 2) + 
 (Math.abs(green1 - green2) ^ 2) + (Math.abs(blue1 - blue2) ^ 2));

 if ((tempD = tempDistance) || tempDistance == undefined) {
 tempDistance = tempD;
 closestColor = __palette[i];
 }
 }

 return closestColor;
 }
 
 
 - Josh
 
 
 On Mar 16, 2006, at 7:59 PM, Ron Wheeler wrote:
 
 If a color can be treated as a point in a 3-d cube 256 units on  each
 side, you can use the formula in this reference
 http://www.uwm.edu/~ericskey/TANOTES/Ageometry/node10.html
 to calculate the distance between 2 colors.

 I have not tried this but it would seem logical that this would work

 Ron

 elibol wrote:

 K, here is some better math for getRGB, performance will probably be
 important:

 return [c16, c8~0xFF00, c~0xF00];

 You can also try using the ColorTransform or Color class to get  the rgb
 values, except they might be slower than getting the raw math right.

 M.

 On 3/15/06, Josh Buhler [EMAIL PROTECTED] wrote:

 Thanks - I'll give it a shot and see how it goes.


 - Josh

 On Mar 15, 2006, at 3:10 PM, elibol wrote:


 I tried comparing the hex values directly, but there were
 inaccuracies,
 maybe the same ones you've been having. I think since the value  of a
 particular color precedes with a 0 even when it's below 17(0F), the
 preceding 0 causes a shifting in the comparison. It would, for
 example,
 cause 0x00 to seem farther to 0x123456 than 0x00FF00, where
 visually you
 can see clearly that black is closer to 0x00.

 btw in my example, var a = 0x12345 where it should be 0x123456.

 The numbers hold to be accurate after correcting this typo.

 On 3/15/06, Josh Buhler [EMAIL PROTECTED] wrote:

 I'm working on a project that requires that I take an uploaded 
 image,
 and convert it to use a limited palette of colors - around 5-10
 colors.

 I've got the custom palette I have to work with stored in an  array,
 and for each color in my image, I've got it finding the color  in the
 array it's closest to numerically, but the results aren't exactly
 what I'm looking for.

 Does anybody know of any formulas available for comparing multiple
 colors and finding the ones that are the closest matches? I've  been
 searching Google for a while, with no luck. Any good resources on
 color formulas  such would be appreciated.

 - 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@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] If not Zinc, then what?

2006-04-03 Thread Darren Cook
 I always had this feeling Flash is not meant to be run for a long period
 of time - no one will interact with your Flash movie on browser for 24
 hours continuously, so that's absolutely fine. But can anyone tell me if
 you have successfully developed 24/7 app using Flash wrapped in
 Zinc/SWFStudio/mProjector/Screenweaver without having issues such as
 memory leaks?

Conversely I've started using a projector (screenweaver) for a 24/7
application because flash has a memory leak.

The leak is simply that the garbage collector is not freeing everything,
and it is easy to see it is the flash player's problem because
minimizing then restoring the window *does* free up the memory. It
happens with both Flash 7 and Flash 8 (only analyzed on windows XP). See
flashcoder's Memory leak in Flash projector thread for more background
(feb 25 2006 and mar 14-16 2006).

I had two options:
  1. Use a projector to a minimize then restore the window.

  2. Start a 2nd application window, initially hidden, then when ready,
close the 1st application window, then make the 2nd window visible. I
needed a projector to be able to make the application hide/show itself
and be hidden initially.

The 2nd option is more complex but I chose it as then I can be sure it
avoids any memory leaks that the minimize/restore trick does not; and
because I was concerned about the desktop appearing briefly using the
first option. (The PHP back-end was already controlling the creation of
the flash front-end so I had much of the logic already there.)

Darren

___
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] Memory leak in Flash projector

2006-03-15 Thread Darren Cook
 There was also a utility that someone on the team found that would
 force it to release the memory. But it was Windows only, and we had to
 support Mac so we ended up taking it out.

Do you have a link or a name for that utility (I only need to support
windows in the current project so that may do the trick)?

Thanks,
Darren
___
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] Memory leak in Flash projector

2006-03-14 Thread Darren Cook
On Feb 25th 2006 Andreas Rønning wrote:
 This is very serious. The majority of my work is kiosk apps.
 Any more details on this, official Macromedia stance on it? Future fixes?

Does anyone have more information on this? For instance what kind of
features or media types or actionscript are causing the leak?

We have a flash 8 application that has to be able to run for months
without rebooting, but was leaking memory at 31Mb/hour! I realized I
still had a textarea logger running but having removed that it is still
leaking at 5MB/hour.

We've tried running it as Flash 7, and also tried disabling all flv
movies, but it still seems to leak at the same rate. Does that sound
like something wrong we're doing in the actionscript (e.g. somehow
holding on to references so stopping the garbage collector freeing the
memory?) or like a player bug?

Is there a way to force the garbage collector to run? (our application
often has the CPU near 100% - I wondered if garbage collection only
happens when the CPU is quiet?)

Has anyone seen the memory leak go away when switching to zinc or a
similar projector?

Any advice would be very welcome,

Darren


 Marcelo Volmaro wrote:
 Well, unless you used a lot of the new FX, i recommend you going back
 to the v7 player. The v8 has a lot of errors/memory leaks, mostly of
 them related to the new bitmap engine.

 I recently had to change a lot of code that takes advantage of the new
 system to the old one, because a lot of things breaks badly.

 On Fri, 24 Feb 2006 15:32:51 -0300, Joe Cutting [EMAIL PROTECTED]
 wrote:

 Hello,
I think I've found a memory leak in the Flash player on the PC.
 I made a fairly simple animation (no actionscript) and built a
 projector and when I run
 it in a loop the amount of memory needed continues to rise. (as
 measured using Task Manager).

 I'm using Flash Player version 8,0,22,0 on Windows XP professional.

 Has anyone else experienced this, or even better found a cure?

 If there is no cure then this is pretty serious for anyone using
 flash in a kiosk type situation.
___
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