ok heres my plan , im needing like a feature were users can start with building material ""movie clips/blocks" such as tvs furniture ect, and be able to build there own home ""crib"" and then have the function to save it were then other users can come in there home and see all the stuff theve selected and placed in there home, how do i go about doing this, if you would like a short example check out club penguin how you can make houses there
im not trying to make a ""full"" vertual world, just standalone swf on each users page, displaying there home and everything in it, somethings in the home will be interactive, and they can add stuff acording to there rating points which they can earn by other users rating there home, well hope this explains well enough, all i need is sugestions on how to let users cunstruct, add objects, and save there home , THANKS everyone in advance for the replys
need help sugestions
Sounds like a job for a database
It sounds like this functionality only needs a database. Here's an overview:
Let the user arrange his room. As he does this each furniture he selects is added to an array. When he places it the position is also added to the array.
Save the array containing the name of the crib owner, each piece of furniture and its position in the room. Send it to the database.
Then when a user looks at the room, the swf asks the server for the room array, based on the owner, and places each piece of furniture. You could store all the furniture in one movieclip and jump to a frame, or you could dynamically load in a png into each furniture.
Let the user arrange his room. As he does this each furniture he selects is added to an array. When he places it the position is also added to the array.
Save the array containing the name of the crib owner, each piece of furniture and its position in the room. Send it to the database.
Then when a user looks at the room, the swf asks the server for the room array, based on the owner, and places each piece of furniture. You could store all the furniture in one movieclip and jump to a frame, or you could dynamically load in a png into each furniture.
Carl Lydon
Illustrator, animator, programmer
----------------------------------------
www.gametrust.com
www.chamberofchat.com
Illustrator, animator, programmer
----------------------------------------
www.gametrust.com
www.chamberofchat.com
thanks
yea thats what i was leaning torwards like a database but the bad thing is
im very new to arrays sorta odd that ive been working with flash for two years now but havent learned arrays yet? lol theyve always cunbfused me may someone please provide a example maybe some actionscript and i promise any copyied or snipped actionscript i will post there name at the botom of the loading page with all the names of the creators
im very new to arrays sorta odd that ive been working with flash for two years now but havent learned arrays yet? lol theyve always cunbfused me may someone please provide a example maybe some actionscript and i promise any copyied or snipped actionscript i will post there name at the botom of the loading page with all the names of the creators
The array might look something like this
The array might look something like this.
CribArray=[ ["couch",32,128] , ["chair1",200,94] , ["rug",332,100] ]
Although I would probably use number sfor the furniture instead of names because it's smaller to send and retrieve than a string, and the number can be used ot indicate a frame in a movieclip.
Anyway, to build the array, have a script attached to a save button, that loops (i) through all of the furniture movie clips and determines the type of furniture and the current position for each one. Maybe all your furniture on the screen are named "furniMC0","furniMC1", "furniMC2" etc
Then do something like:
furni=[]
furni.push("couch")
furni.push(_root["furniMC"+i]._x)
furni.push(_root["furniMC"+i]._y)
CribArray.push(furni)
When you retrieve the array from the database, loop through the array and retrieve the data
furni= CribArray[i]
Lname=furni[0]
Lx=furni[1]
Ly=furni[2]
Then have code to duplicate a movieclip, send it to the correct frame based ont he furni in question, and position the MC based on Lx and Ly.
CribArray=[ ["couch",32,128] , ["chair1",200,94] , ["rug",332,100] ]
Although I would probably use number sfor the furniture instead of names because it's smaller to send and retrieve than a string, and the number can be used ot indicate a frame in a movieclip.
Anyway, to build the array, have a script attached to a save button, that loops (i) through all of the furniture movie clips and determines the type of furniture and the current position for each one. Maybe all your furniture on the screen are named "furniMC0","furniMC1", "furniMC2" etc
Then do something like:
furni=[]
furni.push("couch")
furni.push(_root["furniMC"+i]._x)
furni.push(_root["furniMC"+i]._y)
CribArray.push(furni)
When you retrieve the array from the database, loop through the array and retrieve the data
furni= CribArray[i]
Lname=furni[0]
Lx=furni[1]
Ly=furni[2]
Then have code to duplicate a movieclip, send it to the correct frame based ont he furni in question, and position the MC based on Lx and Ly.
Carl Lydon
Illustrator, animator, programmer
----------------------------------------
www.gametrust.com
www.chamberofchat.com
Illustrator, animator, programmer
----------------------------------------
www.gametrust.com
www.chamberofchat.com
thank you
thanks that was very helpfull
still cinfised on the array in actionscript but ill read up on my books gosh cant get it forced in my head
still cinfised on the array in actionscript but ill read up on my books gosh cant get it forced in my head
Return to “SmartFoxServer 1.x Discussions and Help”
Who is online
Users browsing this forum: No registered users and 85 guests