RE: [flexcoders] Re: Programmatically create MovieClip frames?

2007-03-30 Thread Merrill, Jason
In the case where users would create their own animations on a web site,
injecting frames at runtime with content dynamically into a .swf would
not be the way to do it.  You would want to control the animation with
Actionscript.  Adding that ability to the player would add unecessary
overhead while not solving any real-world problem.  
 
Even on collaborative projects, where would the animation content live
that would be injected? On collaborative projects, each animator can
create their own .swfs and then a programmer loads them all in where
they like into a central .swf.
 
You had asked for someone to create a Flash 9 .swf for you with some
blank frames, but I don't see what that would solve since you would
still need to inject the content of the animation.  Sorry, still just
trying to understand why this would be useful...  I think this disussion
has been a good mental excercise at least.  :)
 

Jason Merrill 
Bank of America  
GTO Learning  Leadership Development 
eTools  Multimedia Team 


 




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of mtthwnthnyhys
Sent: Friday, March 30, 2007 5:15 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Programmatically create MovieClip
frames?



Thanks Jason, Troy, and Paul, for all your help/feedback.

Jason, I can't think of a use case for adding frames to a
MovieClip either. Unless of course, 
you wanted to have animations that you could control with AS3,
but didn't have access to 
the Flash CS3 preview. Though, now that I think about it, it
seems like there are some 
interesting possibilities for dynamically generated animations.

Imagine a 'community' site that invited users to create their
own animated avatars... or a 
video game in which the player designs his or her own
character... or collaborative 
animation project in which different artists are creating
different parts, maybe even 
individual frames of an animated sequence... or where a lead
animator is creating the key 
frames, and 'tweeners' are creating the in between frames... you
could even track and 
control this CVS-like, without having to pass around/merge FLAs.

Maybe these are pretty abstract, I know... I thought of them
just now.

The point is, I personally don't WANT to add frames to a
MovieClip. But I don't have access 
to the Flash CS3 preview, and so I was wondering if it was
possible to generate AS3/AVM2 
MovieClips, in some other way. MovieClip.appendFrame() seems
like it'd be easier than 
the method Troy describes of creating a custom AnimatedSprite
class, which will 
eventually have all or most of the methods of a MovieClip... at
least, the timeline control 
methods.

Basically, if I were having this problem 20 days from now... I
wouldn't be having this 
problem. You're right, I'd just make the MovieClips in Flash
CS3, export the library into a 
SWC, and use them from there in my Flex app as I wanted. That
would definately be the 
easiest way.

Luckily, I foresaw this problem pretty early on in the project,
so I have plenty of time to 
work on other things while I figure out the best way to handle
this... maybe the other 
things will even take me until the end of April and I won't have
this problem at all. In 
anycase, I appreciate all your help, and offers to help. If it
turns out that I need someone 
to make me a SWF with a few blank frames somewhere down the
line, I'll definately be 
hitting one of you guys up for that.

Other than that, I think we can call this discussion closed.
Unless someone has more 
information about it. Although, and maybe this is a seperate
post/question in itself, I 
thought I once heard about being able to control/communicate
with AVM1Movies once the 
new version of Flash came out... I guess that's not happening?

NO DYNAMICALLY ADDING FRAMES TO MOVIE CLIPS!! Got it.

Thanks all,
//Matt

--- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Troy Gilbert
[EMAIL PROTECTED] wrote:

 Okay, how about the simple scenario where you want the
playback of a series
 of frames of animation... you know, exactly what a movie clip
does? I could
 definitely do this by creating a class that extends sprite and
in that class
 keeping an array of shapes (or sprites) and each ENTER_FRAME
event moving my
 virtual playhead forward to the next sprite, etc., etc...
 
 And you know what I'd get? A MovieClip! Looks like Adobe
already wrote that
 one! ;-)
 
 Seriously, though, the problem is not that you 

