def __init__(self): FlashPanel.__init__(self) global movieCount self.settings = None self.eventQueue = [] self.setObjectClass('swfupload') self.movieName = 'SWFUpload_'+str(movieCount) movieCount+=1 self.setObjectID(self.movieName) self.setWmode('window') self.setMenu(False) setInstanceGlobal(self.movieName, self)
def __init__(self, url, config=None): """ @param url: The url to flowplayer.swf @param config: The Configuration-Object """ FlashPanel.__init__(self) global movieCount self.api = None self.playlist = [] self.plugins = {} self.activeIndex = 0 self.listeners = [] self.common_clip = None self.playlist = None self.curClip = None self.playerId = 'flowplayer'+str(movieCount) self.movieName = self.playerId+'_api' movieCount+=1 setInstanceGlobal(self.movieName, self) #self.setObjectClass('flowplayer') self.setObjectID(self.movieName) self.setID(self.playerId) self.setHeight('300px') self.setWidth('400px') self.flash_url = url self.setObjectWidth('100%') self.setObjectHeight('100%') self.setAllowFullscreen(True) if not config: config = Configuration() self.common_clip = config.common_clip self.playlist = config.playlist for clip in self.playlist: clip.setPlayer(self) for plugin in config.plugins: plugin.setPlayer(self) if plugin.name: self.plugins[plugin.name] = plugin plugin = ScreenPlugin() plugin.setPlayer(self) self.plugins['screen'] = plugin self.flashvars = self.__createFlashVars(config)
def __init__(self, url, config=None): """ @param url: The url to flowplayer.swf @param config: The Configuration-Object """ FlashPanel.__init__(self) global movieCount self.api = None self.playlist = [] self.plugins = {} self.activeIndex = 0 self.listeners = [] self.common_clip = None self.playlist = None self.curClip = None self.playerId = 'flowplayer' + str(movieCount) self.movieName = self.playerId + '_api' movieCount += 1 setInstanceGlobal(self.movieName, self) #self.setObjectClass('flowplayer') self.setObjectID(self.movieName) self.setID(self.playerId) self.setHeight('300px') self.setWidth('400px') self.flash_url = url self.setObjectWidth('100%') self.setObjectHeight('100%') self.setAllowFullscreen(True) if not config: config = Configuration() self.common_clip = config.common_clip self.playlist = config.playlist for clip in self.playlist: clip.setPlayer(self) for plugin in config.plugins: plugin.setPlayer(self) if plugin.name: self.plugins[plugin.name] = plugin plugin = ScreenPlugin() plugin.setPlayer(self) self.plugins['screen'] = plugin self.flashvars = self.__createFlashVars(config)
def callFlash(self, functionName, arguments=[]): """ @param functionName: Methodname of ExternalInterface @param arguments: List with arguments of ExternalInterfaces method @return: the return value of ExternalInterfaces method. Extended method from FlashPanel. """ returnValue = FlashPanel.callFlash(self, functionName, arguments) if str(returnValue) == '[object Object]': returnValue = File(returnValue) return returnValue