segunda-feira, 14 de janeiro de 2008

Como carregar textos de um arquivo TXT

Bom, esse tutorial, feito para estudo, e adaptado para o Português brasileiro, pois afinal a fonte original é de um site Português. http://www.efeitosvisuais.com/

Lembrando que até mesmo um criança de 3 anos de idade pode seguir este tuto.

Pois bem, muitas vezes é preciso manipular uma grande quantidade de textos no flash. De início, nosso ideia é inserir esses texto diretamente nos filmes.Entretanto, se fizermos isso causaremos alguns problemas como:
  • o aumento do tamanho do arquivo do filme;
  • o aumento do tempo de carregamento do filme via Web;
  • o aumento da complexidade de manutenção do filme, caso seja preciso modificar algo nos textos.
Para evitar esses problemas, a melhor maneira é a de inserir os textos num arquivo TXT, à parte, e carregá-los à partir do filme Flash.

Para conseguir fazer isso, teremos de utilizar a função LoadVariables, da linguagem ActionScript do Flash

1- Em primeiro lugar, abra o Flash e pressione as teclas Command N (Mac) ou Ctrl N (Windows), para criar um novo filme no Flash e poder começar a trabalhar.

2- Pressione a tecla T no teclado, para activar a ferramenta de textos. Em seguida, vá à janela de propriedades (veja a figura seguinte) e ajuste o primeiro campo para DYNAMIC TEXT (texto dinâmico) e, na terceira linha, o primeiro campo para Multiline:

Explicação:

Dynamic Text - Porque será um texto dinâmico (texto de um ficheiro externo).
Multiline - Porque o texto terá varias linhas. Se tivesse uma única linha poderia ser Single line.

NOTA: Se a janela de propriedades (Properties) não estiver visível, vá ao menu Window e certifique-se de que Properties está activo.

3- Agora que já configurou a ferramenta texto, clique na área de trabalho e, com o botão pressionado, arraste a ferramenta para o lado oposto, de forma a desenhar um rectângulo, como mostramos na figura seguinte:

4- Depois de criar a caixa de texto, vá à janela de propriedades e mude o campo Var (variável) para teste. Esta operação dará um nome à caixa de textos, a ser usado, posteriormente, para manipular o seu conteúdo. Veja a figura seguinte:

5- Agora terá que criar o seu arquivo TXT. No caso, gravei o arquivo com o nome de tutorial.txt. Na figura a seguinte, mostro de que forma o texto ficou.


NOTAS:

  1. Ao criar o seu texto, deve colocar, no início, o nome da variável de textos do seu filme, no nosso caso, teste, seguida do sinal de igual, ou seja, “teste=”, conforme indicado na figura anterior;
  2. Poderá usar códigos HTML. Entretanto, deverá estar ciente de que nem todo tag HTML funciona no Flash;

6- Depois disso, grave o ficheiro TXT no mesmo directório em que vai gravar ficheiro do filme (SWF) e volte ao Flash;7- Và ao Timeline (linha do tempo), clique no frame em que encontra-se a caixa de textos e, na janela Actions, digite o seguinte texto:

loadVariablesNum(”tutorial.txt”,0);

NOTAS:

  1. Se a janela Actions não estiver visível, vá ao menu Window e certifique-se de que a opção Actions está activa;
  2. Poderá carregar textos de sites, de qualquer endereço, bastando que troque “tutorial.txt” pela URL onde texto está localizado, como, por exemplo, http://euronets.com.br/meu_texto.txt

7- Pronto! Basta ir agora ao menu Control e escolher Test Movie, para ver o resultado.

Lembrando que este tutorial não é de minha autoria, o verdadeiro autor envio para o site mencionado acima, seu nome é Cleibson Almeida.

O importante é o estudo, agora vamos brincar um pouco e testar quais código html funciona no flash... :D hehehe

25 comentários:

Mokitty disse...

Oh! É só programação...
xDDD

Sono disse...

Manow....
sem palavras

Kyamel disse...

Meu Deus.....mas que blog TECNICO!!!!!!!!!
Muito bem, até eu que não entendo nadinha de programação quase entendi!!!
Rssrsrsrsrs.............
Brincadeirinha.........
Só passei para dar um oi....
Então:
- Oiiiiiiiiiiiiiiiiiii.............
Bjossss............

Anônimo disse...

benefit emory medical [url=http://usadrugstoretoday.com/products/minocycline.htm]minocycline[/url] medical word definition http://usadrugstoretoday.com/catalogue/q.htm guinea worm infection http://usadrugstoretoday.com/products/noroxin.htm
winter depression full spectrum light [url=http://usadrugstoretoday.com/products/cozaar.htm]cozaar[/url] male enhancement erection [url=http://usadrugstoretoday.com/catalogue/f.htm]sleeping barber threads solution[/url]

Anônimo disse...

free online diabetic daily menus [url=http://usadrugstoretoday.com/categories/anti-diabetici.htm]anti diabetici[/url] blood pressure biofeedback http://usadrugstoretoday.com/products/bactrim.htm sinus herpes http://usadrugstoretoday.com/index.php?lng=en&cv=us
nonesuchfuz my cup of tea [url=http://usadrugstoretoday.com/products/fludac.htm]fludac[/url] how to get gum off skin [url=http://usadrugstoretoday.com/products/symmetrel.htm]himalayan health exchange[/url]

Anônimo disse...

sybian orgasm [url=http://usadrugstoretoday.com/categories/erezione-pack.htm]erezione pack[/url] medical esthetics schools http://usadrugstoretoday.com/products/kamagra.htm dermalogica professional stress relief oil http://usadrugstoretoday.com/products/beconase-aq.htm
bipolar caused mineral vitimin deficency [url=http://usadrugstoretoday.com/categories/controllo-delle-nascite.htm]controllo delle nascite[/url] ridgeview medical center [url=http://usadrugstoretoday.com/products/indocin.htm]healthy diet habits[/url]

Anônimo disse...

blueberry smoothie diabetic [url=http://usadrugstoretoday.com/products/levitra-professional.htm]levitra professional[/url] medford pot smoking http://usadrugstoretoday.com/products/plan-b.htm bodybuliding diet http://usadrugstoretoday.com/products/betapace.htm
wv rural and frontier medical services [url=http://usadrugstoretoday.com/products/kamasutra-longlast-condoms.htm]kamasutra longlast condoms[/url] apply for dental positions [url=http://usadrugstoretoday.com/products/septilin.htm]ingredents in vitamin water[/url]

Anônimo disse...

oil in turbo problems volkswagen http://autoexpress.in/romeo/alfa/romeo/pillar/trim soft covers for small pickups dodge dakota
[url=http://autoexpress.in/radiator/plastic/radiator/repair]automobile parts german[/url] mercedes 500s [url=http://autoexpress.in/cadillac/trouble/codes/for/cadillac]trouble codes for cadillac[/url]
medical auto clave operation http://autoexpress.in/romeo/alfa/romeo/giulia/ti/super
[url=http://autoexpress.in/plymouth/sweet/william/wheatcraft/susan/cole/plymouth]how do i buff an automobile[/url] mercedes leg stocking garter [url=http://autoexpress.in/opel/opel/deisel/130/mpg/140/mph]opel deisel 130 mpg 140 mph[/url]
automobile inspections http://autoexpress.in/scooter/large/volume/scooter/dealer
[url=http://autoexpress.in/saleen/ford/dealer/saleen/mustang]holiday celebration virgen de mercedes nicaragua[/url] all star auto electric [url=http://autoexpress.in/romeo/alfa/romeo/giulia/ti/super]alfa romeo giulia ti super[/url]

Anônimo disse...

best travel affiliate http://adventurecollection.in/flight/flight-numbers-twin-towers bel air travel toronto world cruise
[url=http://adventurecollection.in/expedia/expedia-brueau]honduras travel visa for canadians[/url] a sound of thunder time travel [url=http://adventurecollection.in/vacation-packages/caribbean-package-scuba-vacation]caribbean package scuba vacation[/url]
digital travel radio http://adventurecollection.in/cruises
[url=http://adventurecollection.in/lufthansa/seat-configuration-for-boeing-737-500]kota kinabalu travel[/url] yucatan escorted travel [url=http://adventurecollection.in/maps/road-angel-maps-of-france-for-the-navigator-7000]road angel maps of france for the navigator 7000[/url]
largest travel trailer towed by an escalade http://adventurecollection.in/disneyland/hong-kong-disneyland-map jerome travel grant [url=http://adventurecollection.in/expedia/expedia-brueau]expedia brueau[/url]

Anônimo disse...

hentai japanese words http://pornrapidshare.in/pre-teen/free-teen-xxx-porn-movies
[url=http://pornrapidshare.in/vagina/new-vagina]amateur mude male photo shoot[/url] metal gear nomad hentai [url=http://pornrapidshare.in/tits-free/retro-tits]retro tits[/url]
virgin media itv on demand http://pornrapidshare.in/teen-chat/teen-babes-free
[url=http://pornrapidshare.in/live-xxx/girlfriend-xxx-at-home]porn 4 pods[/url] naruto hentai and dragon ball z [url=http://pornrapidshare.in/toons/evil-toons-vidcaps]evil toons vidcaps[/url]
amp adult http://pornrapidshare.in/teen-high/teen-statistics-for-use-of-inhalants
[url=http://pornrapidshare.in/teen-model/teen-brand-name-clothes-stores-online]hentai bloody pussy[/url] lubricant for carbon dioxide application [url=http://pornrapidshare.in/toons]toons[/url]
dildo sheath http://pornrapidshare.in/teen-model/dash-teen-nude
[url=http://pornrapidshare.in/for-teens/teens-and-science]girl next door hentai torrent[/url] pictures of adult austrailian terriers [url=http://pornrapidshare.in/defloration/defloration-girls]defloration girls[/url]

Anônimo disse...

taking clothes off http://www.thefashionhouse.us/?action=products&product_id=2214 skate shoes [url=http://www.thefashionhouse.us/women-casual-fall-spring-type3.html]the boston chanell[/url] wrestling shoes
http://www.thefashionhouse.us/52-gucci-size3.html ideology clothes [url=http://www.thefashionhouse.us/blue-white-men-color87.html]yogi casual clothes[/url]

Anônimo disse...

death rituals shoes http://luxefashion.us/52-sport-pants-size3.html womens puma shoes [url=http://luxefashion.us/women-dresses-type3.html]middle eastern fashion[/url] nero cover designer templates
http://luxefashion.us/casual-page12.html sperry boat shoes [url=http://luxefashion.us/dark-grey-polo-shirts-color16.html]indoor soccer shoes for wide feet[/url]

Anônimo disse...

free dog clothes pattern http://www.thefashionhouse.us/richmond-women-casual-tank-toptunic-black-item1736.html how to disinfect used clothes [url=http://www.thefashionhouse.us/pecci-casual-brand16.html]custom designer engagement ring[/url] gucci furniture
http://www.thefashionhouse.us/black-beige-color190.html dog clothes to sew [url=http://www.thefashionhouse.us/moncler-women-s-tops-brand113.html]healies shoes[/url]

Anônimo disse...

heart disease symptoms [url=http://usadrugstoretoday.com/products/zofran.htm]zofran[/url] prostate cancer cryo surgery http://usadrugstoretoday.com/products/buspar.htm
breast smother [url=http://usadrugstoretoday.com/categories/erection-paquetes.htm]erection paquetes[/url] medical breakthrough in 2007 [url=http://usadrugstoretoday.com/products/hyaluronic-acid.htm ]new techniques in breast reduction [/url] how long is a bull penis
mechanism of action of aspirin [url=http://usadrugstoretoday.com/products/minocycline.htm]minocycline[/url] health and fitness center at washtenaw community college http://usadrugstoretoday.com/products/nimotop.htm
diet options [url=http://usadrugstoretoday.com/products/nolvadex.htm]nolvadex[/url] leeches uses in the medical communtily [url=http://usadrugstoretoday.com/products/kamagra-oral-jelly.htm ]hotel near medical center in houston [/url] free female orgasm pics

Anônimo disse...

designer inspired purses http://luxefashion.us/women-apos-s-long-sleeve-tops-dolce-amp-gabbana-category21.html designer wallets [url=http://luxefashion.us/dark-grey-tracksuits-color16.html]camo clothes[/url] star shoes knife
http://luxefashion.us/roberto-cavalli-page2.html fort worth shoes [url=http://luxefashion.us/?action=products&product_id=1378]free dog clothes pattern[/url]

Anônimo disse...

http://xwv.in/kidney/kidney/burlington/nc
[url=http://xwv.in/lisinopril/dog/lisinopril]what is the drug maxalta[/url] plants used in drugs [url=http://xwv.in/lopressor/half/life/of/lopressor]half life of lopressor[/url]
canada health care founder tommy http://xwv.in/nervousness/how/to/prevent/nervousness
[url=http://xwv.in/lexapro/between/celexa/difference/lexapro]new york state health care pre existing condition rate[/url] drug court in maine [url=http://xwv.in/oxybutynin/oxybutynin/chloride/hyperhidrosis]oxybutynin chloride hyperhidrosis[/url]
peer support drugs http://xwv.in/pain-relief
[url=http://xwv.in/nervousness/doctors/treatments/for/anxiety/and/nervousness]kids drug free slogans[/url] designer drugs online [url=http://xwv.in/loratadine/loratadine/baikal/guide/shop]loratadine baikal guide shop[/url] michigan downriver for physical exam and drug testing for work [url=http://xwv.in/naltrexone/naltrexone/hcl/physicochemical/properties]naltrexone hcl physicochemical properties[/url]

Anônimo disse...

bingo blowers http://xwn.in/jokers_tattoes-of-jokers casino surveillance equipment
[url=http://xwn.in/online-casinos_face-recognition-casinos]bingo free cash bonus[/url] horse race betting system [url=http://xwn.in/blackjack_online-blackjack-secrets]online blackjack secrets[/url]
drag queen bingo fl http://xwn.in/online-casino_pennsylvania-casino-exile-lebanon
[url=http://xwn.in/joker_fatboy-slim-joker]nl lottery[/url] worley idaho casino [url=http://xwn.in/blackjack_blackjack-jobs-in-fargo]blackjack jobs in fargo[/url]
odds of winning lottery http://xwn.in/keno_play-3-6-9-video-keno-online-free nba betting lines [url=http://xwn.in/keno_lyrics-to-mothers-little-helper-rolling-stones-keno]lyrics to mothers little helper rolling stones keno[/url]

Anônimo disse...

clothes ripped off http://topcitystyle.com/dolce-amp-gabbana-page25.html lauren crane [url=http://topcitystyle.com/s-women-size10.html]gilda de laurentis[/url] cheap warm golf clothes
http://topcitystyle.com/g-star-hoodies-brand42.html designer inspired handbags [url=http://topcitystyle.com/takeshy-kurosawa-on-sale-brand9.html]lauren london wallpapers[/url]

Anônimo disse...

play for points and redeem for bingo bucks http://lwv.in/blackjack casino entertainment evenings
[url=http://lwv.in/joker/joker-marchant-2008-schedule]casino site thunder valley web[/url] ohio lottery winning [url=http://lwv.in/online-casino/lake-tahoe-casino-hyatt]lake tahoe casino hyatt[/url]
sports betting gambling sportbook http://lwv.in/lottery/wisconsin-state-lottery
[url=http://lwv.in/jokers/jokers-origins]bc cancer lottery[/url] top poker net casino [url=http://lwv.in/casino-playing-cards/bicycle-vintage-1800-playing-cards]bicycle vintage 1800 playing cards[/url]
keno grill http://lwv.in/jokers/paul-hardcastle-jokers-wild the best internet casinos [url=http://lwv.in/casino-playing-cards/how-to-make-a-wallet-out-of-playing-cards]how to make a wallet out of playing cards[/url]

Anônimo disse...

how to stage scenes in a movie [url=http://moviestrawberry.com/films/film_above_the_law/]above the law[/url] adult film movie database http://moviestrawberry.com/films/film_the_edge/ day after tomorrow movie review
skyscraper the movie [url=http://moviestrawberry.com/films/film_homeworld/]homeworld[/url] movie rocket science http://moviestrawberry.com/films/film_da_hip_hop_witch/ fathom movie
monster anal free movie [url=http://moviestrawberry.com/films/film_the_heroes_of_telemark/]the heroes of telemark[/url] howlers movie forum
costas zapas the last porn movie [url=http://moviestrawberry.com/films/film_never_say_never_again/]never say never again[/url] latter days movie soundtrack lyrics http://moviestrawberry.com/films/film_transamerica/ lactating porn movie clips
movie wolf girl [url=http://moviestrawberry.com/films/film_the_beach/]the beach[/url] corpus christi movie http://moviestrawberry.com/films/film_hellraiser/ introduction of movie i know what you did last summer

Anônimo disse...

mp3 movie theme songs [url=http://moviestrawberry.com/films/film_delgo/]delgo[/url] risk movie http://moviestrawberry.com/films/film_best_boy/ grease the movie themed party supplies
movie goofs [url=http://moviestrawberry.com/films/film_a_free_soul/]a free soul[/url] steps to take to start in the movie production industrie http://moviestrawberry.com/films/film_the_ape_man/ movie monster adult
famous movie line trivia [url=http://moviestrawberry.com/films/film_cocaine_cowboys_ii_hustlin_with_the_godmother/]cocaine cowboys ii hustlin with the godmother[/url] the movie hairspray 64068
movie about gustafson [url=http://moviestrawberry.com/films/film_the_fox_hunt/]the fox hunt[/url] free movie clips fucking http://moviestrawberry.com/easy-downloads/letter_B/?page=14 the quiet man movie review
tinkerbell movie [url=http://moviestrawberry.com/films/film_a_thousand_acres/]a thousand acres[/url] brad pitt in the new movie jesse james http://moviestrawberry.com/films/film_housesitter/ the cast of movie the saw

Anônimo disse...

movie galley st cloud [url=http://moviestrawberry.com/films/film_pinks_all_out/]pinks all out[/url] movie star jane wyatt http://moviestrawberry.com/films/film_faster_pussycat_kill_kill/ nuclear bomb explodes in movie
phantoms movie novel [url=http://moviestrawberry.com/films/film_billy_elliot/]billy elliot[/url] top cougar movie http://moviestrawberry.com/films/film_these_old_broads/ sky movie cinimas
spring break the movie [url=http://moviestrawberry.com/films/film_the_dead_pit/]the dead pit[/url] movie star website
the movie clockstoppers [url=http://moviestrawberry.com/films/film_gaslight/]gaslight[/url] floor 29 movie http://moviestrawberry.com/films/film_newcastle/ mountaineering movie downloads
movie idioms [url=http://moviestrawberry.com/films/film_young_single_angry/]young single angry[/url] stargate movie anubis warrior http://moviestrawberry.com/hqmoviesbygenres/download-genre_mystery-movies/?page=18 gina wild free movie

Anônimo disse...

simgirl end movie [url=http://moviestrawberry.com/films/film_the_business/]the business[/url] footloose movie watch online http://moviestrawberry.com/films/film_the_hills_have_eyes_70/ my left foot movie
fuck movie trailers [url=http://moviestrawberry.com/films/film_what_lies_beneath/]what lies beneath[/url] british movie about men stripping http://moviestrawberry.com/hqmoviesbygenres/download-genre_documentary-movies/?page=8 happy years movie eater
si fi movie lists [url=http://moviestrawberry.com/films/film_carnival_boat/]carnival boat[/url] upcoming film the bee movie
free big tits movie clips [url=http://moviestrawberry.com/films/film_jeff_dunham_s_very_special_christmas_special/]jeff dunham s very special christmas special[/url] wach the fullmetal alchemist movie for free http://moviestrawberry.com/films/film_tron/ beverly hillbillies movie
vacancy movie [url=http://moviestrawberry.com/films/film_the_hit_70/]the hit 70[/url] star trek 6 movie http://moviestrawberry.com/films/film_a_woman_of_substance/ free willy movie

Anônimo disse...

free slut movie [url=http://moviestrawberry.com/films/film_waking_up_in_reno/]waking up in reno[/url] in too deep movie preview http://moviestrawberry.com/films/film_the_curse_of_el_charro/ louie malle movie photos
mr bean movie soundtrack [url=http://moviestrawberry.com/films/film_spectacular/]spectacular[/url] movie review updog http://moviestrawberry.com/hqmoviesbycountry/country_usa/?page=40 sophy james bond movie actress
movie criticism [url=http://moviestrawberry.com/films/film_wasabi/]wasabi[/url] soroity secrets 8 movie
fre teen porn movie thumbs [url=http://moviestrawberry.com/films/film_bleach/]bleach[/url] disturbia full movie free download http://moviestrawberry.com/films/film_grin_and_bear_it/ gallatin tn movie theater
gagged movie stars [url=http://moviestrawberry.com/films/film_dark_reel/]dark reel[/url] wind chill movie review http://moviestrawberry.com/easy-downloads/letter_Q/ pleure en silence biggs movie

Anônimo disse...

movie forums [url=http://moviestrawberry.com/films/film_girl_with_a_pearl_earring/]girl with a pearl earring[/url] movie film location manager http://moviestrawberry.com/films/film_singin_in_the_rain/ play movie with microsoft software for xp
boudicca the movie [url=http://moviestrawberry.com/films/film_road_trip_beer_pong/]road trip beer pong[/url] nuclear bomb explodes in movie http://moviestrawberry.com/films/film_a_walk_to_remember/ fleshlight movie
free realplayer adult movie downloads [url=http://moviestrawberry.com/films/film_the_bunker/]the bunker[/url] blowjob movie clips
movie supernova [url=http://moviestrawberry.com/films/film_the_poet/]the poet[/url] bleach memories of nobody movie dvd sale http://moviestrawberry.com/films/film_the_simple_things/ movie von trapp family singers
movie 48hrs [url=http://moviestrawberry.com/films/film_the_matchmaker/]the matchmaker[/url] emerald isle movie theatre http://moviestrawberry.com/films/film_champion/ saw movie sound effects