SF Jazz bringing Vicente Amigo and Paco de Lucía 2012

Mark your 2012 tour dates!

March 25 2012 – Vicente Amigo comes to San Francisco
http://www.sfjazz.org/events/vicente-amigo

And not long after…

April 27 2012 – Paco de Lucía joins in
http://www.sfjazz.org/events/paco-de-luc%C3%ADa

 

This is very exciting. https://buycbdproducts.com read that Paco hasn’t toured in the states in at least 4 years  (correct me if I’m wrong).  While Vicente – I have no idea the last time he was here.

These two characters are possibly the most influential icons in modern Flamenco culture.  For me, they are my idols.  This is why I’ve bought front seat tickets to both these concerts, so if you’re gonna be around – hit me up!

Here are a couple of my favorites from them:

BuddhaBarLyrics.blogspot.com

This started out as a learning experiment with Amazon Associate program and Google Adsense, plus some SEO work, to see how well I could compete against the major lyric sites.

 

My goal is to be #1 for search term ‘buddha bar lyrics’.  Not there yet, still working on it : ) We are now #1! Amazing what a few SEO touchups can do. Right now BuddhaBarLyrics gets about ~20 hits a day.

 

Buddha Bar Lyrics

 

If you’ve never heard of Buddha Bar before, it is some of the best New Age music out there.  Buddha Bar became popular through a restaurant’s music tracks, and have released at least 10 albums so far of music throughout the world.  Stop by the wiki for more info.

 

 

Mystery of the empty Fragment Identifier (#), Iframes, and Chrome

Some of you may have come across WYSIWYG / RTF editors such as TinyMCE, Google’s Closure Library RTF editor, or even Yahoos YUI Editor.

 

All excellent choices, except if you find yourself wondering why all these are auto focusing themselves every time they load.

The common denominator is Iframes and a Fragment Identifier in your URI.  (www.soandso.com/#)

For some reason that I haven’t been able to replicate yet, in Google Chrome if you load one of these editors via AJAX while there is a Fragment Identifier (#) in your URI, when the iframe loads it will auto focus into it.

So the temporary solution is to either remove that href=’#’ stuff you have going on, or put “return false” into your javascript click events.

Protecting PDFs using FlexPaper

Download the compiled ReadOnly FlexPaperViewer.swf
*Note: Limited Functionality – see http://www.vigrond.com/flexpaper for ‘what you get’ – See tutorial below for which parameters work

Click here for Example

_____

Once Scribd made their switch to HTML5 for greater compatibility, it actually lost its great function to protect PDFs from being downloaded or printed.

On the search for some new technology, I found FlexPaper.

FlexPaper, in their own words, “… displays documents in your favorite browser using flash. Its way of reusing display containers makes it possible to view large documents and books.”

FlexPaper is programmed using a mix of Flash’s Flex & JavaScript, and is open-source under the GNU GPL license v3.

Natively, FlexPaper does not protect PDFs from being printed or copied.  It actually lacks options for doing so on the JavaScript front-end.  However in its Commercial License (to take the branding off for 1 domain) contains a ReadOnly parameter to disable printing & copying.

I am going to show you how to re-enable that ReadOnly parameter in the free GPL version using Flash Builder 4, disable the Flash container’s print option in the right-click context menu, and basically recompile the Flex build in the same original fashion as the Pre-compiled build of FlexPaper.

Note: This is not a hack.  It is actually suggested by FlexPaper’s developer (Eric) as a solution, albeit undocumented.

  1. Download both the Flex 4.0 & Pre-compiled (Flash) versions of FlexPaper:
    http://flexpaper.devaldi.com/download/
  2. Create a new Flex Project in Flash Builder 4 with default options (application type: Web)
  3. Once you get to the Library Path in the creation wizard, add the SWC file you got from FlexPaper’s Flex 4.0 build.
  4. Set “Framework linkage” to Merged into Code
    This will compile everything into a compacted SWF file, instead of having many different library files.
  5. Hit Finish
  6. Now you should be seeing your mxml file that looks something like this:
    <!--?xml version="1.0" encoding="utf-8"?-->
     
     
    		<!-- Place non-visual elements (e.g., services, value objects) here -->

     

  7. First we need to add the FlexPaperViewer component.  With your mxml file open, go into “Design” mode.  Then at the bottom left open up the Components tab.  Under the “Custom” folder drag  the FlexPaperView component into the project.
  8. Go back into “Source” mode.  You will now see your tag.
    Go ahead and set the following attributes

     

     

    id:

    our id variable we can reference later to set parameters

    ReadOnly:

    Set to “true” to disable Printing & Copying.  Note:  It is not recommended to set this parameter in the JavaScript as it presents a security hole on the client side.  If you have PDF files you want people to be able to print as well, create two versions – one with and one without ReadOnly

    width:

    Set to 100% to fill our HTML Element container

    height:

    Set to 100% to fill our HTML Element container

    x:

    set x-coordinate position to zero

    y:

    set y-coordinate position to zero

  9. Next we will create an Event Handler to read in flashvars from the JavaScript
  10. In our Application tag, add a creationComplete event handler
     
  11. Now add a <fx:Script> tag, import the flashvars, and create the init() function for our event handler:
    		<![CDATA[
    			//import flashvars
    			import mx.core.FlexGlobals;	
     
    			//set our viewer parameters to the flashvars (not all included)
    			private function init():void{
     
                            }
                    ]]>
  12. Inside this init() function is where the magic happens.  We will set all the parameters for our FlexPaperViewer depending on the flashvars.  We will also disable the Print option in the Flash context menu.Set the FlashPaperViewer parameters in this style:
    viewer.SwfFile = FlexGlobals.topLevelApplication.parameters.SwfFile;
    viewer.Scale = FlexGlobals.topLevelApplication.parameters.Scale;
    viewer.ZoomTransition = FlexGlobals.topLevelApplication.parameters.ZoomTransition;	
    viewer.ZoomTime = FlexGlobals.topLevelApplication.parameters.ZoomTime;	
    viewer.ZoomInterval = FlexGlobals.topLevelApplication.parameters.ZoomInterval;	
    viewer.FitPageOnLoad = FlexGlobals.topLevelApplication.parameters.FitPageOnLoad;	
    viewer.FitWidthOnLoad = FlexGlobals.topLevelApplication.parameters.FitWidthOnLoad;	
    viewer.FullScreenAsMaxWindow = FlexGlobals.topLevelApplication.parameters.FullScreenAsMaxWindow;	
    viewer.ProgressiveLoading = FlexGlobals.topLevelApplication.parameters.ProgressiveLoading;	
    viewer.switchMode(FlexGlobals.topLevelApplication.parameters.InitViewMode);

    This format will work for the following parameters:

    • SwfFile
    • Scale
    • ZoomTransition
    • ZoomTime
    • ZoomInterval
    • FitPageOnLoad
    • FitWidthOnLoad
    • FullScreenAsMaxWindow
    • ProgressiveLoading

    Non-native parameters (will have to be programmed into JavaScript flexpaper_flash.js library):

    • ReadOnly *Not recommended due to security hole presented by giving the client control
    • width / height *Setting to anything other than 100% will break Fullscreen mode

    Note: Other parameters and Event Handler methods for the Pre-Compiled Flash Build’s javascript functions are NOT provided here.  These are undocumented and will have to be additionally discovered.  It should not be hard given a look at the function list for the FlexPaperViewer component.  Connecting Flex applications to Javascript is also well-documented on Adobe’s site.

  13. To disable the Print option in the Flash container’s right-click Context menu is pretty easy:
    var customContextMenu:ContextMenu = new ContextMenu();
    //disable the default options
    customContextMenu.hideBuiltInItems();
    this.contextMenu = customContextMenu;
  14. Go to Project->Export Release Build, and now you got your project SWF in the bin-release folder, all-inclusive.  Flash Builder also includes a playerProductInstall.swf & an unneeded html container file to test with.
  15. Remember the Pre-Compiled Flash Build of FlexPaper we downloaded?  Go ahead and extract that.  Replace FlexPaperViewer.swf with the new one.
  16. Congratulations, now you have a read-only flash PDF viewer. Full Code:
    <!--?xml version="1.0" encoding="utf-8"?-->
     
    <!--?xml version="1.0" encoding="utf-8"?-->
     
     
    		<!-- Place non-visual elements (e.g., services, value objects) here -->
     
     
     
     
     
    		<![CDATA[
    			//import flashvars
    			import mx.core.FlexGlobals;	
     
    			//set our viewer parameters to the flashvars (not all included)
    			private function init():void{
    				viewer.SwfFile = FlexGlobals.topLevelApplication.parameters.SwfFile;
    				viewer.Scale = FlexGlobals.topLevelApplication.parameters.Scale;
    				viewer.ZoomTransition = FlexGlobals.topLevelApplication.parameters.ZoomTransition;	
    				viewer.ZoomTime = FlexGlobals.topLevelApplication.parameters.ZoomTime;	
    				viewer.ZoomInterval = FlexGlobals.topLevelApplication.parameters.ZoomInterval;	
    				viewer.FitPageOnLoad = FlexGlobals.topLevelApplication.parameters.FitPageOnLoad;	
    				viewer.FitWidthOnLoad = FlexGlobals.topLevelApplication.parameters.FitWidthOnLoad;	
    				viewer.FullScreenAsMaxWindow = FlexGlobals.topLevelApplication.parameters.FullScreenAsMaxWindow;	
    				viewer.ProgressiveLoading = FlexGlobals.topLevelApplication.parameters.ProgressiveLoading;	
    				viewer.switchMode(FlexGlobals.topLevelApplication.parameters.InitViewMode);
     
    				//disable Print option in Flash Context Menu
    				var customContextMenu:ContextMenu = new ContextMenu();
    				//disable the default menu options
    				customContextMenu.hideBuiltInItems();
    				this.contextMenu = customContextMenu;
     
    			}
     
    		]]>
  17. If there’s anyone out there who would just like the readonly SWF, just comment below and I’ll update the article
 


If your pet is feeling bad, you should try the Best cbd oil for dogs, with this medicine your dog will feel more calm.

If you think you cannot provide your pet with good treatments for a fear of getting aggressive, then check out a range of different therapies available in the UK. Find out what other pet care products can cure any medical condition you or your pet is experiencing.

Hello

Welcome to Vigrond’s Blog.

 

This will be a blog related to programming, flamenco guitar, & enjoying life in general : )