Announcements
The Scaleform forum is now read-only. Please head to the Gamedev site for product support.
Scaleform Forum (Read Only)
Scaleform enables developers to leverage the power of the Adobe® Flash® tool set to create powerful user interface environments for video games.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SWFMovie throwing exception about a movie already existing

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
259 Views, 0 Replies

SWFMovie throwing exception about a movie already existing

I'm using Scaleform in Unity. I'm currently having a problem where the swfMovies collection in SWFMovie isn't removing a movie that was currerntly on a Interface object that I am removing from my scene. Basically, if I select a menu, I will see my swf on a 3D object that I have in the scene. Once I close the object (I have it in a 2D Window), and try to reopen that menu, I get an exception thrown in SWFMovie that the movie already exists. Currently as a temporary fix, I remove the movie from swfMovies if it hasn't been. I apologize for the poorly formatted code below, but it wouldn't paste properly in the code block.

 

SFMgr = sfmgr;
this.SetFocus(false);
if(swfMovies.ContainsKey(name))
{
   WeakReference theRef = swfMovies[name] as WeakReference;

   if(theRef.IsAlive)
   {
     string err = "SWFMovie with this name: " + name + " already exists!";
     // Temporary fix: Just remove the movie from the hashtable if it
// already exists and is alive swfMovies.Remove(name);

// Old code //throw new System.Exception(err); } else swfMovies.Remove(name); }

 

Is there a specific way to clean up SWFMovie? If so, where should that occur? 

 

Thanks for the help!

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report