RE: [flexcoders] Re: Programmatically create MovieClip frames?

2007-03-29 Thread Merrill, Jason
You can use the Flash 9 AS3 preview to output AS3 compatible .swf
animations.  - I guess I don't see what you need the extra frames for?
Why do you want to add frames?  I guess my feedback was aimed and
getting you to explain why you need to programatically add frames - I'm
not following what you're trying to do I guess.  If they are animations
you cannot easily do with actionscript, then that means you're
hand-tweening them in Flash or some other tool, and thus would have the
ability to add frames anyway.  

Jason Merrill 
Bank of America  
GTO Learning  Leadership Development 
eTools  Multimedia Team 


 




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of mtthwnthnyhys
Sent: Thursday, March 29, 2007 8:11 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Programmatically create MovieClip
frames?



Jason,

Um, thank you for the feedback? What do you mean 'some other
way?' For that matter, 
what do you mean, 'why would I want to?' 

I'd like to use animations in my application that I don't think
would be easy to accomplish 
through scripted tweens. I could create the animations in Flash
8, but then I can't control 
them with AS3. I'd maybe have export each frame from Flash 8.
Import them into Sprites 
in my Flex app, and then play them by iterating through the
visible property of each one 
in a list... some kind of custom SuccessiveSpritePlayer class...
seems like a lot of work-
around, just to make what amounts to a MovieClip that I can add
frames to.

Does anyone have ideas, a trick, anything?

//Matt

--- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Merrill, Jason
[EMAIL PROTECTED] wrote:

 Why would you want to? It seems whatever you're trying to do
could be
 accomplished in some other way.
 
 
 Jason Merrill 
 Bank of America 
 GTO Learning  Leadership Development 
 eTools  Multimedia Team 
 
 
 
 
 
 
 
 From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com ] On Behalf Of mtthwnthnyhys
 Sent: Wednesday, March 28, 2007 3:11 PM
 To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Programmatically create MovieClip
frames?
 
 
 
 Hey all,
 
 I have a bit of an odd question. I'm working on a project in
 which I'd like to include some 
 somewhat intricate Flash animations... unfortunately... (sort
 of)... I'm working on one of 
 those new MacBook Pros, with the Intel chip. No Flash 9 AS3
 preview for me.
 
 I'd like to keep moving on the project, but as you probably
 know, Adobe is not shipping 
 (and therefor not making available for download?) the new
Flash
 CS3 until the end of April.
 
 So I'm wondering, is it possible to add frames to a
 programmatically created AS3 
 MovieClip, and then populate those frames dynamically? Will
 nextFrame() called on the 
 last frame of a MovieClip still move the playhead?.. or return
 some kind of error?.. or just 
 not do anything?
 
 I'll be experimenting with all this stuff over the next couple
 of days, trying to come up with 
 a solution, but if anyone knows anything I'd appreciate the
 feedback.
 
 Also, if you happen to know that there's no way to do what I'm
 asking... and you happen to 
 have the Flash 9 AS3 preview... would you mind making a few
 empty AS3 MovieClip SWFs? 
 To be safe, I think one each at 7, 14, 21, and 28 frames would
 be great. That's not too 
 much trouble is it?
 
 Okay, infinite thank yous in advance.
 
 //Matthew Anthony Hayes




 



RE: [flexcoders] Re: Programmatically create MovieClip frames?

2007-03-29 Thread Merrill, Jason
Paul, if you're saying I need to re-read the thread, well I took your
advice and I did, and yet nobody has really explained why adding frames
programatically and adding instances of object to it would be useful.  I
guess I just don't see it when you can control instances of objects
separately and use events to drive animation (even if the animation
itself is hand-made) - what does adding blank frames and injecting
content into those frames with code accomplish?  Maybe it's just my lack
of imagination, sorry, I just have never heard of this being a useful
feature since I started developing in Flash 6 years ago. Perhaps you can
explain?
 

Jason Merrill 
Bank of America  
GTO Learning  Leadership Development 
eTools  Multimedia Team 



RE: [flexcoders] Re: Programmatically create MovieClip frames?

2007-03-29 Thread Merrill, Jason
Send me what you want specifically offlist  - and I can make a Flash 9
.swf for you.  But if the frames are blank, how are you going to add
animation content to them anyway?  Yeah, sorry, I must be dense today,
but I'm not seeing why having someone add blank frames to an AS3 clip
will help with anything... or are you asking for us to also add your
tweeened animations to the timeline as well?
 

Jason Merrill 
Bank of America  
GTO Learning  Leadership Development 
eTools  Multimedia Team 


 




From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of mtthwnthnyhys
Sent: Thursday, March 29, 2007 11:19 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Programmatically create MovieClip
frames?



Hmm, okay, so, to clarify. 

It's like Paul said. It's not so much that I WANT to add frames,
it's that I'm on an Intel Mac, 
and don't have access to the Flash 9 AS3 preview, and so, CANT
add frames in Flash... at 
least not if I still want control over the MovieClips... even
simple control like... stop(), or 
gotoAndPlay(), etc... don't work with AVM1MovieClips... which is
all I can make until I can 
get my hands on Flash CS3... at the end of April.

Does it make more sense now? 

I want to create a set of character animations that represent
said character's set of states, 
and can smoothly transition to/from one another, or loop over a
set of frames if no 
transition is necessary. 

Does it make more sense now?

Okay, thanks for helping, for real,
//Matt

--- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com , Merrill, Jason
[EMAIL PROTECTED] wrote:

 You can use the Flash 9 AS3 preview to output AS3 compatible
.swf
 animations. - I guess I don't see what you need the extra
frames for?
 Why do you want to add frames? I guess my feedback was aimed
and
 getting you to explain why you need to programatically add
frames - I'm
 not following what you're trying to do I guess. If they are
animations
 you cannot easily do with actionscript, then that means you're
 hand-tweening them in Flash or some other tool, and thus would
have the
 ability to add frames anyway. 
 
 Jason Merrill 
 Bank of America 
 GTO Learning  Leadership Development 
 eTools  Multimedia Team 
 
 
 
 
 
 
 
 From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com ] On Behalf Of mtthwnthnyhys
 Sent: Thursday, March 29, 2007 8:11 AM
 To: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Re: Programmatically create MovieClip
 frames?
 
 
 
 Jason,
 
 Um, thank you for the feedback? What do you mean 'some other
 way?' For that matter, 
 what do you mean, 'why would I want to?' 
 
 I'd like to use animations in my application that I don't
think
 would be easy to accomplish 
 through scripted tweens. I could create the animations in
Flash
 8, but then I can't control 
 them with AS3. I'd maybe have export each frame from Flash 8.
 Import them into Sprites 
 in my Flex app, and then play them by iterating through the
 visible property of each one 
 in a list... some kind of custom SuccessiveSpritePlayer
class...
 seems like a lot of work-
 around, just to make what amounts to a MovieClip that I can
add
 frames to.
 
 Does anyone have ideas, a trick, anything?
 
 //Matt
 
 --- In flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com , Merrill, Jason
 jason.merrill@ wrote:
 
  Why would you want to? It seems whatever you're trying to do
 could be
  accomplished in some other way.
  
  
  Jason Merrill 
  Bank of America 
  GTO Learning  Leadership Development 
  eTools  Multimedia Team 
  
  
  
  
  
  
  
  From: flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com 
  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com 
 mailto:flexcoders%40yahoogroups.com ] On Behalf Of
mtthwnthnyhys
  Sent: Wednesday, March 28, 2007 3:11 PM
  To: flexcoders@yahoogroups.com

RE: [flexcoders] Re: Programmatically create MovieClip frames?

