Changeset 1198


Ignore:
Timestamp:
08/10/10 07:31:33 (3 years ago)
Author:
jeroen
Message:

fixed small bug: the dimensions of the player are now used in autogenerated embed code, not the dimensions of the screen

Location:
plugins/sharing/v5
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • plugins/sharing/v5/build/build.sh

    r1178 r1198  
    77 
    88$FLEXPATH/bin/mxmlc ../src/com/longtailvideo/plugins/sharing/Sharing.as -sp ../src -o ../sharing.swf -library-path+=../lib -load-externs=../lib/jwplayer-5-classes.xml -use-network=false -optimize=true -incremental=false 
     9 
     10# $FLEXPATH/bin/compc -source-path ../src -output ../sharing.swc -compiler.library-path $FLEXPATH/frameworks/libs -compiler.library-path ../lib -include-classes com.longtailvideo.plugins.sharing.Sharing -link-report='../sharing-classes.xml' 
  • plugins/sharing/v5/src/com/longtailvideo/plugins/sharing/Sharing.as

    r1178 r1198  
    102102        private function addScreens():void { 
    103103            _backScreen = new Sprite(); 
    104             _backScreen.graphics.beginFill(0x000000,0); 
     104            _backScreen.graphics.beginFill(0x000000,0.25); 
    105105            _backScreen.graphics.drawRect(0,0,400,300); 
    106106            _backScreen.addEventListener(MouseEvent.CLICK,backHandler); 
     
    169169            code += '/players/' + _player.playlist.currentItem['image'].substr(-12,8); 
    170170            code += '-' + _config['code'] + '.swf"'; 
    171             code += ' width="' + _player.config.width + '"'; 
    172             code += ' height="' + _player.config.height + '"'; 
     171            code += ' width="' + stage.stageWidth + '"'; 
     172            code += ' height="' + stage.stageHeight + '"'; 
    173173            code += ' allowfullscreen="true" />'; 
    174174            return code; 
     
    176176 
    177177 
    178         /** Grab the page URL with some jaascript magic. **/ 
     178        /** Grab the page URL with some javascript magic. **/ 
    179179        private function getEmbedCode():void { 
    180180            _embedCode  = '<embed src="' + loaderInfo.loaderURL + '"'; 
    181181            _embedCode += ' flashvars="file=' + encodeURIComponent(_player.config.file) + '"'; 
    182             _embedCode += ' width="' + _player.config.width + '"'; 
    183             _embedCode += ' height="' + _player.config.height + '"'; 
     182            _embedCode += ' width="' + stage.stageWidth + '"'; 
     183            _embedCode += ' height="' + stage.stageHeight + '"'; 
    184184            _embedCode += ' allowfullscreen="true" />'; 
    185185        }; 
     
    294294        /** Reposition the screens when the player resizes itself **/ 
    295295        public function resize(wid:Number, hei:Number):void { 
    296             _backScreen.width = wid - 70; 
    297             _backScreen.height = hei - 50; 
     296            _backScreen.width = wid; 
     297            _backScreen.height = hei; 
    298298            _embedScreen.x = _shareScreen.x = Math.round(wid/2 - 150); 
    299299            _embedScreen.y = _shareScreen.y = Math.round(hei/2 - 70); 
Note: See TracChangeset for help on using the changeset viewer.