PDA

Click to See Complete Forum and Search --> : Dynamix area defination



shalin
07-27-2002, 08:52 AM
i want to create a circle with a specified radius.

My ASP variable is going to provide a radius between 1-10 how can i use this to draw a circle dynamically ?

Please advice.

Shalin

shalin
07-27-2002, 08:53 AM
i'm using Flash 5

swills
07-28-2002, 06:05 AM
FLASH5 isn't great at "drawing" dynamically - and as its just a simple circle you want - why not just make an mc of a circle and scale it to the correct size - using the variable from your ASP.

swills

shalin
07-28-2002, 11:19 PM
Originally posted by swills
FLASH5 isn't great at "drawing" dynamically - and as its just a simple circle you want - why not just make an mc of a circle and scale it to the correct size - using the variable from your ASP.

swills

I ultimately intend to draw a pie-chart dynamilcally.

Should I be using Flash MX ?

Please let us know what tutorials I can go thru and also how can I scale a MC on the fly.

Please Advice. Thank you!

Cheers,
Shalin

swills
07-29-2002, 08:31 AM
Ok try looking at this:

http://board.flashkit.com/board/showthread.php?threadid=292708

I'm guessing ericlin did this by duplicating a line mc, and rotating it about the centre, in proportion to the "incoming" data. I did this in a similar way - though dragable

http://194.131.128.207/flash/circlesweep/circle.swf

Somebody correct me if I'm wrong, but doesn't FLASH MX have a "fill" feature that would be very useful for this purpose!

hope that gets you on your way.

swills

ericlin
07-29-2002, 09:20 AM
That pie is done by Flash 5. I learn that technique in action script board post by someone I forgot.

Put two layers. The lower layer contains a MovieClip of semi-circle that is a circle with "lower" half removed. Besure the registration point is at the center of the original full circle.

The upper layer contains a half square (rectangle) movieClip. That is a square with "upper" half removed. Now make this layer as "mask" layer.

This looks like a icecream ball on top of a box. Now, try to rotate the semi-circle. You will see that semi-circle overlapped with rectangle. That is a pie.

Because pie may be greater than 180 degree. In this condition, you got to create another one and combine them together.

Flash MX can draw fill. By Flash MX I draw a fill and make the fill as dynamic mask. An even more wonderful pie can be created. This movie is a bit complex though.
http://dr_ericlin.tripod.com/pieAn3d/pieAn3d.html
http://dr_ericlin.tripod.com/pieAn3d/pieAn3d.zip

swills
07-29-2002, 09:38 AM
Ericlin

Sorry I got the technique of the FLASH5 pie chart incorrect!

Anyway - Nice animated MX version - tell me, is MX that much better for dynamic filling? I noticed that you didn't have a the option to change the input values for the chart - would you say it would be much harder to get the nice 3D effect with that option.

Just wondering, as I've yet to decide whether to buy MX or not. For instance have you tried some texture/surface mapping using it?

Also, as I try a lot of dynamic/moving/modelling/education stuff, e.g.:

http://194.131.128.207/flash/molecule/moleculerotate.html

has MX overcome the problem FLASH5 has with many controlled duplicated mc's slowing down things to an absurd rate? Do you know why FLASH is so much slower than JAVA?

A bit cheeky to ask these questions on the back of somebody else's question, but you seem to be someone who'd know.

swills

ericlin
07-29-2002, 11:02 AM
>I noticed that you didn't have the option to change the input values for the chart - would you say it would be much harder to get the nice 3D effect with that option.

In fact, that should be no problem. I intended to read data from XML that is more like things in real world. If we change the data in XML, the pie will be different. I did not add direct input, but I think it is no problem.

>Just wondering, as I've yet to decide whether to buy MX or not. For instance have you tried some texture/surface mapping using it?

I wish Flash could add more bitmap support that we can handle the pixels. But Flash MX only improves itself by adding component support. Scriptable distortion of shape is still limited. I think it is because the graphs are "vectorized". I tried to find a way to add "texture" to movieClip. I failed.

>Also, as I try a lot of ynamic/moving/modelling/education stuff,

Good job. I dont think Flash is a good tool for making game or information web page. But I think it is a very very good tool for creating interactive learning movie for education especially in physics. Of-course also in Chemistry.

>has MX overcome the problem FLASH5 has with many controlled duplicated mc's slowing down things to an absurd rate? Do you know why FLASH is so much slower than JAVA?

No. It is still slow. (Usually, for software, the more advanced version, the slower is the speed.)