2007-03-29 Thread Merrill, Jason
Once you get more experience you will be able to understand better...
only kidding, my 10 years of Flash experience is no match for your 6.
 
Ok, you upped me there by 4 years.  You must know more than me so I
should just shut up.

Seriously if you are only going to poo-poo his question then maybe
you should keep it to yourself. Although I don't have an answer I can
at least see it is a valid question. I am sure there is a way to do
what he wants to do, but unfortunately I think he's barking up the
wrong tree, but I don't know where the right tree is either.
 
LOL, I'm not poo-poo'ing it, WOW.  I'm trying to understand what he
needs so I can assist him.  If you're just going to try and turn this
into me somehow being a jerk, well this isn't the place for that -
please write comments like that to me directly offlist.  I'm only trying
to understand and help him.  If asking questions to better understand
why he wants to do this makes me a jerk, well, this list is not what I
thought it was.  If you in your 10 years experience know so much about
his problem you should either answer his question here publically (which
you have yet to do) or offer to help him offlist like I have, instead
wasting your time by questioning my responses to his post.

Jason Merrill 
Bank of America  
GTO Learning  Leadership Development 
eTools  Multimedia Team 




RE: [flexcoders] Re: Programmatically create MovieClip frames?

2007-03-29 Thread Merrill, Jason
Matt, 
 
So Paul and I discussed our pointless bickering offlist and hugged it
out.  We're good now.  Both of us however were just wondering about this
question you have (me, so I could you, him for academic reasons) since
we ironically agreed offlist neither of us could figure a good use case
for needing do do this.  Maybe you can explain in more detail what you
will do with these frames once they are inserted.  But really, we
probably should move this to a Flashcoding list like Flashcoders.   

Jason Merrill 
Bank of America  
GTO Learning  Leadership Development 
eTools  Multimedia Team 




Re: [flexcoders] Re: Programmatically create MovieClip frames?

2007-03-29 Thread Troy Gilbert

Okay, how about the simple scenario where you want the playback of a series
of frames of animation... you know, exactly what a movie clip does? I could
definitely do this by creating a class that extends sprite and in that class
keeping an array of shapes (or sprites) and each ENTER_FRAME event moving my
virtual playhead forward to the next sprite, etc., etc...

And you know what I'd get? A MovieClip! Looks like Adobe already wrote that
one! ;-)

Seriously, though, the problem is not that you can't programmatically edit a
MovieClip, it's that Adobe's docs don't make it clear why you wouldn't want
to do that... because the MovieClip is a much more complicated beast that
stores tween details, etc., that aren't exposed in the API (details you'd be
familiar with if you've ever attempt to generate SWF's from scratch in an
open-source tool like I did back in the Flash 4 days).

The docs describe MovieClips as basically sprites with timelines... which
would lead one to think, hey, sprite is great, but I need a timeline 'cause
I got some animation, so I must need a MovieClip! I know this because I
went down the same route.

What I ended up doing was basically creating an AnimatedSprite class... it
has a currentFrame property, and list of frames (which, in my case, are
BitmapData's). Each frame it increments currentFrame and updates its display
list to include the appropriate bitmapData. Pretty simple stuff...

So, to address the original poster: MovieClip is just a mirage! Think of it
like its got a scarier name like CompiledSWF and treat it like a blackbox.
It'll make your life easier.

Troy.


On 3/29/07, Merrill, Jason [EMAIL PROTECTED] wrote:


   Matt,

So Paul and I discussed our pointless bickering offlist and hugged it
out.  We're good now.  Both of us however were just wondering about this
question you have (me, so I could you, him for academic reasons) since we
ironically agreed offlist neither of us could figure a good use case for
needing do do this.  Maybe you can explain in more detail what you will do
with these frames once they are inserted.  But really, we probably should
move this to a Flashcoding list like Flashcoders.

Jason Merrill
Bank of America
GTO Learning  Leadership Development
eTools  Multimedia Team