elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Introducción a Git (Primera Parte)


  Mostrar Mensajes
Páginas: [1] 2 3 4
1  Programación / PHP / Re: ayuda paginar resultados en: 28 Diciembre 2006, 03:38 am
para paginar resultados yo utilizo la sig clase:

http://www.phpclasses.org/browse/package/2346.html

sencillo sin tanto quebradero de cabeza ;D

espero te sirva.

saludos..!
2  Programación / PHP / Re: Classes de PHP en: 29 Octubre 2006, 00:01 am
Tienes toda la razon, revisando la version de los servidores es PHP 4.x

Gracias y saludos.
3  Programación / PHP / Classes de PHP en: 27 Octubre 2006, 18:58 pm
Buenas, estaba probando una clase muy simple escrita en php, en varios servidores (bluehost, globat), el problema es que no funciona?... el ejemplo lo saque de un libro asi que no creo que este mal, alguien sabe porque no funciona?...

Esta es la clase:
Código:
<?php
  # Recipe 2-1
 
  class Bird
  {
    function __construct($name, $breed)
    {
      $this->name = $name;
      $this->breed = $breed;
    }
  }
 
  $tweety = new Bird('Tweety', 'canary');
 
  printf("<p>%s is a %s.</p>\n", $tweety->name, $tweety->breed);
 
  $tweety->price = 24.95;
 
  printf("<p>%s is a %s, and costs \$%.2f.</p>\n",
          $tweety->name, $tweety->breed, $tweety->price);
?>

Asi de simple, lo guardo como "index.php" y no marca ningun error, simplemente no imprime las variables $tweety->name, $tweety->breed, pero si imprime $tweety->price.

Tambien hice una prueba local en mi PC y funciona perfectamente, solo que en los servidores de las compañias que menciono no.

Sera por algun parametro de configuración?
Sera alguna incompatibilidad con la version de PHP?

Gracias por su ayuda.
4  Programación / Programación Visual Basic / Re: Hola que tal quisiera saber bien como se maneja el ComboBox en: 25 Septiembre 2006, 23:12 pm
Pero porque no le busca mijito mbre..

http://mat21.etsii.upm.es/ayudainf/aprendainf/VisualBasic6/vbasic60.pdf#search=ComboBox

Pd.
Saca el Feon
5  Media / Diseño Gráfico / Re: Creacion dinamica de botones (FLASH) en: 25 Julio 2006, 18:28 pm
Bueno, ya encontre la solucion, espero que a alguien mas le sirva.

creacion de botones dinamicos mediante un xml.

1)crea un movieclip en el escenario llamado "MyBtn", exportalo para actionscript con el mismo nombre de identificador; Dentro de el, crea un Textfield dinamico con nombre de instancia "buttonTitle_txt".

Suponiendo que este sea el archivo xml:
file.xml
Código:
<?xml version="1.0"?>
<root>   
    <item id="1" buttonTitle="1" buttonLink="http://www.flash-genie.de" xpos="362.6" ypos="447.6" ancho="21.6" alto="48.2"/>
    <item id="2" buttonTitle="2" buttonLink="http://www.flashmxfiles.com" xpos="344.1" ypos="447.6" ancho="18.4" alto="48.2" />
    <item id="3" buttonTitle="3" buttonLink="http://www.actionscript.org" xpos="325.2" ypos="447.6" ancho="18.8" alto="48.2" />
    <item id="4" buttonTitle="4" buttonLink="http://www.mambers.com" xpos="306.7" ypos="447.6" ancho="18.6" alto="48.2" />
</root>

