Guest User

Untitled

a guest
Apr 26th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. @import <Foundation/CPObject.j>
  2. @import <AppKit/CPFlashMovie.j>
  3. @import <AppKit/CPFlashView.j>
  4.  
  5.  
  6. @implementation AppController : CPObject
  7. {
  8. CPWindow theWindow; //this "outlet" is connected automatically by the Cib
  9. @outlet theOther;
  10. CPFlashMovie _movie;
  11. CPFlashView _movie_view;
  12. }
  13.  
  14. - (void)applicationDidFinishLaunching:(CPNotification)aNotification
  15. {
  16. // This is called when the application is done loading.
  17. [self loadAMQP];
  18. }
  19.  
  20. - (void)awakeFromCib
  21. {
  22. // This is called when the cib is done loading.
  23. // You can implement this method on any object instantiated from a Cib.
  24. // It's a useful hook for setting up current UI values, and other things.
  25.  
  26. // In this case, we want the window from Cib to become our full browser window
  27. [theWindow setFullBridge:YES];
  28. }
  29.  
  30. - (void)loadAMQP
  31. {
  32. _movie = [[CPFlashMovie alloc] initWithFile:@"Resources/amqp.swf"];
  33.  
  34. _movie_view = [[CPFlashView alloc] initWithFrame:CGRectMakeZero()];
  35. [_movie_view setFlashMovie:_movie];
  36.  
  37. [[theWindow platformWindow] addSubview:_movie_view];
  38. debugger;
  39. MQ.onLoad();
  40. }
  41.  
  42. @end
Add Comment
Please, Sign In to add comment