Ultrashock Forums > Flash > ActionScript
AS2 - SWC Component STOP?

You are currently viewing our website as a guest which gives you limited access to forums, files and other resources.

Click here to join now for free, and start interacting with our members, download files and much more!

Click here if you are looking for our Flash files and other professional assets.
 
Post Reply | View first unread | Rate Thread Search this Thread | Thread Tools | Display Modes

#1
Bookmark and Share!
AS2 - SWC Component STOP?
Old 2009-05-12

Hi you guys,
I am filled with questions today...

I have this SWC Component I would like to use. I created the component but when I drag it into the stage, it begins to "play" frame by frame every time I move the component around the stage?! How is that possible? Can I make this stop? This is my AS:

ActionScript Code:
  1. #initclip
  2. function componentClass()
  3. {
  4.     System.security.allowDomain("*");
  5.     this.update();
  6. }
  7. componentClass.prototype = new MovieClip();
  8. componentClass.prototype.update = function()
  9. {
  10.     _root.host = this.host;
  11.     //pull into Component
  12.     this.bg._visible = false;
  13.     this.createEmptyMovieClip("this_mc",this.getNextHighestDepth());
  14.     this.this_mc.loadMovie("http://www.mydomain.com/whatever.swf",0);
  15.     this.stop();
  16. };
  17. //Content Prototypes
  18. componentClass.prototype.setHost = function(c)
  19. {
  20.     this.host = c;
  21.     this.update();
  22. };
  23. componentClass.prototype.getHost = function()
  24. {
  25.     return (this.host);
  26. };
  27. Object.registerClass("componentPlayer",componentClass);
  28. #endinitclip
  29.  

Help? Thanks!
"In the game of chess you can never let your adversary see your pieces."
postbit arrow Be the first to comment! | 103 views postbit arrow Reply: with Quote   
Registered User
SightStorm is offline
seperator
Posts: 905
2003-08-01
SightStorm lives in United States
SightStorm's Avatar
seperator
Thread Tools
Display Modes Rate This Thread
Rate This Thread: