… this is surprisingly more difficult than it seems.
http://animation.centerspin.com/animations/solitarFLXMLBetaN.html
but it’s coming along nicely.
… this is surprisingly more difficult than it seems.
http://animation.centerspin.com/animations/solitarFLXMLBetaN.html
but it’s coming along nicely.
So far so good man. I am supposing all you have right now is the random cards and layout since clicking the deck does nothing and the cards always go back to the original point no matter what.
But for what you have thus far it is very good, keep it up man.
thats awesome David. I’m working on a two player online chess game at the moment. going slowly because i have other clients that come before my experiements…
dont you just love swapdepths nightmares?
swapDepth is the bane of my existence… actually LostinBeta is the bane of my existence, but swapDepth is a close second…
Why am I the bane of your existence
lol, I dunno… I just felt like saying it because its fun picking on you.
I love that reason…
I’m gonna use that one as well…
LOL
Rev
:!: That was mean Jubba :!:
Or mayhaps it is just jealousy :evil: :bad: :trout:
Hey David,
The animation is coming along quite nicely
Cheers!
Kirupa
you got me lost… i’m jealous… thats ok, I just started getting back into the whole scripting end of flash. I’ll catch up to you eventually
swap depths aint too bad. The cards all get fed stack information from an xml tree, including “stack” and “slot” locations. These in turn dictate what depth the mc’s reside at.
I have some tricky stuff worked out already for this game… I’m up to 292 lines of code or so.
the best thing is I’m producing.
here’s a sample of what I’ve made for the game so far.
shuffle = function()
{
armagedon(); //see below
/*_____________________________________________________________________*/
//create slots in the deck//
for(i=0;i<52;i++)
{
newElement=Library.createElement("card"+i);
newElement.attributes.suit="";
Library.firstChild.appendChild(newElement);
}
i=0;
while(i<52)
{
n=Math.round(Math.random()*51);
if(Library.firstChild.childNodes[n].attributes.suit=="")
{
Library.firstChild.childNodes[n].attributes.colr=Number(aCardList*.substr(0,1));
Library.firstChild.childNodes[n].attributes.suit=aCardList*.substr(1,1);
Library.firstChild.childNodes[n].attributes.valu=Number(aCardList*.substr(2,aCardList*.length-1));
i++;
}
}
/*____________________________________________________________________*/
// create the deck based upon the card list.//
for(i=0;i<52;i++)
{
_root.attachMovie("card","card"+i,100+i);
_root["card"+i].name="card"+i;
_root["card"+i].suit=Library.firstChild.childNodes*.attributes.suit;
_root["card"+i].valu=Library.firstChild.childNodes*.attributes.valu;
_root["card"+i].colr=Library.firstChild.childNodes*.attributes.colr;
_root["card"+i]._y=Number(Library.childNodes[0].attributes.orgLocY)+i*(Number(Library.childNodes[0].attributes.offSetY)/3);
_root["card"+i]._x=Number(Library.childNodes[0].attributes.orgLocX)+i*(Number(Library.childNodes[0].attributes.offSetX)/3);
_root["card"+i].orgLocY=Number(Library.childNodes[0].attributes.orgLocY)+i*(Number(Library.childNodes[0].attributes.offSetY)/3);
_root["card"+i].orgLocX=Number(Library.childNodes[0].attributes.orgLocX)+i*(Number(Library.childNodes[0].attributes.offSetX)/3);
}
/*___________________________________________________________________*/
// deal cards to each location// working properly
for(i=6;i<13;i++)
{
for(j=i;j<13;j++)
{
Library.childNodes[j].appendChild(Library.firstChild.lastChild);
cardName=Library.childNodes[j].lastChild.nodeName;
_root[cardName].orgLocY=Number(Library.childNodes[j].attributes.orgLocY)-Library.childNodes[j].childNodes.length/3;
_root[cardName].orgLocX=Number(Library.childNodes[j].attributes.orgLocX)+Library.childNodes[j].childNodes.length/3;
_root[cardName].swapDepths(Number(Library.childNodes[j].attributes.d)+Library.childNodes[j].childNodes.length);
}
vName=Library.childNodes*.lastChild.nodeName;
_root[vName].attachMovie("cface","display",10000);
_root[vName].exposed=1;
}
giveHand();
}
/*____________________________________________________________________*/
looking above I see that this is not my most recent attempt. I spent the day trying to remove any variables from the cards other than “name”. My goal is to have all real program work done by cross referencing my xml doc, and computing moves, then just having the cards follow along with the commands.
We’ll see …
Wowsas, and you say you still consider yourself a “noob”… bull
Nah. I’m just an MX noob. But I’m coming along nicely. Once I figured out that an XML tree, though it LOOKS like an array set up, is actually operated upon by completely different methods, I have been doing better with the XML ****.
Truthfuly though… almost everything I did in this project came out of conversations my father and I have had on logic paths. We just started talking about programing two months ago… so Id say that this is all new stuff.
funny… when I talk to my father about logic paths, it usually has to do with either baseball, or some sort of internal combustion engine (he was a diesel mechanic)…
:beam:
Rev
haha… yeah, each has their specialties. I can say that it was both a boon and a bane, growing up with a father who had a minor in Math education and a bachelor’s in programing.
either they make too much sense, or none at all.
my father was the opposite… it was great never having to worry about how to fix my car (he didn’t fix it, but he told me how).
he hadn’t been to a restaurant with table cloths until he met my mother… He has a natural aptitude for math (he passed his ham radio license with no formal education beyond high school way back in the day when it was real tough), and can tell the difference between .06" and .08" gap in a set of points just by eye…
But abzoid & I bought him a new computer about 3-4 years ago, and that has been his angst source for about as long…
Oh well, at least we can email him now…
Rev
sweet… doesn’t sound that different at all…
my father grew up resented by my brothers and I, but he is loved, I believe, now, for the way he was. It’s sad, but hey, we role play never winter nights together now. How many father and sons can say that?
To try not to sit on a freud couch… heehee…I’ll stay away from any real issues, which is where I’m wont to linger…
my father was too intelligent and learned to be able to teach any more. He still remains to me, a figure much like that in “A beutiful mind”. Nothing as glamorous as insanity mind you… just a distance that was his primary love and which was too complex to explain to anyone but his co workers.
people who spent their first decade of work punching cards for a computers memory systems, reading binary code… /< shudder />
I still don’t understand most of what he’s telling me.
you’re taught you to fix a car, mine tried to teach me how to unlock the universe. A zen master would say that there is no difference between the two of those at all.
(see “zen and the art of autorepair”.)
lol
my brother was in that group of punch card people… I filled his car up with the “confetti” from his computer science lab during his wedding (boy did he get me back for that). that is where we connect.
my father taught me that each car has a personality. That has helped me in soooo many ways…
funny as we get older we start to look for the ways to connect to our parents, isn’t it…
Rev
:: Copyright KIRUPA 2024 //--