Can Flash Do This?

Need Some Expert Advice

Page 1 of 1

12 Replies - 5025 Views - Last Post: 03 June 2004 - 02:00 PM

#1 cyberscribe  Icon User is offline

  • humble.genius
  • member icon

Reputation: 10
  • View blog
  • Posts: 1,062
  • Joined: 05-May 02

Can Flash Do This?

Posted 02 June 2004 - 09:21 AM

Hi Gang,

I'm working on an article about the Ming PHP library - an amazing library that lets you dynamically generate Flash using PHP. I want to be clear about the advantages of programatically generated Flash over what you can do in the latest version of Flash.

I know you can dynamically load images and text in Flash using XML. This has been around since MX, correct?

What I'd love to know is, in Flash Actionscript (any version), can you:

1) dynamically size the stage and/or set stage background color?
2) dynamically set layout based on element properties (like image size)?
3) dynamically generate polygons?
4) dynamically scope motion tweens (i.e. speed up, slow down)?
5) dynamically set the frame rate?

Also - any more good leads on Flash market penetration? I'm looking specifically by version.

Thanks!

Best,
Robert

Is This A Good Question/Topic? 0
  • +

Replies To: Can Flash Do This?

#2 MK_PRE__  Icon User is offline

  • D.I.C Regular

Reputation: 0
  • View blog
  • Posts: 477
  • Joined: 12-January 02

Re: Can Flash Do This?

Posted 02 June 2004 - 09:28 AM

are you talking about creating flash using php or manipulating a swf using php, cause if you are pinning php vs macromedia flash in terms of flash creation, then php would lose for sure
Was This Post Helpful? 0
  • +
  • -

#3 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1875
  • View blog
  • Posts: 20,284
  • Joined: 17-March 01

Re: Can Flash Do This?

Posted 02 June 2004 - 09:43 AM

No, I'm pretty sure he's comparing the difference between the capabilities of the Ming library in PHP to the actual capabilities of the Flash development environment.

I imagine Ming has the capability to do all the things he listed, and wanted to know if the Flash itself had the capability to do the same thing using actionscript.
Was This Post Helpful? 0
  • +
  • -

#4 cyberscribe  Icon User is offline

  • humble.genius
  • member icon

Reputation: 10
  • View blog
  • Posts: 1,062
  • Joined: 05-May 02

Re: Can Flash Do This?

Posted 02 June 2004 - 01:22 PM

skyhawk133, on Jun 2 2004, 09:43 AM, said:

I imagine Ming has the capability to do all the things he listed, and wanted to know if the Flash itself had the capability to do the same thing using actionscript.

Yep - that's what I'm asking.
Was This Post Helpful? 0
  • +
  • -

#5 MK_PRE__  Icon User is offline

  • D.I.C Regular

Reputation: 0
  • View blog
  • Posts: 477
  • Joined: 12-January 02

Re: Can Flash Do This?

Posted 02 June 2004 - 01:41 PM

ah i see, well i have no clue then cause i never had the need to do any of those things mentioned :P
Was This Post Helpful? 0
  • +
  • -

#6 supersloth  Icon User is offline

  • serial frotteur - RUDEST MEMBER ON D.I.C.
  • member icon


Reputation: 4503
  • View blog
  • Posts: 28,411
  • Joined: 21-March 01

Re: Can Flash Do This?

Posted 02 June 2004 - 01:45 PM

Never really used flash outside of some simple motion tweens and some swift3d stuff, sorry robert. Lee should be able to help, he's got some of those pretty sick simulations he did for his independent study project.
Was This Post Helpful? 0
  • +
  • -

#7 cyberscribe  Icon User is offline

  • humble.genius
  • member icon

Reputation: 10
  • View blog
  • Posts: 1,062
  • Joined: 05-May 02

Re: Can Flash Do This?

Posted 02 June 2004 - 06:31 PM

Lee?
Was This Post Helpful? 0
  • +
  • -

#8 Acid Reign  Icon User is offline

  • Touched by his noodly appendage

Reputation: 2
  • View blog
  • Posts: 2,123
  • Joined: 11-November 02

Re: Can Flash Do This?

Posted 02 June 2004 - 11:27 PM

i think cold fusion ( :splat: ) would work with flash better, being macromedia and all, but i'm not sure at all
Was This Post Helpful? 0
  • +
  • -

#9 pioSko  Icon User is offline

  • still.dreaming
  • member icon

Reputation: 23
  • View blog
  • Posts: 1,888
  • Joined: 06-June 03

Re: Can Flash Do This?

Posted 03 June 2004 - 12:55 AM

1) dynamically size the stage and/or set stage background color?

stage size - No. Stage size is, however, a global property that can be referred TO. I found it to be usefull at times, though it a little... inaccurate.

I found that the values of Stage.width and Stage.height are off by 4px and 104px (!!) respectivly. So, if you have a stage that is 800x600, Stage.width and Stage.height return 796x496 (!!)

try it in Flash. On the first frame paste this:
trace(Stage.width+"x"+Stage.height);

stage color - Kinda. You can create a box (can be pre made symbol or dynamicaly created using ActionScript) and then set it's RGB dynamically.

2) dynamically set layout based on element properties (like image size)?

I'm not sure what you mean. Each symbol and it's instance, of course, has properties like x position, y position, width and height. So, you can set any of those to your liking. For example, set the x of Object2 to be 10px from Object1's x+width. Pretty simple example I know, but using ActionScript you can effectivly set the layout of the site, using a number of elements which correspond to each other's properties.

You can also dynamically grab instances from the library, without placing them on the stage. which helps reduce file size.

If I didn't answer your question, be more specific and I'll try again :)

3) dynamically generate polygons?

Yes. I believe Ming uses a similar method, if not the same.

_root.createEmptyMovieClip ("triangle", 1);
   with (_root.triangle){
      beginFill (0x0000FF, 50);
      lineStyle (5, 0xFF00FF, 100);
      moveTo (200, 200);
      lineTo (300, 300);
      lineTo (100, 300);
      lineTo (200, 200);
      endFill();
   }



above code: creates an empty movie clip in _root with depth 1, named triange. WITH that movieclip it begins a fill from x200 and y200 using a fill color of 0000FF with 50% alpha, and a 5px thick, FF00FF colored edge. Then draws to the given co-ordinates. :P

4) dynamically scope motion tweens (i.e. speed up, slow down)?

If the motion tween is ActionScripted in the first place, then yes. If it's a standard motion tween from the frame properties in flash then No.

5) dynamically set the frame rate?

No. However there is a file in flashkit that claims to do it. I'm not sure how it does it or IF it does it and if so, how effectivly. (I tried to find a link to it, but can't seem to find it, sorry :( )
Was This Post Helpful? 0
  • +
  • -

#10 supersloth  Icon User is offline

  • serial frotteur - RUDEST MEMBER ON D.I.C.
  • member icon


Reputation: 4503
  • View blog
  • Posts: 28,411
  • Joined: 21-March 01

Re: Can Flash Do This?

Posted 03 June 2004 - 01:44 AM

cyberscribe, on Jun 2 2004, 06:31 PM, said:

Lee?

megamu, but red seems to have taken care of it already.

acid, your missing the point, read the first 3 posts again.
Was This Post Helpful? 0
  • +
  • -

#11 cyberscribe  Icon User is offline

  • humble.genius
  • member icon

Reputation: 10
  • View blog
  • Posts: 1,062
  • Joined: 05-May 02

Re: Can Flash Do This?

Posted 03 June 2004 - 09:28 AM

Thanks! That answers all my questions. I knew I could count on someone in DIC.
Was This Post Helpful? 0
  • +
  • -

#12 pioSko  Icon User is offline

  • still.dreaming
  • member icon

Reputation: 23
  • View blog
  • Posts: 1,888
  • Joined: 06-June 03

Re: Can Flash Do This?

Posted 03 June 2004 - 10:02 AM

:D
Was This Post Helpful? 0
  • +
  • -

#13 pioSko  Icon User is offline

  • still.dreaming
  • member icon

Reputation: 23
  • View blog
  • Posts: 1,888
  • Joined: 06-June 03

Re: Can Flash Do This?

Posted 03 June 2004 - 02:00 PM

Quote

1) dynamically size the stage and/or set stage background color?

stage size - No. Stage size is, however, a global property that can be referred TO. I found it to be usefull at times, though it a little... inaccurate.

I found that the values of Stage.width and Stage.height are off by 4px and 104px (!!) respectivly. So, if you have a stage that is 800x600, Stage.width and Stage.height return 796x496 (!!)

try it in Flash. On the first frame paste this:
trace(Stage.width+"x"+Stage.height);


EDIT: When I replied to your questions, I was at work where I have Flash MX (v6). I just checked the above code in Flash MX 2004 Professional at home and both Stage properties give correct values.

ie.
Flash MX = incorrect values.
Flash MX 2004 = correct values.

:rolleyes:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1