Dentro del primer frame de la pelicula inserta el sig codigo:
Código:
//create a new XML object
myXML = new XML ();
//tell flash to ignore all the whitespace
//Ommiting this nearly always causes silly problems
myXML.ignoreWhite = true;
//when the xml has loaded
myXML.onLoad = function (success) {
//if we are successful, call our parse function (parseIt)
if (success) {
parseIt (this);
} else {
//Otherwise inform the user that an error has occured
//Probably our fault
trace ("Sorry, error loading XML files for the menu");
getURL ("javascript: alert('Sorry, error loading XML files!')");
}
};
//OK first bit done, its loaded (we will assume successfully..lets create objects from each bit now:
function parseIt (what) {
//Create an object for each "item"
_root.noOfKids = what.firstChild.childNodes.length;
//Note: We start at 0 with our loop
for (var i = 0; i < noOfKids; i++) {
_root["menuEntry" + i] = new Object ();
//Now we have them we need to create some properties of said items
//referring to the title and link of our button.
//The best way imo of doing this is to use attributes like such
_root["menuEntry" + i].buttonTitle = what.firstChild.childNodes[i].attributes["buttonTitle"];
_root["menuEntry" + i].buttonLink = what.firstChild.childNodes[i].attributes["buttonLink"];
_root["menuEntry" + i].xpos = what.firstChild.childNodes[i].attributes["xpos"];
_root["menuEntry" + i].ypos = what.firstChild.childNodes[i].attributes["ypos"];
_root["menuEntry" + i].ancho = what.firstChild.childNodes[i].attributes["ancho"];
_root["menuEntry" + i].alto = what.firstChild.childNodes[i].attributes["alto"];
//And thats it for that bit, normally we would attach our buttons and assign them their name and title here
//For ease of reading we will however call a function that does that like this:
assignBtnStuff ();
}
}
myXML.load ("file.xml");
/*
4)All thats left now is to make it all viewable by the user, we can check to see if all is good by using the debugger (Shift, ctrl + enter) after pressing the green arrow to commence we select _level0 and can see our objects under variables...All there? Good lets crack on, I'm getting hungry. As noted before we now need a function...so lets create one

*/
function assignBtnStuff () {
for (var i = 0; i < noOfKids; i++) {
_root.attachMovie("myBtn","XMLbtn"+i,i);
_root["XMLbtn" + i].buttonTitle_txt.text = _root["menuEntry" + i].buttonTitle;
//Lets position them vertically at 50px intervals starting at pixel 30
_root["XMLbtn" + i]._y = _root["menuEntry" + i].ypos;
_root["XMLbtn" + i]._x = _root["menuEntry" + i].xpos;
_root["XMLbtn" + i]._width = _root["menuEntry" + i].ancho;
_root["XMLbtn" + i]._height = _root["menuEntry" + i].alto;
//Our buttons need to link when pressed, to this end we need to make a note of their increment (i)
_root["XMLbtn" + i].incr = i;
_root["XMLbtn" + i].onRelease = function () {
//get _rootMenuEntry1 thru to the number of buttons we have...and check buttonLink
//which we assigned during parsing
getURL (_root["menuEntry" + this.incr].buttonLink, "_blank");
};
}
}

Y esto da como resultado diversos botones en el escenario, como veran desde el xml jala el ancho, alto, coordenadas en 'x' y 'y'. Esto es en caso de que sea necesario que cada boton sea diferente (como en mi caso).

Espero les sirva como ami...

Saludos!!!

Amed Rdz
6  Media / Diseño Gráfico / creacion dinamica de botones con flash en: 24 Julio 2006, 23:23 pm
Hola que tal,

Estoy haciendo un script que lee un archivo xml y por cada nodo crea un boton con las caracteristicas de sus atributos.

Hasta ahorita el script crea los botones, pero no logro hacer que cada boton tenga un link a cierta pagina dependiendo del valor de su nodo...

el codigo es sencillo, solo es de pegarlo en un frame:
Código:
myxml = new XML();
myxml.load("file.xml");
myxml.ignoreWhite = true;
// posicion de los botones en _y:
var ypos = 10;
// nivel en que se cargan:
var ins = 0;

// se crea una pelicula madre:
var container:MovieClip = this.createEmptyMovieClip("container", this.getNextHighestDepth());
// funcion que corre al cargar el archivo xml:
myxml.onLoad = function() {
// for que recorre la cantidad de nodos del archivo xml:
for (n=0; n<this.firstChild.childNodes.length; n++) {
ins += 1;
ypos += 25;
// por cada nodo se crea un boton:
var boton_:MovieClip = container.createEmptyMovieClip("boton_"+n, ins);
// dentro de cada boton se crea un textfield:
var texto:TextField = boton_.createTextField("texto"+n, 1, 100, ypos, 100, 20);
// cata textfield tiene el valor del atributo "id" de cada nodo:
texto.text = this.firstChild.childNodes[n].attributes.id;
// Estilos visuales de cada textfield:
texto.background = true;
texto.backgroundColor = 0x000000;
texto.textColor = 0xFFFFFF;
}
};

