Skip to main content
Participating Frequently
December 2, 2019
Question

Browsing the hierarchy of movieclips in the GUI

  • December 2, 2019
  • 3 replies
  • 1981 views

Hi!

 

I've moved to a UI programmer position in a games company and I'm unused to Flash, though I used it a tiny bit back in the day to experiment with making games.

 

I've inherited a bunch of flash files and would like to explore what's in them, but it seems like I can't do that, so I'm interested in what I'm misunderstanding, or not aware of, and also interested in ways to fix it.

 

Here's what I think I know.

- A flash file has a library, which is a set of user-defined archetypes.

- There is also a scene, which seems to be recreated when opening a movieclip from the library for examination.

- Movieclips can have children.

- Looking at the timeline there are layers. These don't correspond to child movieclips but can own them in some ways, allowing you to hide/lock them.

- There used to be a pane called "Movie Explorer" or something, in Flash, that got deprecated when they made Animate.

- No substitute was made for the removal of this feature.

- There is currently no way to see explicitly what child movieclips a given movieclip might have, apart from visually.

- Selecting child movieclips that are invisible therefore becomes a guessing game of double clicking where they might be or dragging boxes over the scene view.

 

It seems to me that I will need to make an extension to display the movieclip hierarchy. Would that be correct?

 

Investigating that last line of thought shows that extensions for this software used to be written themselves in Flash (Extension Builder 2.1), but are now based on HTML 5 (Extension builder 3).

 

Is that all correct?

 

If there's anyone that can help, I'd be really grateful. Info on these subjects seems to be quite distributed and old and rare.

 

Thanks

 

Alex

This topic has been closed for replies.

3 replies

Participating Frequently
April 8, 2020

If using Action Script 3 you can instrospect the entire SWF using flash.utils.describeType

It returns an XML document of the entire Tree

 

https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/package.html#describeType()

Participating Frequently
April 8, 2020

Nope, not using Action Script 3.  I don't even know how Actionscript fits in to the picture.  In my case Coherent Labs provides a custom exporter and document type, so I'm choosing their document type rather than the "Actionscript 3" template when creating a new document.  Maybe I can still do similar things though. 

 

If I were using Action Script 3, where would I "use" flash.utils.dsecribeType.  Is there some interactive window within Animate where one types actionscript, like a REPL? 

 

I was really hoping for something that was a bit better than just a way to write code that would list everything in the hierarchy.  I was hoping that there would be a tool or a plugin which would add the missing tree-view pane of the hierarchy, and  it would be an interactive pane which would allow you to navigate the scene, e.g. click on a node in the tree view to select it in the scene. 

 

At this point though, anything would be better than nothing, and if I could run some javascript code that would just print out the hierarchy that would be better than blindly clicking around in the scene trying to illuminate the darkness with a broken flashlight.

kglad
Community Expert
Community Expert
April 10, 2020

That's great, thanks for the pointers to the JSFL  docs.   I've managed to cobble something together to recursively explore the structures loosely based on the "Log Instance Names" example I mentioned earlier.  It was a bit more convoluted than I had hoped and the output is not pretty. 

 

I'm iterating through the document --> layers --> frames --> elements  and I find an element which has elem.symbolType=="movie clip".   I can follow elem.libraryItem and print the name of that (which is a name of at item in the library).  The libraryItem has a timeline itself, which I then recurse on. 

 

It's given me a bit more understanding of the internals and how the simple hierarchy view that I had imagined might not be a practical reality.    By the looks of these structures, by virtue of the element lists being hung off the Frame, it seems open to the possibility of each frame having a completely different collection of elements. And the more nested of movie clips that I have, the more different timelines there are to traverse. Currently the output of my script iterates all the frames and produces a lot of redundant output, so it would take a fair bit of work to somehow coalesce all the redundancies back into a coherent picture of what is present.

 

 


there's no reason you should have any duplicate info.

 

create a function that accepts a movieclip (mc). with that mc iterate through its frames > layers > elements.  if an element is a mc, pass to that function.  

 

start by calling that function and pass the main (root).

Participating Frequently
April 8, 2020

Hello!  Also at a game company here!  And we are also looking at using Animate. In our case because we are evaluating Coherent Labs's Prysm product which is recommending/using Adobe Animate as the content creation toolset. 

 

I'm hitting the same obstacle as you where I'm going slightly insane trying to understand the hierarchy of movie clips inside of some of their samples,  (or even within my own creations!),   because of the lack of any kind of  high level tree view.  I'm mostly just madly clicking on things, but it's never too clear which visual elements represent distinct children under the current Movie Clip.  It seems like a severe hindrance to productivity in this tool.

 

Did you find a solution for this?  Is there a 3rd party tree viewer or a way to make a plugin to expose it?  

Participating Frequently
April 14, 2020

Hello, sorry for the delay. No, I did not find a solution. I find what's in a file or library object by locking all layers, and unlocking each layer one by one and doing a select all or switching to outline view (the little block next to the lock icon) to see what's in there and then examining each object in the object properties. It is long and laborious and error prone and relies on tidy and well designed flash content.

kglad
Community Expert
Community Expert
December 2, 2019

investigating a fla file can be, and often is, painful.  you can automate the procedure by using jsfl which is still created using animate.

 

p.s. unless these are online games that need to be converted from swf to html5, i'm not sure there's a good reason to invest any time in checking the fla files.

Participating Frequently
December 3, 2019

Thanks! Yeah we are looking at jsfl to help, maybe just to output a map of a library movieclip's hierarchy.

 

I'm getting the hang of it a bit more now, using locking and visibility controls to ensure the right things are visible/selected.

 

We're using scaleform so it's important that certain child instances are given the right names and so forth. But if you don't know what's in there to begin with... well, you can see the problem.

 

Thanks again.