PageRenderTime 20ms CodeModel.GetById 17ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 8@import <AppKit/CPFlashView.j>
 9@import <AppKit/CPFlashMovie.j>
10@import "CPViewAdditions.j"
11
12@implementation POVideo : CPFlashView {
13	CPString 	_name;
14}
15
16/*
17* Init an editable video with hmargin and vmargin = 0;
18*/
19- (id) video {
20	self = [super init];
21	if(self) {
22		self.size(64.0, 64.0);
23		[self createJSMethods: ['url:']];
24	}
25	return self;
26}
27
28- (void) name:(CPString) n {
29	_name = n;
30}
31
32- (CPString) name {
33	return _name;
34}
35
36- (void) url:(CPString) path {
37	if(path != undefined)
38		[self setFlashMovie:[CPFlashMovie flashMovieWithFile:path]];
39}
40
41- (void)imageDidLoad:(CPNotification)aNotification {
42	[self display];
43}
44
45@end