y el archivo xml es el sig:
Código:
<?xml version="1.0" standalone="yes" encoding="utf-8" ?>
<lotes>
<lote nombre="lote00" id="0" estatus="1"/>
<lote nombre="lote01" id="1" estatus="1"/>
<lote nombre="lote02" id="2" estatus="3"/>
<lote nombre="lote03" id="3" estatus="4"/>
</lotes>

Espero me puedan ayudar, se los agradecere mucho.

Gracias y Saludos!


perdon, se duplico el mensaje, este lo pueden borrar.
7  Media / Diseño Gráfico / Creacion dinamica de botones (FLASH) en: 24 Julio 2006, 23:16 pm
Hola que tal,

Estoy haciendo un script que lee un archivo xml y por cada nodo crea un boton con las caracteristicas de sus atributos.

Hasta ahorita el script crea los botones, pero no logro hacer que cada boton tenga un link a cierta pagina dependiendo del valor de su nodo...

el codigo es sencillo, solo es de pegarlo en un frame:
Código:
myxml = new XML();
myxml.load("file.xml");
myxml.ignoreWhite = true;
// posicion de los botones en _y:
var ypos = 10;
// nivel en que se cargan:
var ins = 0;

// se crea una pelicula madre:
var container:MovieClip = this.createEmptyMovieClip("container", this.getNextHighestDepth());
// funcion que corre al cargar el archivo xml:
myxml.onLoad = function() {
// for que recorre la cantidad de nodos del archivo xml:
for (n=0; n<this.firstChild.childNodes.length; n++) {
ins += 1;
ypos += 25;
// por cada nodo se crea un boton:
var boton_:MovieClip = container.createEmptyMovieClip("boton_"+n, ins);
// dentro de cada boton se crea un textfield:
var texto:TextField = boton_.createTextField("texto"+n, 1, 100, ypos, 100, 20);
// cata textfield tiene el valor del atributo "id" de cada nodo:
texto.text = this.firstChild.childNodes[n].attributes.id;
// Estilos visuales de cada textfield:
texto.background = true;
texto.backgroundColor = 0x000000;
texto.textColor = 0xFFFFFF;
}
};

y el archivo xml es el sig:
Código:
<?xml version="1.0" standalone="yes" encoding="utf-8" ?>
<lotes>
<lote nombre="lote00" id="0" estatus="1"/>
<lote nombre="lote01" id="1" estatus="1"/>
<lote nombre="lote02" id="2" estatus="3"/>
<lote nombre="lote03" id="3" estatus="4"/>
</lotes>

Espero me puedan ayudar, se los agradecere mucho.

Gracias y Saludos!
8  Media / Diseño Gráfico / Re: SOCORRO!! en: 16 Enero 2005, 14:34 pm
pues si, la manera mas comun de hacer la estructura de una pagina web es con tablas, al principio son tediosas pero pues despues te acostumbras y te ayudan en mucho, mantienen de una forma ordenada todos los elementos.

esta la etiqueta <table> seguida de una etiqueta <tr> que vienen siendo las filas (horizontal) , despues viene <td>.

las etiquetas <td> son para lo que tu dices de poner dos cosas en una misma linea <td> cosa 1 </td><td> cosa 2 </td>.  ;)

aqui te dejo un manual completo
http://www.htmlweb.net/manual/tablas/tablas_1.html
9  Media / Diseño Gráfico / Re: no se como hacer una cosa que debe ser sencilla en flash en: 14 Enero 2005, 16:45 pm
mmm entonces lo primero que debes hacer es leer un manual como este http://www.webestilo.com/flash/  ;)
10  Media / Diseño Gráfico / Re: Desprotejer .SWF en: 6 Enero 2005, 05:46 am
Lo dificil del Sothink SWF Decompiler, es encontrar el crack, yo durante un tiempo lo andube buscando pero nada, solo hay una version que es un poco vieja "ripped by fosi", aunke no te pasa el SWF a FLA, solo te exporta los frames, sonidos, etc.  :o
Páginas: [1] 2 3 4
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines