/Polish/POVideo.j

http://github.com/polymar/polish · Unknown · 45 lines · 37 code · 8 blank · 0 comment · 0 complexity · e2be60159d672e6deff9435ab141c21b MD5 · raw file

  1. /*
  2. * POImage.j
  3. *
  4. * Created by Roberto Gamboni on 03/12/2009.
  5. * Copyright 2008 Roberto Gamboni. All rights reserved.
  6. */
  7. @import <AppKit/CPFlashView.j>
  8. @import <AppKit/CPFlashMovie.j>
  9. @import "CPViewAdditions.j"
  10. @implementation POVideo : CPFlashView {
  11. CPString _name;
  12. }
  13. /*
  14. * Init an editable video with hmargin and vmargin = 0;
  15. */
  16. - (id) video {
  17. self = [super init];
  18. if(self) {
  19. self.size(64.0, 64.0);
  20. [self createJSMethods: ['url:']];
  21. }
  22. return self;
  23. }
  24. - (void) name:(CPString) n {
  25. _name = n;
  26. }
  27. - (CPString) name {
  28. return _name;
  29. }
  30. - (void) url:(CPString) path {
  31. if(path != undefined)
  32. [self setFlashMovie:[CPFlashMovie flashMovieWithFile:path]];
  33. }
  34. - (void)imageDidLoad:(CPNotification)aNotification {
  35. [self display];
  36. }
  37. @end