For my limited knowledge, I think that: Windows System paints the animation to the monitor by "invalid rectangle"; Windows just repaint a small region of the screen. java handles graph by bitmap method. It is easy to guess what region should be repaint.

Flash use vectorized graph. Every graph is stored by vector data. SWF player calculates these vector data and turn them to bitmap before Windows can handle it. So it is slower.

I think that Flash is not an "efficient" tool if you care about execution speed. It exists because vector graph is smaller in size during transfer through internet.

Flash MX ? Difficult to say. If you need win-control components and are lazy, Flash MX supplies many.

If you want to handle complex text, the autosize function of textbox is good.

If you like fancy effect, Fill-draw and scritable mask are two good things that bothered us much in Flash 5 era. But,
I dont think we need too much fancy effect. It is impratical to create a fine picture by Flash draw api. It is simpler to import from bitmap.

After-all, for your mollecule movie, I dont think Flash MX can improve much. Of-course, if you have a good economy condition, buy it. For a scripter, using the script editor of Flash MX is more comfortable.

swills
07-29-2002, 11:14 AM
Thanks for your insights. It seems MX would do nothing for me, and any "more mathematically intensive" work should be done in JAVA or similar.

Its just a shame, cos FLASH is so "nice and easy" to work with to give pleasant looking results that students would find easy to follow. As examples of the slowness (not particularly pretty!) go to http://www.spencerwills.co.uk and try the "pressure direction" with more than 15 "particles" - and the "quanta shuffle" with a 40 sided system! Now that's SLOW!!!

You are right about quick load times though - so I guess we keep it simple, and make it good looking.

swills

ericlin
07-29-2002, 12:59 PM
Action script is not good in math, but not so bad. The slowness is mainly due to vector animation.

It is fun to find a workaround and do cheating to achieve the effects.

In a 40x40 grid with boxes of very small in size, it is likely that some small boxes would miss the rollOver event.

http://dr_ericlin.tripod.com/forum/myGridA5.html

I do cheating and workaround:
http://dr_ericlin.tripod.com/forum/myGridB5.html

Not so bad, right ?

http://dr_ericlin.tripod.com/forum/myGrid.zip

swills
07-29-2002, 01:46 PM
Thanks for taking the time to do some examples - the quanta shuffle problem is more to do with the large number of cells when trying to get a reasonable "temperature"...

I guess your right - its not always necessary for things to always be mathematically correct for people to understand what's going on - like the Hookes law "bouncing" effect in my examples.

Are there any stats on the computational speed of MX compared to FLASH5 - I mean on loops and lagging?

Anyway its all fun!

I saw some more of your examples on your site - really like the isometric motion - are you going to use it for any big projects?

ericlin
07-30-2002, 07:14 AM
Oh, that isometric motion should be updated. I have got a simpler version for swapdepths of the player. I have not updated that page recently.

If I have time, I should update them and add tutor. However, to explain things my English is not so good as my action script language.

I dont have real project. I created them for fun, or for replying flashkit board thread. This week, I made a movie and submitted to FlashKit. It is accepted.

http://www.flashkit.com/movies/Scripting/Maths/Displaye-Eric_Lin-7540/index.php

swills
07-30-2002, 09:30 AM
Funny you should show me that movie now, as I'm just deciding whether to order FX PhysEquate for the school

http://www.efofex.com/fxpman/ , http://www.efofex.com

Is there any way of exporting a graphic (cropped) equation from FLASH into ,say, WORD??????????????????

Now there's a project!!!!!!!!

SO, if you don't do major projects, what do you do?

swills

ericlin
07-30-2002, 10:44 AM
>Is there any way of exporting a graphic (cropped) equation from FLASH into ,say, WORD??????????????????

I ever embed swf to powerPoint, that just needs some setting of vb script to it. The embed is a whole swf file not cropped sprite. I dont have experience about that in Word.

That swf displaying only simple math equation. I did it quick. The functions could be added up to nearly what you see in physEq, but a long explanation about what are "keywords" is needed. GA represent gamma ..... etc. I did not intend to make it for practical use. I just show the power of flash.

Flash is only a toy for me. I am not a programmer nor a designer. I dont live on this. I have been playing Flash for one year and I am going to quit this toy soon.

swills
07-30-2002, 11:19 AM
I certainly don't make my living from FLASH either, but wouldn't mind if people got more interested in interactive and dynamic educational packages. At the moment most companies are just churning out worthless packages that don't really have any place in the classroom.

And as for you giving up your "toy" - I think the FLASH world will miss such an accomplished "player" !

swills