source: trunk/as3/com/jeroenwijering/plugins/Sharing.as @ 190

Revision 190, 1.3 KB checked in by jeroen, 4 years ago (diff)

fixed LOAD call with arrays, added separate Limelight FCSubscribe model and made feed elements case insensitive

Line 
1/**
2* Implements a sharing menu with embed and link codes.
3**/
4package com.jeroenwijering.plugins {
5
6
7import com.jeroenwijering.events.*;
8
9import flash.display.*;
10import flash.events.*;
11import flash.text.*;
12
13
14public class Sharing extends MovieClip implements PluginInterface {
15
16
17        /** List with configuration settings. **/
18        public var config:Object = {
19                embedcode:undefined,
20                link:undefined,
21                oncomplete:true
22        };
23        /** Reference to the stage graphics. **/
24        public var clip:MovieClip;
25        /** Reference to the View of the player. **/
26        private var view:AbstractView;
27
28
29        /** Constructor; nothing going on. **/
30        public function Sharing():void {
31                clip = this;
32        };
33
34
35        /** Toggle the visibility of the sharing plugin. **/
36        private function clickHandler(evt:MouseEvent) {
37                clip.visible = !(clip.visible);
38        };
39
40
41        /** The initialize call is invoked by the player View. **/
42        public function initializePlugin(vie:AbstractView):void {
43                view = vie;
44                view.addControllerListener(ControllerEvent.RESIZE,resizeHandler);
45                try {
46                        view.getPlugin('controlbar').addButton(clip.icon,'share',clickHandler);
47                } catch (err:Error) {
48                        clip.icon.visible = false;
49                }
50        };
51
52
53        /** check the metadata for bandwidth. **/
54        private function resizeHandler(evt:ControllerEvent):void {
55                clip.back.height = view.config['height'];
56                clip.back.width = view.config['width'];
57        };
58
59
60};
61
62
63}
Note: See TracBrowser for help on using the repository browser.