ThemeForest

Bejeweled AS3

715 posts
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
  • Beta Tester
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Microlancer 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

3749 posts
  • Has been a member for 4-5 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 50 000 and 100 000 dollars
  • Microlancer Beta Tester
  • Community Moderator
  • Interviewed on the Envato Notes blog
  • Bought between 1 and 9 items
  • Referred between 50 and 99 users
+7 more
Enabled 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.

5008 posts The Dude Abides
  • United States
  • Elite Author
  • Has been a member for 4-5 years
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Contributed a Tutorial to a Tuts+ Site
  • Author had a Free File of the Month
+4 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
  • Author had a Free File of the Month
  • Beta Tester
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Microlancer 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!

4126 posts
  • Bought between 1 and 9 items
  • Brazil
  • Community Superstar
  • Exclusive Author
  • Has been a member for 4-5 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
  • Author had a Free File of the Month
  • Beta Tester
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Microlancer 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.

4126 posts
  • Bought between 1 and 9 items
  • Brazil
  • Community Superstar
  • Exclusive Author
  • Has been a member for 4-5 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
  • Author had a Free File of the Month
  • Beta Tester
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Microlancer 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