Archive for the ‘components’ Category

Fullscreen Component

Mardi, mai 25th, 2010

Fullscreen Component

date: 05/2010
component version 1.0

Download

fullscreen-v1.0

About this Component

This is a silex component (see http://silex-ria.org/api-v1/ ). It is only available for FP 8 and newer.
If you put this component in a Silex page or in the preload files list, it will add a command to the interpreter which make it possible to switch to fullscreen mode and back to normal.

Use

Take an empty web site to test the component

  • download the component archive and extract FullScreenComponent.cmp.swf to the “media/” folder of your Silex installation folder
  • put the component on the stage in Silex, or add it to the preload files list in the manager (you will not be able to use the events of the components in this second case
  • on a media, put the action “onRelease fullscreen:true”
  • on a media, put the action “onRelease fullscreen:false”
  • on a media, put the action “onRelease fullscreen:toggle”
  • on the component itself, you can put these actions
    • onDisplayFullScreen alert:full screen mode !
    • onDisplayNormal alert:normal screen mode !
    • onDisplayToggle alert:screen mode has changed !

Then you can click on the medias and see the alert occures

Life cycle of the component

  • load in a silex page
  • adds the methods to the interpreter for toggle full screen/normal
  • dispatch events

Notes

  • It works only in sites published for FP 8+
  • The command works only with the onRelease event
  • To enable full-screen mode, the allowFullScreen parameter has been added in the object and embed tags in Silex index.php
  • about the property “Stage.display”, it just work for the version de flash Player more than 9; so we use Stage["display"] = “normal”; You can put the component in Sites for Flash Player 7, but it will work only if the user has FP8+

Structure of this component

  • FullScreenComponent.cmp.fla, we will put in the dossier “silex_trunk/components/fullscreen”;
  • FullScreenComponent.as, we will put in the dossier “silex_trunk/components/fullscreen”;

Sources

In the interpreter, we add a method named “fullscreen”. in this function we need to give parameter;

  • function fullscreen(value_str);
    • value_str==true
    • value_str==false
    • value_str==toggle

In the FullScreenComponent.as:

  • _initAfterRegister()
  • utiliser silexInstance.config.flashPlayerVersion to take the version of flashplayer
  • add stage listener  onFullScreen()
  • dynamic  add a new function  fullscreen() in the class interperter
  • onFullScreen() — listene to object stage
    • dispatch onFullScreen event
    • dispatch onNormal event
    • dispatch onToggle event
    • displayFullScreen() — when called, this flash will display at the mode Stage.displayState = “fullscreen”
    • displayNormal() — when called, this flash will display at the mode Stage.displayState = “normal”
    • displayToggle() — when called, this function will allow us to toggle between fullscreen mode.
    • setFullscreenState() - used to passer the variable about the fullscreen between the silex and the component

    Toggle button

    Vendredi, avril 30th, 2010

    English

    Description

    A toggle button allows to distinguish in a visual way (by two different colors or shapes for instance) if the end user is on the page which is selected by this button or if he is on an other page of the website.

    Download

    toggle_button

    Use

    see the read_me.txt file (which is on the .zip)

    Français

    Description

    Un “toggle button” permet de distinguer visuellement (par deux couleurs ou deux formes différentes par exemple) si l’utilisateur est sur la page pointée par ce bouton ou sur toute autre page du site.

    Téléchargement

    toggle_button

    Utilisation

    lire le document read_me.txt (qui se trouve dans le the .zip)

    OOF for Silex

    Lundi, septembre 14th, 2009

    English

    Description

    OOF is a library of Flash components usable in Flash or with Silex. They are mainly oriented towards data handling. With them you can build a gallery, read RSS feeds, read and write in a database, send mails, etc. This is done with Flash or Silex, by designers without programming skills.  This release is for use with Silex, and it comes with all the the OOF components published for Silex, everything you need to get OOF running with your Silex server, and some simple instructions on getting started. A development kit is also available.

    OOF main website

    Download

    OOF for silex

    OOF devkit

    Installation

    see readme.txt /lisezmoi.txt

    Use

    The OOF components currently available are the following:
    * lists
    * connectors to a database, an RSS feed, an Excel spreadsheet
    * displays for video, audio, text, sound
    * login and captcha components for authentication(private space, user account handling)
    * email
    * upload
    * …

    OOF enables designers to create :
    * a flash website with community functions(private space, comments, …)
    * a flash website with a blog back office
    * a guest book
    * a blog
    * a photo gallery
    * a web tv
    * an audio or video playlist
    * a news reader
    * a podcast reader
    * a frontend for a site search(using google)
    * …

    Discuss

    In English

    Français

    Description

    OOF est une bibliothèque de composants Flash utilisables dans Flash ou Silex par des designers sans savoir programmer. Ils sont principalement orinetés vers la manipulation de données. Avec eux, vous pouvez construire une gallerie, lire des fluxs RSS, lire et écrire dans une base de données, envoyer des emails etc. Cette version est faite pour être utilisé avec Silex, et elle vient avec tout ce dont vous avez besoin pour faire tourner OOF avec votre serveur Silex, ainsi que quelques instructions simples pour se lancer. Un kiy de dévelopment est aussi disponible pour qui veulent aller plus loin.

    OOF site principal

    Téléchargement

    OOF pour silex

    OOF devkit

    Installation

    see readme.txt /lisezmoi.txt

    Utilisation

    Les composants OOF pour Flash et pour SILEX sont les suivants :
    * des listes
    * des connecteurs à un flux RSS, à une base de données, à un fichier Excel
    * des afficheurs de vidéo, de texte, de son, d’images
    * composants login et captcha pour l’authentification (accès à un espace privé, gestion des utilisateurs, création de comptes)
    * composant mail
    * composant upload
    * …

    OOF permet donc de créer sans programmer, dans Flash comme dans SILEX :
    * un site en Flash avec des fonctionnalités communautaires (espace perso, commentaires, …)
    * un site en Flash dont le back office est un blog
    * un livre d’or
    * un blog
    * une galerie photo
    * une web tv
    * une playlist audio ou video
    * un agrégateur rss
    * un lecteur de podcast audio ou vidéo
    * un module de recherche interne à un site en Flash ou qui utilise google
    * …

    Discuter

    En Français

    Align Component

    Lundi, août 10th, 2009

    Align Component

    Download

    Align Component

    Description

    This component let you clip a media in a corner or on a side of the window. For example you can put your logo in the bottom right corner or a menu on the left side of the window, even if your website does not resize.

    It is also possible to clip a media on an other one, e.g. a background on a text field.

    - Work only for website in noScale mode for now -
    size 1size 2

    Installation

    Unzip files and put the swf file somewhere the media/ folder or in a subfolder. Then drag it from the library toolbox to the scene.

    Use

    Set the “Name of the media” parameter to the name of a media.

    Here is an explanation of the value parameters:

    Left value

    - 1st line = x position, for example < < stageRect.left > > for the left side of the window.

    - 2nd linie = left margin in pixels

    Top value

    - 1st line = y position, for example < < stageRect.top > > for the top of the window.

    - 2nd linie = top margin in pixels

    Right value

    - 1st line = x position of the right side of the media, for example < < stageRect.right > > for the right side of the window. If Left value is set, then the media is resized.

    - 2nd linie = right margin in pixels

    Bottom value

    - 1st line = y position of the bottom of the media, for example < < stageRect.bottom > > for the bottom of the window. If Top value is set, then the media is resized.

    - 2nd linie = bottom margin in pixels

    To do

    - showAll compatible

    - more simple params (top left value / top left margin, …)

    Author

    lex [at] silex-ria.org

    excel plugin for silex

    Samedi, août 1st, 2009

    Download

    version 1.0 : excel plugin for silex

    version 1.1 : excel-plugin-for-silex-v1.1

    Versions

    v1.0

    • 2009/08/01

    v1.1

    • 2010/03/04
    • xls and xlsx support in excel_compute script

    Presentation

    Use PHPExcel to set values and get values from an Excel sheet. The result is an RSS feed which you can use in Silex with the Oof RSSConnector component. Formulas of the cells are interpreted thanks to phpExcel.

    You can set the values you want and get other cells which are supposed to contain the result.

    example

    For example if you want to display a list of prices for some fruits at a given date:
    excel-example

    Let’s say the day is set in excel in the column A1, the labels are in the column B and the prices are formulas in the column C. You want to display a list with all fruits and their prices.

    So you simply put the Oof components on the Stage in silex:

    • RSSConnector
      • URL prefix = < < silex.rootUrl> > /cgi/scripts/
    • DataSelector
      • enter the connector and list names
      • source = excel_compute.php?set_values=A2:DATE&get_values=B2-C5&file_name=media/test_xls.xlsx - but replace “DATE” by the date you want (if it is different from the one which is in the excel file allready). The “DATE” value can be entered by the user for exemple or be the date of today (use silex accessors)
    • RichTextList
      • cell content = < < B> > costs < < C> > Euros

    It makes this happend:

    excel-example2

    The script which you call with the Oof components

    inputs

    • set_values a suite of cell names and value pairs - e.g. C1:21,C2:test,C3:6
    • get_values values to be retrurned - may be a range - e.g. A1,C2-F15,G6
    • file_name name of the xlsx file
    • sheet_number sheet number - default is 0
    • example excel_compute.php?set_values=C3:654,C4:444&get_values=C11&file=media/btt.xlsx => retrieve the value of C11 when C3 is set to 654 and C4 is set to 444
    • example excel_compute.php?set_values=C3:333,C4:444&get_values=C11,C13,C14&file_name=media/btt.xlsx

    result

    An RSS2 feed with all the desired cells. Title tag is the line number, other tags have the name of the column and the value of the corresponding cell (col,line).

    For example, the items could be like this:

    	<item>
    		<title><![CDATA[4]]></title>
    		<G><![CDATA[Oranges]]></G>
    		<H><![CDATA[38]]></H>
    		<I><![CDATA[EUR]]></I>
    	</item>
    	<item>
    		<title><![CDATA[5]]></title>
    		<G><![CDATA[Pommes]]></G>
    		<H><![CDATA[41]]></H>
    		<I><![CDATA[DOLAR]]></I>
    	</item>

    Requirements

    The following requirements should be met prior to using PHPExcel:

    * PHP version 5.2 or higher

    * oof components and silex

    Installation

    - copy includes/phpexcel/ folder into [silex installation folder]/cgi/includes/

    - copy excel_compute.php to [silex installation folder]/cgi/scripts/

    Test

    - copy test_xls.xlsx in [silex installation folder]/media/

    - call the script like this: http://mysilexserver.com/cgi/scripts/excel_compute.php?set_values=H3:25,H4:38&get_values=H7,H8,H10,H12&file_name=media/test_xls.xlsx

    Help

    - call the script without any parameter to display help

    Formulaire de contact

    Vendredi, juin 19th, 2009

    Creez vos formulaires de contact avec les composants mails de OOF.

    Consultez le tutoriel sur http://silex-ria.org/aide

    Télécharger les composants OOF sur le site http://oof.sourceforge.net/

    image-2