SlideShare a Scribd company logo
1 of 18
Funciones
Ejemplo 1
function ContarHastaDiez():void{
for (var 1=0;1<10;1++){
trace (i);
}
}
Ejercicio 2
var nombre:String="aejandro";
var apellido:String="gomez";
function nombreCompleto() : String{
if(!nombre ||!apellido){
return ""; }
var miNombre:String=nombre+" "+apellido;
return miNombre;
}
var usuario :String=nombreCompleto();
trace (usuario);
Crear graficos en flash por medio de código
this.graphics.lineStyle(6,0x00ff99);
this.graphics.moveTo(200,100);
this.graphics.lineTo(300,250)
this.graphics.lineStyle(5,0x3456ff559);
this.graphics.curveTo(100,100,30,200);
this.graphics.lineStyle(6,0x00ff99);
this.graphics.moveTo(200,100);
this.graphics.lineTo(300,250)
this.graphics.lineStyle(5,0x3456ff559);
this.graphics.curveTo(00,350,30,200);
this.graphics.drawRect(300,30,60,90);
this.graphics.drawCircle(350,260,70);
this.graphics.beginFill(0x000030);
this.graphics.drawEllipse(360,100,100,30)
this.graphics.endFill();
this.graphics.drawCircle(150,260,70);
Texto en flas
import flash.text.TextField;
var texto:TextField=new TextField();
texto.text="aqui tenemos un ejemplo de como emplear texto con codigo en flash";
texto.x=120;
texto.y=200;
texto.width=350;
addChild(texto);
import flash.text.TextField;
var miFormato:TextFormat=new TextFormat();
miFormato.bold=true;
miFormato.font="arial";
miFormato.size=30;
miFormato.color=0x000ab;
var texto:TextField=new TextField();
texto.text="te quieroo muchop ";
texto.x=50;
texto.y=50;
texto.width=350;
texto.border=true
texto.setTextFormat(miFormato);
addChild(texto);
crear hipervinculos
import flash.text.TextField;
var miEnlaceWeb:TextField=new TextField();
miEnlaceWeb.htmlText="visita a <A HREF='http://www.iemoraosejo.edu.co'>luis eduardo mora osejo";
miEnlaceWeb.width=260;
addChild (miEnlaceWeb)
import flash.text.StyleSheet;
var hojita:StyleSheet=new StyleSheet();
hojita.setStyle("A",{(textDecoration:"underline",color:"#0000ff"
var miEnlaceWeb:TextField=new TextField();
miEnlaceWeb.styleSheet=hojita;
crear sprite
import flash.display.Sprite;
var spritel:Sprite=new Sprite();
spritel.graphics.lineStyle(6,0xff9900);
spritel.graphics.drawRect(0,0,250,250);
addChild(spritel);
import flash.display.Sprite;
var spritel:Sprite=new Sprite();
spritel.graphics.lineStyle(6,0xff9900);
spritel.graphics.drawRect(0,0,250,250);
spritel.graphics.beginFill(0x000099);
addChild(spritel);
spritel.x=50;
spritel.y=50;
var sprite2:Sprite=new Sprite();
sprite2.graphics.lineStyle(6,0xff9900);
sprite2.graphics.beginFill(0x000030);
sprite2.graphics.drawRect(0,0,250,250);
spritel.x=350;
spritel.y=50;
addChild(sprite2);
var sprite3:Sprite=new Sprite();
sprite3.graphics.lineStyle(2,0xfffff);
sprite3.graphics.beginFill(0xcccc00);
sprite3.graphics.drawCircle(0,0,25);
spritel.x=125;
spritel.y=125;
addChild(sprite3);
al dar clic
var sprite3:Sprite=new Sprite();
sprite3.graphics.lineStyle(2,0xfffff);
sprite3.graphics.beginFill(0xcccc00);
sprite3.graphics.drawCircle(0,0,25);
spritel.x=125;
spritel.y=125;
addChild(sprite3);
sprite1.addEventListener(MouseEvent.CLICK,p
ulsarsprite);
sprite2.addEventListener(MouseEvent.CLICK,p
ulsarsprite);
function pulsarsprite(Event:MouseEvent){
event.currentTarget.addChild(sprite3
);
}

More Related Content

What's hot

openFrameworks 外部ファイルを利用する - 画像、動画 - 多摩美メディアアートII
openFrameworks 外部ファイルを利用する - 画像、動画 - 多摩美メディアアートIIopenFrameworks 外部ファイルを利用する - 画像、動画 - 多摩美メディアアートII
openFrameworks 外部ファイルを利用する - 画像、動画 - 多摩美メディアアートIIAtsushi Tadokoro
 
[ShaderX5] 4.4 Edge Masking and Per-Texel Depth Extent Propagation For Compu...
[ShaderX5] 4.4 Edge Masking and Per-Texel Depth Extent Propagation For Compu...[ShaderX5] 4.4 Edge Masking and Per-Texel Depth Extent Propagation For Compu...
[ShaderX5] 4.4 Edge Masking and Per-Texel Depth Extent Propagation For Compu...guest4db8b3b3
 
openFrameworks addonを利用する ofxControlPanel ofxOpenCv - 多摩美メディアアートII
openFrameworks addonを利用する ofxControlPanel ofxOpenCv - 多摩美メディアアートIIopenFrameworks addonを利用する ofxControlPanel ofxOpenCv - 多摩美メディアアートII
openFrameworks addonを利用する ofxControlPanel ofxOpenCv - 多摩美メディアアートIIAtsushi Tadokoro
 
ບົດລາຍງານ Honda gl09
ບົດລາຍງານ Honda gl09ບົດລາຍງານ Honda gl09
ບົດລາຍງານ Honda gl09kesukei
 
Javascript i wydajność - czy to się spina?
Javascript i wydajność - czy to się spina?Javascript i wydajność - czy to się spina?
Javascript i wydajność - czy to się spina?Michał Kostrzyński
 
contoh Program C++ tentang fungsi for
contoh Program C++ tentang fungsi forcontoh Program C++ tentang fungsi for
contoh Program C++ tentang fungsi forM Fahmi Ansori
 
Pruebabfs
PruebabfsPruebabfs
PruebabfsJorge
 
openFrameworks基礎 動きを生みだす、アニメーション入門 - 芸大グラフィックスプログラミング演習B
openFrameworks基礎 動きを生みだす、アニメーション入門 - 芸大グラフィックスプログラミング演習BopenFrameworks基礎 動きを生みだす、アニメーション入門 - 芸大グラフィックスプログラミング演習B
openFrameworks基礎 動きを生みだす、アニメーション入門 - 芸大グラフィックスプログラミング演習BAtsushi Tadokoro
 
Vatesh
VateshVatesh
Vateshvatesh
 
openFrameworks 動きを生みだす様々なアルゴリズム - 多摩美メディアアートII
openFrameworks 動きを生みだす様々なアルゴリズム - 多摩美メディアアートIIopenFrameworks 動きを生みだす様々なアルゴリズム - 多摩美メディアアートII
openFrameworks 動きを生みだす様々なアルゴリズム - 多摩美メディアアートIIAtsushi Tadokoro
 
Pendekatan Inversi Linier dengan Matriks Jacobi pada Kasus Perhitungan Hipose...
Pendekatan Inversi Linier dengan Matriks Jacobi pada Kasus Perhitungan Hipose...Pendekatan Inversi Linier dengan Matriks Jacobi pada Kasus Perhitungan Hipose...
Pendekatan Inversi Linier dengan Matriks Jacobi pada Kasus Perhitungan Hipose...Fajar Perdana
 

What's hot (20)

Include
IncludeInclude
Include
 
HTML5 Live
HTML5 LiveHTML5 Live
HTML5 Live
 
openFrameworks 外部ファイルを利用する - 画像、動画 - 多摩美メディアアートII
openFrameworks 外部ファイルを利用する - 画像、動画 - 多摩美メディアアートIIopenFrameworks 外部ファイルを利用する - 画像、動画 - 多摩美メディアアートII
openFrameworks 外部ファイルを利用する - 画像、動画 - 多摩美メディアアートII
 
[ShaderX5] 4.4 Edge Masking and Per-Texel Depth Extent Propagation For Compu...
[ShaderX5] 4.4 Edge Masking and Per-Texel Depth Extent Propagation For Compu...[ShaderX5] 4.4 Edge Masking and Per-Texel Depth Extent Propagation For Compu...
[ShaderX5] 4.4 Edge Masking and Per-Texel Depth Extent Propagation For Compu...
 
Excerpt
ExcerptExcerpt
Excerpt
 
Excerpt
ExcerptExcerpt
Excerpt
 
openFrameworks addonを利用する ofxControlPanel ofxOpenCv - 多摩美メディアアートII
openFrameworks addonを利用する ofxControlPanel ofxOpenCv - 多摩美メディアアートIIopenFrameworks addonを利用する ofxControlPanel ofxOpenCv - 多摩美メディアアートII
openFrameworks addonを利用する ofxControlPanel ofxOpenCv - 多摩美メディアアートII
 
ບົດລາຍງານ Honda gl09
ບົດລາຍງານ Honda gl09ບົດລາຍງານ Honda gl09
ບົດລາຍງານ Honda gl09
 
Javascript i wydajność - czy to się spina?
Javascript i wydajność - czy to się spina?Javascript i wydajność - czy to się spina?
Javascript i wydajność - czy to się spina?
 
contoh Program C++ tentang fungsi for
contoh Program C++ tentang fungsi forcontoh Program C++ tentang fungsi for
contoh Program C++ tentang fungsi for
 
Pruebabfs
PruebabfsPruebabfs
Pruebabfs
 
openFrameworks基礎 動きを生みだす、アニメーション入門 - 芸大グラフィックスプログラミング演習B
openFrameworks基礎 動きを生みだす、アニメーション入門 - 芸大グラフィックスプログラミング演習BopenFrameworks基礎 動きを生みだす、アニメーション入門 - 芸大グラフィックスプログラミング演習B
openFrameworks基礎 動きを生みだす、アニメーション入門 - 芸大グラフィックスプログラミング演習B
 
Vatesh
VateshVatesh
Vatesh
 
Programs
ProgramsPrograms
Programs
 
openFrameworks 動きを生みだす様々なアルゴリズム - 多摩美メディアアートII
openFrameworks 動きを生みだす様々なアルゴリズム - 多摩美メディアアートIIopenFrameworks 動きを生みだす様々なアルゴリズム - 多摩美メディアアートII
openFrameworks 動きを生みだす様々なアルゴリズム - 多摩美メディアアートII
 
Scanfill polygon
Scanfill polygonScanfill polygon
Scanfill polygon
 
Los fantastico
Los fantasticoLos fantastico
Los fantastico
 
vecotores programacion
vecotores programacionvecotores programacion
vecotores programacion
 
Pendekatan Inversi Linier dengan Matriks Jacobi pada Kasus Perhitungan Hipose...
Pendekatan Inversi Linier dengan Matriks Jacobi pada Kasus Perhitungan Hipose...Pendekatan Inversi Linier dengan Matriks Jacobi pada Kasus Perhitungan Hipose...
Pendekatan Inversi Linier dengan Matriks Jacobi pada Kasus Perhitungan Hipose...
 
Practica de matlab
Practica de matlabPractica de matlab
Practica de matlab
 

Viewers also liked

Viewers also liked (17)

Decision points
Decision pointsDecision points
Decision points
 
Thinkaloud
ThinkaloudThinkaloud
Thinkaloud
 
Blue cafe
Blue cafeBlue cafe
Blue cafe
 
Yes we can
Yes we canYes we can
Yes we can
 
Html
HtmlHtml
Html
 
Decision points
Decision pointsDecision points
Decision points
 
Digital Divide
Digital DivideDigital Divide
Digital Divide
 
Influences of media in education
Influences of media in educationInfluences of media in education
Influences of media in education
 
Muse e brochure
Muse e brochure Muse e brochure
Muse e brochure
 
Learning theories
Learning theoriesLearning theories
Learning theories
 
Genética
GenéticaGenética
Genética
 
Edtech101 syllabus
Edtech101 syllabusEdtech101 syllabus
Edtech101 syllabus
 
Educational Technology
Educational TechnologyEducational Technology
Educational Technology
 
Focul sacru
Focul sacruFocul sacru
Focul sacru
 
Fundatia focul sacru prezentare
Fundatia focul sacru prezentare Fundatia focul sacru prezentare
Fundatia focul sacru prezentare
 
Excellent news 10
Excellent news 10Excellent news 10
Excellent news 10
 
Presentation1
Presentation1Presentation1
Presentation1
 

More from Alejandro Gomez (20)

Como aplicar movimientos predefinidos fl
Como aplicar movimientos predefinidos flComo aplicar movimientos predefinidos fl
Como aplicar movimientos predefinidos fl
 
Como aplicar movimientros predefinidos
Como aplicar movimientros predefinidosComo aplicar movimientros predefinidos
Como aplicar movimientros predefinidos
 
Importacion a flash
Importacion a flashImportacion a flash
Importacion a flash
 
Desmontaje de una pc
Desmontaje de una pcDesmontaje de una pc
Desmontaje de una pc
 
Mantenimientodelcomputador
MantenimientodelcomputadorMantenimientodelcomputador
Mantenimientodelcomputador
 
Maquetacion de pagina web
Maquetacion de pagina webMaquetacion de pagina web
Maquetacion de pagina web
 
Objetos
ObjetosObjetos
Objetos
 
Noctuno
NoctunoNoctuno
Noctuno
 
Puertos alejandro
Puertos alejandroPuertos alejandro
Puertos alejandro
 
Php 3
Php 3Php 3
Php 3
 
Ventanas
VentanasVentanas
Ventanas
 
Botando
BotandoBotando
Botando
 
Flash
FlashFlash
Flash
 
Flash
FlashFlash
Flash
 
Flash
FlashFlash
Flash
 
Php
PhpPhp
Php
 
Microprocesadores
MicroprocesadoresMicroprocesadores
Microprocesadores
 
Paisaje urbano
Paisaje urbanoPaisaje urbano
Paisaje urbano
 
Programacion
ProgramacionProgramacion
Programacion
 
Tarjetas pdf
Tarjetas pdfTarjetas pdf
Tarjetas pdf
 

Alejandro