Thursday, November 27, 2008

Existentialism Capitalize

Let's go down to take a look


INTERFACES OF LOW

Well, in the earlier talk of high-level interfaces, commented that these interfaces are the easiest to implement because its look is in charge of device running the application.
This allows us to save time and effort, but sometimes will need to take control of your presentation, for example: If you're developing a video game.

RULE No. 1:
Before starting, it is desirable to set a rule: "All screens we create using the low-level APIs inherit from the Canvas class.

For this reason, first of all get to know this class and then go deeper into each of the elements that compose it.
Canvas Class is the superclass of all screens that use low-level APIs, as it was for Screen displays worn by high-level APIs.

PEACEFUL COEXISTENCE:
However, the relationship APIs high and low, there is nothing in writing, that is: "There is no impediment in allowing us to use both screens the same MIDlet as derived from Canvas Screen"

Canvas class allows handle low-level events and draw anything on screen. That is why it is used as a basis for conducting games.

This class has an abstract method paint () we must implement a mandatory (for our own will) and is responsible for drawing on the screen of the device.


An example familiar to go:


BajoNivel.java


import java.io.IOException;
javax.microedition.lcdui import. *;
lowlevel public class extends Canvas implements CommandListener {
private PBajoNivel midlet;
private Command salir;
private Image imgFondo, imgTriste;
public BajoNivel(PBajoNivel mid) {
try {
imgFondo = Image.createImage("/fondo.PNG");
imgTriste = Image.createImage("/triste.PNG");
} catch (IOException e) {
e.printStackTrace();
}
salir = new Command("Salir", Command.EXIT,1);
this.midlet = mid;
this.addCommand(salir);
this.setCommandListener(this);
}
public void paint(Graphics g) {
g.setColor(255,255,255);
g.fillRect(0,0,getWidth(),getHeight());
g.setColor(0,0,0);
g.drawImage (imgFondo, 0, 0, 0);
g.drawImage (imgTriste, 40, 40, 0);

} public void commandAction (Command c, Display d) {
if (c == exit) {
midlet.salir ();

}}}



This routine is the one we show in the display device, note that we are using two images and fondo.PNG triste.PNG , these files are placed in the res directory in your project.


Now let MIDlet code that will summon.


PBajoNivel.java
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class PBajoNivel extends MIDlet {
private BajoNivel panCanvas;
private Display pantalla;
public PBajoNivel() throws Exception{
pantalla = Display.getDisplay(this);
panCanvas = new BajoNivel(this);
}
public void startApp() {
pantalla.setCurrent(panCanvas);
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
public void salir(){
destroyApp(false);
notifyDestroyed();
}
}

As noted, PBajoNivel.java simply declare a class inherited pancanvas lowlevel.


Two examples of running this application in two different models of cellular, so that the reader can verify the deployment difference between one and another.












Sunday, November 23, 2008

In How Many Units Does Heparin

THE REST OF THE INTERFACE

two deliveries in the latter one, we seen the use of two components to the use of menus, we saw the kind LIST and CHOICEGROUP , we found that basically the difference between the two is that the class LIST is not subordinate to the class FORM , that is, it is not necessary to first create an object type FORM then add the object LIST.



private Display display;

private mylist;

...

display = Display.getDisplay (this);

mylist = new List ("Options" List.IMPLICIT)
miLista.append ("High", null);
miLista.append ( low ", null);
miLista.append (" Query ", null);
miLista.append (" Amendments ", null);
miLista.append (" Print ", null);
...


display.setCurrent (mylist);



CHOICEGROUP While an object must be attached to a Form.



private Display miDisplay;
Form miForma private, private
ChoiceGroup myGroup;


...

miDisplay = Display.getDisplay (this);
miForma = new Form ("MAIN MENU");


...

ChoiceGroup myGroup = new ("Options:" ChoiceGroup.EXCLUSIVE)
miGrupo.append ("High", null);
miGrupo.append ("Low", null);
miGrupo.append ( "Consultations", null);
miGrupo.append ("Amendments", null);
miGrupo.append ("Print", null);


...

miForma.append (myGroup)

...
display.setCurrent (mylist);




But besides these classes we have many more like ...


Class Ticker

Util to display messages in the form of a canopy gliding side to side of the user's screen.


Class DateField

Useful for handling dates, either for display or to request the user to provide a specific date.



Class ImageItem

Useful for work with image files in your application. We shall see later, but with this tool you can add a visual appeal that makes it more friendly and user friendly.


Class TextField

Useful for text handling, which can be deployed alone or, to ask the user to enter data. Such as password, numbers, names, etc.



should be noted that high-level graphics classes, have the facility to suit the type of deployment available to the device in which we work.

In other words, we call the classes and create the objects in our application, but the display is under the control of the hardware.



Let's see, the use of the classes mentioned above, in one example.


import java.io.IOException;
import java.util.Date;
javax.microedition.lcdui.Command import, import
javax.microedition.lcdui.CommandListener;
javax.microedition.lcdui.DateField import;
javax.microedition.lcdui.Display import, import
javax.microedition.lcdui.Displayable;

import javax.microedition.lcdui.Form;

import javax.microedition.lcdui.Image;

import javax.microedition.lcdui.ImageItem;

import javax.microedition.lcdui.Item;

import javax.microedition.lcdui.ItemStateListener;

import javax.microedition.lcdui.TextField;

import javax.microedition.lcdui.Ticker;

import javax.microedition.midlet.MIDlet;

import javax.microedition.midlet.MIDletStateChangeException;






public class MIDOtros extends MIDlet implements CommandListener, ItemStateListener {

private Ticker miMarquesina;

private DateField miFecha;

private ImageItem miImagen;

private TextField miHumor;

private Image imgSerio, imgFeliz, imgTriste;

private Command Salir;

private Display miDisplay;

private Form miForma;





public MIDOtros() {

try {

imgSerio = Image.createImage("/serio.PNG");

imgFeliz = Image.createImage("/feliz.PNG");

imgTriste = Image.createImage("/triste.PNG");

} catch (IOException e) {

e.printStackTrace();

}





Date wHoy = new Date();

miDisplay = Display.getDisplay(this);

miFecha = new DateField("Dia de hoy",DateField.DATE);

miFecha.setDate(wHoy);

miHumor = new TextField("% de Animo", "50", 2, TextField.NUMERIC);

miMarquesina = new Ticker("Ejemplo de Graficos de Alto Nivel. Tutorial para el Desarrollo de aplicaciones en móviles, País México. Noviembre del 2008");

miForma = new Form("Otros Items");

Salir = new Command("Salir", Command.EXIT, 0);

miImagen = new ImageItem(null, imgSerio, 0, null);

miForma.setTicker(miMarquesina);

miForma.append(miFecha);

miForma.append(miImagen);

miForma.append(miHumor);

miForma.addCommand(Salir);

miForma.setCommandListener(this);

miForma.setItemStateListener(this);

}





protected void destroyApp(boolean arg0) throws MIDletStateChangeException {

}





protected void pauseApp() {

}





protected void startApp() throws MIDletStateChangeException {

this.miDisplay.setCurrent(this.miForma);

}





public void commandAction(Command arg0, Displayable arg1) {

if (arg0 == Salir){

try {

destroyApp(false);

} catch (MIDletStateChangeException e) {

e.printStackTrace();

}
notifyDestroyed ();

}} public void


itemStateChanged (Item arg0) {
if (arg0 == miHumor) {int
wValor = Integer.parseInt (miHumor.getString ());
if (wValor <> 70) {
miImagen.setImage (imgFeliz)} else {

miImagen.setImage (imgSerio)

}}}


}}




As noted, in this application handle image files:


imgSerio = Image.createImage ("/ serio.PNG");
imgFeliz = Image.createImage ("/ feliz.PNG");
imgTriste = Image.createImage ("/ triste.PNG");




What are PNG files, this allows us to handle images with a good reasonable resolution and store in a small space.
Well, once compiled our code, we can run it and see it in action.

Monday, August 11, 2008

Quotations Ceremony For Lamplighting

... Photo session with Javier Gallardo

August bad time for many things, including writing. Although to take pictures never a bad time. Here is a sample of the photos that I did to Javier Gallardo ( http://www.fotopunto.com/26482 ) a fantastic model and a lovely person.


















Friday, July 11, 2008

Not A Bad Case Of Gental Worts

Incident and Reflected Light Light

Thanks to a suggestion I became aware of how important it may be the concept of reflected light and incident light the measurements (light of course) in photography. Not what should be the confusion on this subject but I think certainly there is a widespread doubt on these two types of measurement. The difference between these two concepts is quite clear and the names of them give us light (pun intended) to understand.

When making a measurement of light with a handheld meter

have two options 1) Use the light metering incident.
2) Use the measuring the reflected light.

What is the difference between these two measurements ...? The difference is simple ...

By measuring the incident light what we are measuring with our hand held meter is the light that strikes directly on the surface we want to photograph. To realizae this measurement, the hand-held light meter should be located on the surface to photograph and he shall tell us exactly how much light is coming to that area so we can adjust the settings of your camera and get a shot well exposed. This type of measurement is only possible with hand-held photometers and the cameras, despite having built-in light meters can not do it.

photometers in hand, for the measurement of incident light the light diffusing shell (the "ball" a pretty white with all photometers) should be on the sensitive cell.





Now, with the measurement of reflected light what we are measuring with our hand held meter is only the light that reflects want to photograph the surface. This type of measurement is less accurate than the incident and the use must be careful because we do not necessarily accurately measuring the surface of interest. The current cameras use this type of measurement and a photometer containing works by collecting the light (reflected by the objects ...) through the lenses.


photometers in hand, for measuring the reflected light diffusing shell light should be on the sensitive cell.





When we use one or the other?

When we hand photometer will have to use the measurement of reflected light as it is not possible with a camera (aun. ..) an incident light metering (Canon notes, I'm sure that can not be complicated add an incident light meter in your professional camera bodies but can not afford ....).

Now, if we do have a handheld exposure meter (which I recommend, much) in the vast majority of cases use the incident light metering. Use this type measurement since in most cases, at least in the type of photography I do, we will be able to approach the object to be photographed for in situ measurement . If you are working on a study manual flashes of study, provided we can get closer to the / the model to measure "in that part of the body that we want to be well exposed.

Now what happens if we measure the light from an object that is not within our reach? (Eg a mountain) Then we have two choices: We can put our hiking boots, climbing the mountain, a measurement of the incident light at the point of the mountain that we want it well exposed, get the result, down the mountain, put the parameters in the camera and shoot or, better yet, we can stay where we are and use measurement of the reflected light of our handheld exposure meter. So we will measure the light reflected from the mountain. We so much like what our camera when we press the shutter button slightly.

So, to summarize. We use our handheld meter to measure primarily the light incident when we approach the subject you want to use the photograph and measuring the reflected light when we can not approach the subject you want to photograph.

Using the measurement of incident light in photography and without manual flashes with

Al without shooting outdoor manual flashes usually be able to take licenses on the use of hand held photometers not we can take in the photography studio where we need to be more careful about our measurements.

In the next image, for example, we see that if we measure in any of the three points marked with a red asterisk using the handheld photometer oriented all cases the same way towards the camera and taking care not to cast a shadow on the meter with our body, the measurement result would be the same. It is a bright light situation where no shadow can vary our reading. The intensity of the sun on the three points scored is the same. Moreover, if we were near the scene to be shot and we were enlightened by the same light (the sun without any shade) could make a measurement of incident type from which estuviémos without approaching the beach, the dog or the sea we know that light at the four points (including one in which we have the camera) is the same.

This same situation will not happen if we have a scene like that presented to the left where we have shadows or to work with manual flashes (see case below). In this scene, our manual meter reading will give us an incident light differently depending on what part of the scene we place. If we want to photograph the model, a reading that we could get would be F7.1 and 1 / 250 while if we want to photograph the scene that is furthest from the model, being in shadow, we would like f4 reading 1 / 250. Perhaps it is good time to remember that the distance to the subject does not change the meter reading that hand. By this I that if we get a reading of F7.1 and 1 / 250 in the model, no matter the distance you do the picture. The measure we introduce in our cameras will always be the same even make the picture with two different focal (17 mm and 100 mm) or we simply turn away or get closer to the scene.

Now, what will happen if we work with manual flashes ...?
is here takes on great importance the use of handheld exposure meter. I should also mention that so far, with the photos above, we had been doing the measurements with handheld light meter in the "ambient light measurement (usually an icon with the picture of the sun ...). Now we have to change as a "flash light metering."

So we have taken the first step to leave our hand photometer mode flash metering. This MEANS, as stated in the previous article, which generally leave the parameters of the meter at 1 / 125 ISO 100 and wait for the flash output to the meter manual labor of a value f us to put our camera correct exposure. In the example photo, the measurement was made for the nose (the meter is placed over the nose of the model being careful not to cast a shadow on the dome diffuser) which was "properly" exposed. In the case of this picture we have a single source of light coming from the left and that casts a shadow on the face of the model. If we made the measurement (incident) on the cheek is dark here appeared well exposed looking at that makes the nose of the model would surely be burned. In this example we are dealing with a very small light source so be careful with the measurements we do and choose rather than part of the face we want to be well exposed. In another article I will try to give specific examples of case studies of measurements, while I hope that the concept of measuring light incident / reflected and their differences there is a little clear.

Wednesday, July 9, 2008

Normal Cm For Thyroid

My view on the photometry and hand photometer

a kid, when I made for school work (when done by hand is no computers .... eh ...) always began with the dictionary definition of the Royal Academy English Language of the item were to try. With this theme I take up this habit

photometry.
( De photometer).


1.
f. Part of optics which deals with laws relating to light intensity and methods to measure it.

Okay, all very nice, but this is how you eat ...?

One of the reasons why I write this is that quite often visit the website of strobist and always surprised me that despite promoting working with small flashes (not study ...) in manual mode, never seem to mention whether or not to use handheld photometers. Seem, in most cases, based on the histogram of the camera more than in these devices for me, are true miracles from heaven.

Al grain. What is a photometer and serving?

A photometer is an instrument today are the vast majority of integrated cameras for practical reasons (to put it) also can be purchased separately from the camera (handheld photometers) . Roughly a handheld meter allows measure light in a scene separately from the camera so that, once we move data handheld meter indication to the camera, we get a picture well exposed.

The three parameters involved in the exhibition of photography and always we must bear in mind are:

- The opening of the diaphragm
- shutter speed;
- Sensitivity (ISO)

I will not explain each of the parameters for what I inferred that they know these concepts and what it means to modify each of them to achieve an effect or another in the footage without flash. Just see what effect primarily involves editing in footage with manual flash.

La / s question / s the million: How do you use? When does it I can use? How do I transfer the data that my camera gives me ...?, etc.

Personally I use the meter in photography studio flashes that work with study manuals. The trial and error, despite delivering results today with digital photography, takes time and is not as accurate. In addition, the meter allows us to work with more than one light source and light enough to achieve accurate measurements.

Now a little theory before entering practice with handheld light meter

Perhaps one of the most important thing to understand is that the flashes are controlled manual always with the aperture of our goals. This opening will be responsible for a scene is underexposed, overexposed or correct light " (please note that a scene under / overexposed not necessarily mean it is wrong).

If we overexpose a scene by using our manual flash, so we have to do is let during the brief moment that the flash lasts our diaphragm is more open (let in more light). If on the contrary, what we do is to underexpose a scene by using our manual flash, so we have to do is leave during the brief moment that the flash lasts, our diaphragm is more closed (let in less light).

A low power flash required to work with large aperture opening (f2.8 for example) while a powerful flash that allows us to work with small aperture openings (eg f22).

The shutter speed only affect how much light outside the manual flash (ambient light for example) we can get from the scene. The shutter speed does not affect the exposure of the scene becomes illuminated by the flash but it does affect the environment. To illustrate this I have attached some photos that will help us understand this better. This group of photographs were taken with a Canon 430 EX flash in manual mode to a power of 1 / 32 and an EOS 400d manual also can modify the necessary parameters. In the six pictures used the same flash power and opening the same aperture (f 3.5) but between them increased by making light path changing the shutter speed.

In this first scene ( f3.5 1 / 125) can only see the lit by the flash (the lattice door, the balustrade of the terrace)











In this second stage ( f3.5 1 / 60) to have missed a step more light, we can see a small part of the horizon on the left side of the scene (note that the flash is illuminated by the exposed alike)





In this third stage ( f3.5 1 / 30) the horizon is much more clarity these two steps of light have allowed the ambient light "strain" on the scene (note that the flash is illuminated by the exposed alike)





In this fourth stage ( f3.5 1 / 15) the four steps of light controlled by the shutter speed and can see a much clearer horizon (note that the illuminated As the flash is still exposed)





In the fifth scene ( f3.5 1 / 8) the horizon appears ever more exposed (note that the flash is illuminated by the exposed the same)





and in this last scene ( f3.5 1 / 4) time iris aperture results well above the horizon while the illuminated by the flash still the same exposure.










now to use the meter ...

Most photometers operate similarly. We suggest three main data already described.

- The opening of the diaphragm
- shutter speed;
- Sensitivity (ISO)

In this picture you can see as represented by a common meter, the Sekonic L308-S













Most photometers also allow us to measure manual flashes lights that we use. In the case of this specific model of handheld exposure meter, the way we want to use is the one with the flash symbol. When selecting this mode, the meter runs forward to the flash output to be measured and once fired, the meter displays the data you interest to set the parameters of our camera. All this seems a bit cumbersome but we'll see now and in the studio control parameters measured when the lights are fairly straightforward.

As mentioned, it is necessary to study our cameras shoot in manual mode in this way to have total control over the parameters of the shot. Personally I always put the camera speed to 1 / 125 and ISO to 100 (working with Canon). So, if you already know this, all you need to know is what value to f. This is where we start to use our hand photometer

The manual flash metering is done with the meter on the surface we want to photograph. In the meter repeat the two parameters that we have in our chamber, ie, put the speed at 1 / 125 and ISO 100. Once these data are already on the meter, all you need is the flash and wait for the photometer us the value f (the only data we needed in the camera.) The aperture value or f-number will be that we introduce into the camera for correct exposure. If we take the camera using the same values \u200b\u200bas you have indicated the meter (eg 1 / 125 f5.6, ISO 100) is part of the scene on which we measure will be properly exposed.

Funny Bar Restaurant Sayings

Two videos that do not include in my site I update my website

leave two videos here that do not include in my website. The first is a presentation that was shown in Sevilla Photo 08 and includes the 7 photos of the "The 7 Deadly Sins" and presented as a personal project for the annual course Photo Coverage .



This second video includes images made in Seville for the proposed bus lights

Females In Panty Girdles




After thinking a lot about the subject, "re-tweak" my files Photos, quarrel with Dreamweaver, friendship with the people of Incomedia, fight with Sync, friendship with Arsys, designed in CS3, page up and down countless times, so finally I have reached a balance and have a page with I feel at ease. Can visit in www.javiergarciarosell.com

Saturday, May 17, 2008

Susten 100 Progesterone Soft Gelatin Capsules

Read records from a mysql database and asp as3

We read the records in a mysql db through asp script that we pass an order cadeena the sql, and returns a xml with the result.
In this example I added a datagrid to the stage, I called dg and is responsible for receiving calls datos.Se such as: var
dba: leeDb leeDb = new ();
datosdb.carga_datos ("select * from users" )
Files: leeDb.as, leeDb.asp

leeDb.as
  

package code {import flash.display .*;
import flash.events .*;
import flash.net .*;
import fl.controls.DataGrid;
fl.controls.dataGridClasses.DataGridColumn import, import
fl.data.DataProvider;
/ / Class public class
leeDb
extends Sprite {public var dg: DataGrid;
/ / constructor public function
leeDb (): void {
trace ("constructor");}

carga_datos public function (sql: String):
void {/ / var sql to URLVariables
URLVariables: URLVariables = new URLVariables;
urlVariables.sql = sql;

/ / define values \u200b\u200bURLRequest var
call: URLRequest = new URLRequest;
URLRequest.method = URLRequestMethod.POST;
URLRequest.url = "http://localhost/webprueba/codigo/leeDb.asp"
URLRequest.data = URLVariables;

/ / I loader and event
was urlLoader: URLLoader = new URLLoader;
urlLoader.addEventListener (Event.COMPLETE, cargaCompleta);

/ / leemos
urlLoader.load (urlRequest);


} / / private function _______________funciones___________________________________
cargaCompleta (Eventos: Event) : void {
was myxml: XML = new XML (evento.target.data);
, the overall direction of Faith: int = myxml.child ("*"). length ();
was totalCampos: int = myxml.child (0) . child ("*"). length ();
was dp: data provider = new data provider (myxml);
/ / ponemos columns
was spine: DataGridColumn = new DataGridColumn ();
for each (var item: XML in myxml.child (0). Elements ()) {column = dg.addColumn
(new DataGridColumn (item.name (). ToString ()));
columna.width = 300 / totalCampos;}

dg.move (0.200);
dg.width = 300;
dg.rowCount = totalRegistros;
dg.dataProvider = dp;

}}}




leeDb.asp
  
\u0026lt;% 'declare variables dim
dbConexion, sql, rs, x, y,
table' db connection string
dbConexion = "Driver = {mySQL ODBC 3.51 Driver}; Server = localhost, Port =; Option = 4; Database = test; Uid =; Pwd =; "
'variable charge
sql sql = Request.Form ("sql")
' read data
table Set rs = Server.CreateObject ("ADODB.Recordset") rs.Open sql
, dbConexion
table = rs.GetRows
'
xml file header Response.ContentType = "text / xml" Response.Write
"\u0026lt;? xml version = '1 .0' encoding = 'UTF-8'?>"
Response.Write "\u0026lt;regs>"
for x = 0 to UBound (table 2)
Response.Write "\u0026lt;reg>"
for y = 0 to UBound (table 1)
Response.Write "<" & rs.Fields(y).Name & ">" Response.Write
board (y, x )
Response.Write "\u0026lt;/" & Rs.Fields (y). Name & ">"

next Response.Write ("\u0026lt;/ reg>")

next Response.Write ("\u0026lt;/ regs>") rs.Close

Set rs = Nothing
%>

Dining Table Blue Print



These two classes allow you to communicate events between classes.
Its use is simple. In the class that throws the event:
import
EventCentral
ProjectEvent
EventCentral.getInstance import (). DispatchEvent (new ProjectEvent (ProjectEvent.LANG, {name: "nombreEvento "}));


And in the class that listens:


import import EventCentral

ProjectEvent
EventCentral.getInstance (). AddEventListener (ProjectEvent.LANG, TuFuncion)

ProjectEvent.as



  

package {import flash.events.Event
;
/ / class public class
ProjectEvent
extends Event {
/ / public static const variables LANG
: String = "LANG" public var

params: Object;

/ * constructor

@ param ProjectEvent $type : the event string
@param $params : an object containing any number of values to be sent to listeneers
@return : a reference ot the event

*/
public function ProjectEvent($type:String, $params:Object = null)
{
super($type, true, true);
this.params = $params
}

/*
Overrides the flash.events.Event's clone method
@return Event
*/
public override function clone():Event
{
return new ProjectEvent(this.type, this.params);
}

/*
Overrides the flash.events.Event's toString method
@return String - Class name

*/
override public function toString():String
{
return ("[Event ProjectEvent]");
}
}

}


EventCentral.as


    

package
{
import flash.events.EventDispatcher;
import flash.events.Event;
//
public class EventCentral extends EventDispatcher
{
// variables
private static var instance:EventCentral=new EventCentral ;

// constructor
public function EventCentral ():void
{
super ();
if (instance)
{
throw new Error("EventCentral is a Singleton and can only be accessed through EventCentral.getInstance()");
}
//trace ("[EventCentral] : constructed");
}
public static function getInstance():EventCentral
{
return instance;
}
/*
Overrides the dispatchEvent method in flash.events.EventDispatcher
@param $event : any qualified event
@return

boolean * / public override function dispatchEvent
($ event: Event): Boolean {

super.dispatchEvent return ($ event);

}}}

How To Make Alias 2 Vibrate

Class Communication between classes to load

This class loads a css file and associates it with the style property to apply to text.

css.as


  

package {import flash.display.Sprite;
import flash.events.Event;
flash.events.IOErrorEvent import, import flash.net .*
;
flash.text import .*;

public class extends Sprite {
css
public was Estilo: StyleSheet = new StyleSheet ();

public function css (): void {

was loader: URLLoader;
was req: URLRequest = new URLRequest ("datos/css/css1.css");
loader = new URLLoader;
loader.dataFormat = URLLoaderDataFormat.TEXT;

/ / loaders
loader.addEventListener (Event.COMPLETE, onCSSFileLoaded);
loader.addEventListener (IOErrorEvent.IO_ERROR, catchIOError);

/ / llamada
loader . load (req);
//_________________________________________________
function catchIOError (Event: IOErrorEvent)
{trace ("Error found:" + event);
}}

onCSSFileLoaded function (event: Event): void {
estilo.parseCSS (event.target.data)
trace (if necessary target.data)

}}}

Big Boobs Pumping Milk

stylesheet class to maintain multiple languages \u200b\u200bon our projects

This class maintains the translations into the languages \u200b\u200byou want.
The translations are stored in XML files (one per language). EventCentral and ProjectEvent classes are used to pass the language change event to other classes to update their texts (The publish soon). Example of an xml file frances


fr.xml


  
\u0026lt;? xml version = "1.0" encoding = "UTF-8"?>
\u0026lt;! xliff DOCTYPE PUBLIC "- / / XLIFF / / DTD XLIFF / / EN "
" http://www.oasis-open.org/committees/xliff/documents/xliff.dtd ">
\u0026lt;xliff version="1.0" lang="es">
\u0026lt;file datatype = "plaintext">
\u0026lt;header> \u0026lt;/ header>
\u0026lt;body>
\u0026lt;trans-unit resname="nombre">
\u0026lt;source> Username \u0026lt;/ source>
\u0026lt;/ trans-unit>

\u0026lt;trans-unit resname="clave">
\u0026lt;source> Password \u0026lt;/ source>
\u0026lt;/ trans-unit>

\u0026lt;trans-unit resname = "logeado">
\u0026lt;source> User: \u0026lt;/ source>
\u0026lt;/ trans-unit>

\u0026lt;trans-unit resname="no_logeado">
\u0026lt;source> Wrong user or password. \u0026lt;/ source>
\u0026lt;/ trans-unit>

\u0026lt;trans-unit resname="enviar">
\u0026lt;source> Send \u0026lt;/ source>
\u0026lt;/ trans-unit>

\u0026lt;trans-unit resname="usr_vacio">
\u0026lt;source> L user exists. \u0026lt;/ source>
\u0026lt;/ trans-unit>

\u0026lt;trans-unit resname="cla_vacia">
\u0026lt;source> password exists. \u0026lt;/ source>
\u0026lt;/ trans-unit>
\u0026lt;/ body>
\u0026lt;/ file>
\u0026lt;/ XLIFF>


idioma.as

  
code package {import
EventCentral;
ProjectEvent import, import
fl.lang.Locale;
import flash.display .*;
fl.data.DataProvider import, import
fl.controls .*;
import flash.events .*;

language public class extends Sprite {var data
: DataProvider = new DataProvider;
var combo: ComboBox = new ComboBox;
/ / ____________________constructor________________________

public function language (): void {
/ / load the xml language and began
Locale.addXMLPath ("en", "data / lang / es.xml");
Locale.addXMLPath ("en", "data / lang / en.xml");
Locale.addXMLPath ("fr", "data / lang / fr.xml ");
Locale.setDefaultLang (" is ");
Locale.setLoadCallback (init);
Locale.loadLanguageXML (Locale.getDefaultLang ());
trace (Locale.stringIDArray)
/ / datos.addItem
combo data ({data: "en", label: "English"});
datos.addItem ({data: "en", label: "Inglés"});
datos.addItem ({data: "fr", label: "Française"});
combo.dataProvider = data;
combo.addEventListener (Event.CHANGE, action);
addChild (combo);}

/ / _______________funciones___________________________________

private function init (event: Boolean): void {
if (event) {
/ / send initial event for the other classes begin the language
EventCentral.getInstance ( ). dispatchEvent (new ProjectEvent (ProjectEvent.LANG, {name: "Reynaldo "}));

} else {trace (" Failed to load the XML language file. ");

}}
/ /

functions / / has changed the language, change and send private function
event action (event: Event): void {
/ / trace ("language: "+ Evento.target.selectedItem.data)
Locale.loadLanguageXML (evento.target.selectedItem.data)
EventCentral.getInstance (). DispatchEvent (new ProjectEvent (ProjectEvent.LANG, {name:" Reynaldo "})) ;

}}}

Doujin Futanari Naruto

class to upload files (swf, jpg, gif, png)

With this kind charge content (image or swf). It also illustrates the use of listeners.
  


package {/ / import classes import
flash. display .*;
import flash.events .*;
flash.net.URLRequest import;
cargaImagen
public class extends Sprite {Constructor


//_________ cargaImagen public function (): void {
/ /}
//____________
to start charging method
public function init (image: String): void {

/ / Create loader object
var loader: Loader = new Loader ;
/ / listeners are added
ponListeners (loader.contentLoaderInfo)
/ / I think the object containing the request
var request: URLRequest = new URLRequest (image);
/ / Position
loader.load request (request );}


/ / Add listeners to the charger
ponListeners function (dispatcher: IEventDispatcher): void {
dispatcher.addEventListener (Event.COMPLETE, completeHandler)
dispatcher.addEventListener (HTTPStatusEvent.HTTP_STATUS, httpStatusHandler)
dispatcher.addEventListener (Event.INIT, initHandler)
dispatcher.addEventListener (IOErrorEvent.IO_ERROR, ioErrorHandler)
dispatcher.addEventListener (Event.OPEN, openHandler)
dispatcher.addEventListener (ProgressEvent.PROGRESS, progressHandler)


} / / function to execute when it finishes.
completeHandler function (event: Event): void {
trace ("completeHandler:" + event);
addChild (event.target.content)


} / / It runs on receipt of an HTTP status code httpStatusHandler
function (event: HTTPStatusEvent): void {
trace ("httpStatusHandler:" + event);}


/ / Dispatched when the object's properties loaded are available
/ / Since the distribution could change the object (width, scale, etc)
initHandler function (event: Event): void {
trace ("initHandler:" + event);}


/ / It runs when an error input / output, for example, when trying to load a
/ / nonexistent file
ioErrorHandler function (event: IOErrorEvent): void {
trace ("ioErrorHandler:" + event);}


/ / Executes when the loading begins
openHandler function (event: Event): void {
trace (" openHandler: "+ event);}


/ / is executed during the loading progress
progressHandler function (event: ProgressEvent): void {
trace (" progressHandler: bytesLoaded = "+ event.bytesLoaded +" bytesTotal = " + event.bytesTotal)

}}}

Friday, May 16, 2008

Long Does Take Flagyl Work



start this blog with the aim of deepening the as3 code and programming