Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Importing Flash Pro library symbols from Starling class

Participant ,
Sep 15, 2014 Sep 15, 2014

Very new to Starling. I have succesfully created a project and seen some great performance when scrolling the pages in the online comicbook I'm making.

However, I need to place interactive, invisible hotspots on top of my comicbook pages. Placing these hotspots via code would be quite cumbersome - it would be much better to design these interactive layers in Flash Pro so I can drag/drop their exact placement. The structure I want is:

NORMAL STAGE LAYER -> Interactive hotspots

on top of

STAGE3D LAYER -> Comicbook pages

I'm aware that the hotspot layers won't run on the GPU, only the pages underneath. But I'd like to try it out anyway.


However, once I've created the hotspot layers in Flash Pro and given them linkage names, I can't figure out how to import them onto the comicbook pages. This is obviously because they are flash.display.movieclips and the Starling class that tries to import them expects Starling movieclips.

Is there any workaround for this? Either a way to be able to refer to both types of movieclips from the same class (preferably) - or a way to create two classes that add the pages and the hotspots respectively. Code examples would be great.

TOPICS
ActionScript
399
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 19, 2014 Sep 19, 2014
LATEST

Have you perhaps considered using this:

starling.core.Starling  - Native Overlay

Not that I'd do that myself. I know we all want our cake and eat it too but I really think you should work within the framework and re-create the hotspots using Starling sprites and add listeners to them. You can read the original flash hitareas x/y position as well as height and width. If it's just rectangles, that's all you need to know to generate the hit area in Starling. Even if it's not just rectangles you can draw the Flash hitarea object (assuming it's a flash symbol) into a Starling object as you're most likely doing with the comic book pages themselves. You just need to apply listeners.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines