• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 16:53
CEST 22:53
KST 05:53
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Maestros of the Game: Week 1/Play-in Preview5[ASL20] Ro24 Preview Pt2: Take-Off7[ASL20] Ro24 Preview Pt1: Runway132v2 & SC: Evo Complete: Weekend Double Feature4Team Liquid Map Contest #21 - Presented by Monster Energy9
Community News
Weekly Cups (Aug 18-24): herO dethrones MaxPax6Maestros of The Game—$20k event w/ live finals in Paris35Weekly Cups (Aug 11-17): MaxPax triples again!13Weekly Cups (Aug 4-10): MaxPax wins a triple6SC2's Safe House 2 - October 18 & 195
StarCraft 2
General
#1: Maru - Greatest Players of All Time Maestros of the Game: Week 1/Play-in Preview Greatest Players of All Time: 2025 Update BoxeR's Wings Episode 2 - Fan Translation A Eulogy for the Six Pool
Tourneys
Maestros of The Game—$20k event w/ live finals in Paris LiuLi Cup - August 2025 Tournaments $5,000 WardiTV Summer Championship 2025 $5,100+ SEL Season 2 Championship (SC: Evo) Esports World Cup 2025
Strategy
Custom Maps
External Content
Mutation # 488 What Goes Around Mutation # 487 Think Fast Mutation # 486 Watch the Skies Mutation # 485 Death from Below
Brood War
General
Post ASL20 Ro24 discussion. BGH Auto Balance -> http://bghmmr.eu/ Easiest luckies way to get out of Asl groups BW General Discussion No Rain in ASL20?
Tourneys
Cosmonarchy Pro Showmatches [ASL20] Ro24 Group F [IPSL] CSLAN Review and CSLPRO Reimagined! [ASL20] Ro24 Group E
Strategy
Simple Questions, Simple Answers Muta micro map competition Fighting Spirit mining rates [G] Mineral Boosting
Other Games
General Games
General RTS Discussion Thread Path of Exile Mechabellum Nintendo Switch Thread Stormgate/Frost Giant Megathread
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread YouTube Thread Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread
Fan Clubs
INnoVation Fan Club SKT1 Classic Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Manga] One Piece [\m/] Heavy Metal Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread High temperatures on bridge(s) Gtx660 graphics card replacement
TL Community
The Automated Ban List TeamLiquid Team Shirt On Sale
Blogs
Lemme tell you a thing o…
JoinTheRain
How Culture and Conflict Imp…
TrAiDoS
RTS Design in Hypercoven
a11
Evil Gacha Games and the…
ffswowsucks
INDEPENDIENTE LA CTM
XenOsky
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1081 users

ActionScript 3 help!! :[

Blogs > Day[9]
Post a Reply
Day[9]
Profile Blog Joined April 2003
United States7366 Posts
Last Edited: 2008-10-26 08:23:49
October 26 2008 08:20 GMT
#1
The overarching idea is that a user inputs a number and my program generates an abstract image based upon this number. Artistically, I'm set. I know what I want the images to look like etc. Now comes my technical difficulties.

I figured the best way to go about doing this was to create a series of small tiles (32x32 pixels) that would arrange themselves to form the image. So, my basic pseudocode idea is to do the following

1) get input number
2) take the input number to generate a 1 dimensional array. each item in the array represents a tile (all tiles are pregenerated)
3) we iterate along the array. in each iteration we:
----a) create an empty movie clip
----b) import the appropriate tile image into the movie clip
----c) place this movie clip on the stage
----d) scoot over 32 pixels so we can create the next movieClip
4) the entire image should be completed at this point

Sadly, i'm having a HUGE amount of trouble with #3

I basically have something like
--------------------------------------------------
var clipOne:MovieClip = new MovieClip();
clipOne.x = 0;
clipOne.y = 0;

stage.addChild(clipOne);

var loader:Loader = new Loader();
clipOne.addChild(loader);
loader.load(new URLRequest("Tile1.swf");
--------------------------------------------------
When i do that, the first tile loads totally fine. However, I have no idea how to get the 2nd tile to load without creating an entirely new loader. can i use the same loader??? that would help a fuckton.

blagh i'm so lost :[. this is due on tuesday, so hopefully someone can help me before then T.t.t.t.T

-Sean

***
Whenever I encounter some little hitch, or some of my orbs get out of orbit, nothing pleases me so much as to make the crooked straight and crush down uneven places. www.day9.tv
Guss
Profile Blog Joined November 2007
Sweden712 Posts
October 26 2008 08:43 GMT
#2
call obama
Bisu[Shield] FIGHTING!
LosingID8
Profile Blog Joined December 2006
CA10828 Posts
October 26 2008 08:50 GMT
#3
T_T gl
ModeratorResident K-POP Elitist
Elvin_vn
Profile Blog Joined March 2004
Vietnam2038 Posts
Last Edited: 2008-10-26 11:24:33
October 26 2008 11:23 GMT
#4
dude post ur question in other related web-sites
u'll get help more quickly than in TL
do not agrue with idiots, they will pull you down to their level and beat you with their experiences
Ethenielle
Profile Blog Joined December 2005
Norway1006 Posts
October 26 2008 13:47 GMT
#5
do your tiles have to be in separate .swf files? I don't have much experience with the loader class so I can't help you there, but it'd be easy to make the code if the tiles were available in the library instead.
Theres a fine line between fishing and just standing on the shore like an idiot.
overpool
Profile Joined April 2008
United States191 Posts
Last Edited: 2008-10-26 17:42:30
October 26 2008 17:25 GMT
#6
It's been a long time since I've used ActionScript but I'm a little confused... Unless you're very concerned about creating extra objects (I think ActionScript has auto garbage collection...), why can't you just use a loop? ie:

(code)
y=0;
x=0;
NUM_CLIPS=10; // or whatever

for (i=0;i<NUM_CLIPS;i++, x+=32){
    var currClip:MovieClip = new MovieClip();
    currClip.x=x;
    currClip.y=y;
    stage.addChild(currClip);

    var loader:Loader = new Loader();
    currClip.addChild(loader);
    loader.load(new URLRequest("Tile" + i + ".swf");
}



edit: magic to keep formatting
yay i love tl events
Please log in or register to reply.
Live Events Refresh
[BSL 2025] Weekly
18:00
#12
LiquipediaDiscussion
Maestros of the Game
16:00
Round of 24 Preliminary Stage
Rogue vs MaNaLIVE!
ComeBackTV 1128
SteadfastSC343
IndyStarCraft 332
CranKy Ducklings249
CosmosSc2 83
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SteadfastSC 343
IndyStarCraft 320
CosmosSc2 83
Nathanias 77
Livibee 64
JuggernautJason48
StarCraft: Brood War
Shuttle 369
firebathero 146
sSak 141
Dota 2
capcasts118
League of Legends
JimRising 222
Counter-Strike
fl0m2826
Stewie2K386
flusha166
Other Games
summit1g6954
tarik_tv3817
FrodaN2614
Grubby2228
gofns1231
qojqva1024
Hui .216
KnowMe156
Trikslyr62
Organizations
Other Games
gamesdonequick1284
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 19 non-featured ]
StarCraft 2
• printf 74
• davetesta20
• Kozan
• sooper7s
• AfreecaTV YouTube
• Migwel
• intothetv
• LaughNgamezSOOP
• IndyKCrew
StarCraft: Brood War
• iopq 2
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 4876
• masondota21861
• Ler65
League of Legends
• Doublelift3344
Counter-Strike
• imaqtpie886
Other Games
• Shiphtur126
Upcoming Events
SC Evo League
15h 7m
Maestros of the Game
19h 7m
SHIN vs Creator
Astrea vs Lambo
Bunny vs SKillous
HeRoMaRinE vs TriGGeR
BSL Team Wars
22h 7m
Team Bonyth vs Team Sziky
BSL Team Wars
22h 7m
Team Dewalt vs Team Sziky
Afreeca Starleague
1d 13h
Soulkey vs BeSt
Snow vs Light
Monday Night Weeklies
1d 19h
Replay Cast
2 days
Sparkling Tuna Cup
2 days
PiGosaur Monday
3 days
LiuLi Cup
3 days
[ Show More ]
Replay Cast
4 days
The PondCast
4 days
RSL Revival
4 days
Maru vs SHIN
MaNa vs MaxPax
RSL Revival
5 days
Reynor vs Astrea
Classic vs sOs
BSL Team Wars
5 days
Team Bonyth vs Team Dewalt
CranKy Ducklings
6 days
RSL Revival
6 days
GuMiho vs Cham
ByuN vs TriGGeR
Cosmonarchy
6 days
TriGGeR vs YoungYakov
YoungYakov vs HonMonO
HonMonO vs TriGGeR
[BSL 2025] Weekly
6 days
Liquipedia Results

Completed

Acropolis #4 - TS1
WardiTV Summer 2025
HCC Europe

Ongoing

Copa Latinoamericana 4
BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Qualifiers
ASL Season 20
CSL Season 18: Qualifier 2
Maestros of the Game
SEL Season 2 Championship
Sisters' Call Cup
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025

Upcoming

CSL 2025 AUTUMN (S18)
LASL Season 20
2025 Chongqing Offline CUP
BSL Season 21
BSL 21 Team A
Chzzk MurlocKing SC1 vs SC2 Cup #2
EC S1
BLAST Rivals Fall 2025
Skyesports Masters 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
MESA Nomadic Masters Fall
CS Asia Championships 2025
ESL Pro League S22
FISSURE Playground #2
BLAST Open Fall 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.