Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Otros entornos y lenguajes > C++ Builder
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 24-09-2004
BuilderSystems BuilderSystems is offline
Registrado
 
Registrado: sep 2004
Posts: 4
Poder: 0
BuilderSystems Va por buen camino
Question Como Insertar Flash en Builder C++ 4.0

como hago para implementar una animacion de flash en builder c++ 4.0..
que libreria tengo que declarar para poder utilizar estas animaciones
Responder Con Cita
  #2  
Antiguo 27-09-2004
Avatar de barman
barman barman is offline
Miembro
 
Registrado: may 2003
Posts: 139
Poder: 21
barman Va por buen camino
Tendrias que instalar unos componentes .OCX que econtraras en la web de macromedia, ahora reproducir un archivo flash es facilito, pero como quieras interactuar builder con flash es maj bien jodidito, me refiero a menus flash, botones, etc.
Responder Con Cita
  #3  
Antiguo 27-09-2004
BuilderSystems BuilderSystems is offline
Registrado
 
Registrado: sep 2004
Posts: 4
Poder: 0
BuilderSystems Va por buen camino
Gracias

Cita:
Empezado por barman
Tendrias que instalar unos componentes .OCX que econtraras en la web de macromedia, ahora reproducir un archivo flash es facilito, pero como quieras interactuar builder con flash es maj bien jodidito, me refiero a menus flash, botones, etc.
gracias por responder..
ahora mi pregunta es ...
estos conponentes queme mencionas son para reproducir en flash , osea queno tiene nada que ver con el builder cierto...?
pero estos me sirven para poder hacer mejores mis animaciones..
creo que para que me entiendas mejor te voy a decir que es lo que voy a hacer..
me toca hacer un packman..pero no congalletas si no con fantasmas que persiguen a este..no se si me hago entender..
cualquiera cosa me escribes....
Responder Con Cita
  #4  
Antiguo 28-09-2004
Avatar de barman
barman barman is offline
Miembro
 
Registrado: may 2003
Posts: 139
Poder: 21
barman Va por buen camino
Pues si lo haces con builder aqui va un ejemplo que rula en internet desde hace tiempo

Solo hay que poner 1 TTimer y 2 TImage...

Código:
void __fastcall TForm1::FormCreate(TObject *Sender)
{
Timer1->Enabled = false;
DoubleBuffered = true;

Form1->Caption = "GAME";
Form1->ClientWidth = 200;
Form1->ClientHeight = 200;
Form1->BorderStyle = bsDialog;
Form1->Position = poDesktopCenter;

Image1->Top = 0;
Image1->Left = 0;
Image1->Width = 200;
Image1->Height= 200;
Image1->Visible = false;

Image2->Top = 0;
Image2->Left = 0;
Image2->Width = 200;
Image2->Height= 200;


jx = 100;
jy = 175;
sf = 0;
ef = 1;
ex = 100;
ey = 15;
eh = 0;
score = 0;
miss = 0;


Image1->Canvas->Brush->Color = clBlack;
Image1->Canvas->FillRect( Rect( 0, 0, 200,200) );

Timer1->Interval = 45;
Timer1->Enabled = true;



}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormKeyDown(TObject *Sender, WORD &Key,
TShiftState Shift)
{
switch ( Key )
{
case VK_SPACE: KS = 1;
break;
case VK_LEFT : K4 = 1;
break;
case VK_RIGHT: K6 = 1;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormKeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
switch ( Key )
{
case VK_SPACE: KS = 0;
break;
case VK_LEFT : K4 = 0;
break;
case VK_RIGHT: K6 = 0;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{

Image1->Canvas->FillRect( Rect( 0, 0, 200, 200 ) );


Image1->Canvas->Font->Size = 11;
Image1->Canvas->Font->Color = clSilver;
Image1->Canvas->TextOut( 20, 1, "Score" );
Image1->Canvas->TextOut( 132, 1, "Miss" );

Image1->Canvas->Font->Color = clFuchsia;
Image1->Canvas->TextOut( 66, 1, IntToStr( score ) );
Image1->Canvas->TextOut( 175, 1, IntToStr( miss ) );

Image1->Canvas->Font->Size = 16;

if ( miss > 2 ) {
Image1->Canvas->Font->Color = clYellow;
Image1->Canvas->TextOut( 50, 100, "Game Over" );
Timer1->Enabled = false;
}

if ( K4 == 1 ) {
if ( jx > 10 ) jx -= 5;
}
if ( K6 == 1 ) {
if ( jx < 185 ) jx += 5;
}

Image1->Canvas->Font->Color = clAqua;
Image1->Canvas->TextOut( jx-9, jy, "<>" );


if ( sf == 0 && KS == 1 ) {
sf = 1;
sx = jx;
sy = jy-5;
}

if ( sf == 1 ) {
sy -= 6;
Image1->Canvas->Font->Color = clYellow;
Image1->Canvas->TextOut( sx-9, sy, "¨" );

if ( (ex-sx) > -26 && (ex-sx) < 23 ) {
if ( (ey-sy) > -13 && (ey-sy) < 13 ) {
ef = 2;
sf = 0;
score += 10;
}
}

if ( sy < -10 ) {
++miss;
sf = 0;
}
}

if ( ef == 1 ) {
if ( eh == 0 ) {
ex -= 4;
if ( ex < 22 ) eh = 1;
} else {
ex += 4;
if ( ex > 195 ) eh = 0;
}
}


if ( ef == 1 ) {
Image1->Canvas->Font->Color = clRed;
Image1->Canvas->TextOut( ex-19, ey, "oo" );
} else {
Image1->Canvas->Font->Color = clYellow;
if ( ef%2 == 0 ) {
Image1->Canvas->TextOut( ex-19, ey, "oo" );
} else {
Image1->Canvas->TextOut( ex-19, ey, "oo" );
}
if ( ++ef > 20 ) ef = 0;
}

if ( ef == 0 ) {
ex = 100;
eh = random(2);
}
Image2->Canvas->CopyRect( Image2->Canvas->ClipRect,
Image1->Canvas, Image2->Canvas->ClipRect);
}
//---------------------------------------------------------------------------


class TForm1 : public TForm
{
__published: // IDE-managed Components
TImage *Image1;
TImage *Image2;
TTimer *Timer1;
void __fastcall FormCreate(TObject *Sender);
void __fastcall FormKeyDown(TObject *Sender, WORD &Key,
TShiftState Shift);
void __fastcall FormKeyUp(TObject *Sender, WORD &Key,
TShiftState Shift);
void __fastcall Timer1Timer(TObject *Sender);
private: // User declarations

int jx, jy;
int sx, sy;
int ex, ey;

int sf;
int ef;
int eh;

int score;
int miss;

int K4, K6, KS;

public: // User declarations
__fastcall TForm1(TComponent* Owner);
};

// y ya esta
Responder Con Cita
  #5  
Antiguo 29-09-2004
BuilderSystems BuilderSystems is offline
Registrado
 
Registrado: sep 2004
Posts: 4
Poder: 0
BuilderSystems Va por buen camino
Primero Dejame Darte Las Gracias Por Poder Ayudarme...
Pero Si Te Doy Todo Por Partes Depronto No Puedas Entender Lo Que Voy A Hacer..
No Se Si De Alguna Forma Te Puedo Hacer Llegar El Documento En El Que Me Dicen Todas Las Especificaciones Para Hacer El Programa..
No Se Si Para La Proxima Vez Que Entres Me Dejes Tu E-mail..para Poder Enviartelo..
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 21:36:15.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi