• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by saldavonschwartz · May 09, 2013 at 09:19 AM · swf

A few questions about UniSWF

If anyone has experience with it, I'm noticing a few things which I'm not sure about. I made a flash animation made up of 1 symbol with two other symbols inside it. The layout is as follows:

  • A circle converted to symbol in the main timeline.

  • inside this symbol, two other shapes: another circle exactly like the first, same position and everything, as a symbol too. And a square off to the right of the original circle symbol.

  • In this container symbol's (the initial circle in 1.) timeline, I animate the scale of the second circle symbol and animate the square symbol's alpha (but the square stays otherwise put, off to the right of circle symbol 1).

I then export all three symbols for AS3 to use in Unity via UniSWF. But when I load the swf in unity into a MovieClipBehaviour I notice that:

  1. The transform seems to be off. I place the object at 0,0,0 and use whatever Unity native mesh as reference and the SWF-based object does not align centered with respect to the Unity object at 0,0,0.

  2. As the SWF object plays, the transform handle seems to drift back and forth.

  3. In the inspector, I also see 3 materials for the SWF object. I'm assuming these are one for each of the three symbols and they are probably changing textures once each per frame?. I notice one of them seems to be constantly added and removed from the list of components in the object. Maybe the one that gets removed is the one for the square symbol when its alpha drops to 0 in the flash animation?

  4. In the case of a InteractiveMovieClipBehaviour, even though it creates a collider the size of the quad, clicking anywhere on the screen (not just inside the collider) triggers whatever event I register with the corresponding SWF MovieClip.

I'm wondering if these behaviours are normal. 3 I'm only concerned cause of efficiency (repeteadly adding and removing a material at runtime). But 1 and 2 are kind of bad, since they prevent me from positioning the object exactly where I want it by just thinking about coordinates. And 4.. I must be missing something.

My guess for 1 and 2 is I'm messing something up in terms of anchor points in the flash file itself, but I'm not sure since flash is not my thing really (I'm a software engineer).

Thanks!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

13 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

A node in a childnode? 1 Answer

Connecting Multiple Swf files to create a game in Unity 2 Answers

how to export UnityContentLoader in a HTML ? 0 Answers

set up default NewProject location + folders 5 Answers

Changing a bool when an int reaches a specific number... 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges