715 posts
  • Author had a File in an Envato Bundle
  • Most Wanted Bounty Winner
  • Sold between 50 000 and 100 000 dollars
  • Author had a Free File of the Month
  • Exclusive Author
  • Has been a member for 6-7 years
  • Beta Tester
+3 more
majd_abdul says

Hi,

I’m working on a bejeweled style game in AS3 . So far it’s working out alright, I’m at the part where I have to resettle all the items in the holes created after matching tiles.

I’m not sure how to approach this part. I thought of going through all the tiles checking which ones are higher vertically and renaming them accordingly. Is this the correct way?

Better still, is there a bejeweled style tutorial in AS3 ?

Thanks

4145 posts Community Mod Building awesome stuff for your mobile devices!
  • Community Moderator
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Interviewed on the Envato Notes blog
  • Author had a Free File of the Month
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Contributed a Tutorial to a Tuts+ Site
  • Won a Competition
+9 more
Enabled Volunteer moderator says

I don’t know anything regarding bejeweled, what I do know that tutorials on activeden equal a big ban :)

We are not allowed to use, modify, get data from other sources.

5310 posts The Dude Abides
  • United States
  • Exclusive Author
  • Has been a member for 5-6 years
  • Elite Author
  • Bought between 100 and 499 items
  • Referred between 100 and 199 users
  • Author had a Free File of the Month
+5 more
CodingJack says
I don’t know anything regarding bejeweled, what I do know that tutorials on activeden equal a big ban :) We are not allowed to use, modify, get data from other sources.

He didn’t say he was going to sell it here :P

715 posts
  • Author had a File in an Envato Bundle
  • Most Wanted Bounty Winner
  • Sold between 50 000 and 100 000 dollars
  • Author had a Free File of the Month
  • Exclusive Author
  • Has been a member for 6-7 years
  • Beta Tester
+3 more
majd_abdul says

@enabed: It’s not for ActiveDen.

I managed to rename the tiles by checking the height of all the tiles in each column, which caused another problem I’m missing right now.

I’ll try to move on to the next part, tweening the tiles down to their places.

Still, if someone has any suggestions as to how I should do it, or a tutorial it would be great!

4140 posts
  • Bought between 1 and 9 items
  • Brazil
  • Exclusive Author
  • Has been a member for 6-7 years
  • Referred between 1 and 9 users
  • Sold between 5 000 and 10 000 dollars
tsafi says

Hey majd didn’t see you for a very long time i guess this is something to do with the heat as the rest of the world frizzy your winter is like hot water….. go figure :P

What you need to do I ithink is name your diamonds in numbers like array but make them as group base on each color so you can make panels on each group something like this lets say you have 2 colors groups .

 function sort(a:Panel, b:Panel):Number
    {
        if (a.y < b.y) return 1
        else if (a.y > b.y) return -1;
        else return 0;
    }

Then lets say after you click them you need to remove them or tween it just an idea throwing code out of my head if you can think like me that’s good :P if not that’s life …..
private function remove():void
    {
        this.play();
        var found:Boolean;
        for (var i:int = 0; i < yourPanal.length; i++)
        {
            found = false;
            for (var y:int = 0; y < 10; y++)////10 lets say it the amount of objecets

            {
                for (var x:int = 0; x < 10; x++)
                {
                    if (yourPanal[i] == panels[y][x])
                    {
                        for (var yy:int = y; yy >= 1; yy--)
                        {
                            panels[yy][x] = panels[yy - 1][x];
                        }

                        found = true;
                        break;
                    }
                }
                if (found) break;
            }
        }
        for (y = 0; y < 10; y++)
        {
            for (x = 0; x < 10; x++)
            {
                var panel:Panel = panels[y][x];
                if (panel == null) continue;
                tweensomthing(panel, { y:y * size(or what ever your object) }, null, 0.6, Bounce.easeOut).play();
            }
        }

 
715 posts
  • Author had a File in an Envato Bundle
  • Most Wanted Bounty Winner
  • Sold between 50 000 and 100 000 dollars
  • Author had a Free File of the Month
  • Exclusive Author
  • Has been a member for 6-7 years
  • Beta Tester
+3 more
majd_abdul says

Heyyy Tsafi,

It’s getting so hot here, people are starting to dance half naked in the streets ( wait, that sounds like some festival I heard of… )

I’ve been neck deep in study. I took your advice and joined Shenkar. It’s been pretty awesome so far.

Thanks for the help, I’ll try to decipher this crazy code :D I’ll show you the result when I make progress.

4140 posts
  • Bought between 1 and 9 items
  • Brazil
  • Exclusive Author
  • Has been a member for 6-7 years
  • Referred between 1 and 9 users
  • Sold between 5 000 and 10 000 dollars
tsafi says
Heyyy Tsafi,

It’s getting so hot here, people are starting to dance half naked in the streets ( wait, that sounds like some festival I heard of… )

I’ve been neck deep in study. I took your advice and joined Shenkar. It’s been pretty awesome so far.

Thanks for the help, I’ll try to decipher this crazy code :D I’ll show you the result when I make progress.

Its amazing February and i hear everyone is on the beach i just hope there will be drinking water on the summer :P

Shenkar- that’s a great school i am happy for you, hope you benefit from this really great reputation for this institution, but once you finish your study there your next step is to fly to a new country to find a good job because it’s a hard living for designer on the holy smoky grass land unless you are a developer.

Really good luck Majd …….

715 posts
  • Author had a File in an Envato Bundle
  • Most Wanted Bounty Winner
  • Sold between 50 000 and 100 000 dollars
  • Author had a Free File of the Month
  • Exclusive Author
  • Has been a member for 6-7 years
  • Beta Tester
+3 more
majd_abdul says
Heyyy Tsafi,

It’s getting so hot here, people are starting to dance half naked in the streets ( wait, that sounds like some festival I heard of… )

I’ve been neck deep in study. I took your advice and joined Shenkar. It’s been pretty awesome so far.

Thanks for the help, I’ll try to decipher this crazy code :D I’ll show you the result when I make progress.

Its amazing February and i hear everyone is on the beach i just hope there will be drinking water on the summer :P

Shenkar- that’s a great school i am happy for you, hope you benefit from this really great reputation for this institution, but once you finish your study there your next step is to fly to a new country to find a good job because it’s a hard living for designer on the holy smoky grass land unless you are a developer.

Really good luck Majd …….

Thanks! I’m getting a great opportunity to turn a hobby into something real, I’ve already been given a freelance project with the help of one of the teachers. This bejeweled game is part of it.

BTW , I managed to solve the part I asked about, now I’m focusing on effects and animations. I’ll show you the result when it’s done.

Thanks again for the advice!

by
by
by
by
by
by