• 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

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



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

trouble with teleportation script c# 3 Answers

Generate Fixed Distance String 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges