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