1

I am using flash cs6 and making a game in which some squares are falling down randomly and we have a wall that is controlled by the mouse. Every square we dodge 10 points are added to the score. If the squares touch the wall then we go to another scene called the "the end" scene in this scene we display the score to the player. So I want to pass the score variable to that scene. I have tried googling it a lot of times but it couldn't help. So my only hope is you guys. Please help.

How do I go to the next scene:

if (wall.hitTestObject(square))
{
gotoAndStop(1, "The End");
}
Anay Karnik
  • 920
  • 1
  • 7
  • 15
  • 1
    Post some code .... how do you go to the next scene? (post the bit of code that does that). I suggest you use OOP to build you game (external classes). Writing code directly in Flash (inside different frames/ scenes) is going to get ugly very fast. – Iansen Apr 14 '14 at 11:47
  • Agreed with lansen. AS2 was a scripting languages, was easier to handle on timeline in flash. But AS3 is an OOP language which is more complicated and efficient, thus you should use it. – Zhafur Apr 14 '14 at 11:57
  • @lansen Can you tell me what is OOP and how to use OOP ? And I posted the code of switching between the scenes. – Anay Karnik Apr 14 '14 at 13:53
  • Object-Oriented Programming (OOP) is a programming paradigm which represents objects that have fields (variables). "How to use OOP" is a really broad question, there is none who could answer that, do some research on the net, use Google and search for beginner tutorials or "get started" ones. – Zhafur Apr 14 '14 at 21:22
  • Ok, Thank you i will search for it. – Anay Karnik Apr 15 '14 at 07:16

2 Answers2

1

Adobe Flash Professional Creative Suit series are for designers, animators. It is one of the worst IDEs for a programmer (notepad would be better). I'd suggest you to get a better IDE like Adobe's Flash Builder which is more suitable for programmers or search for other 3rd party IDEs like IntelliJ Idea which is one of the best from my point of view.

Instead of programming on timeline and using scenes which is for animators, get into the Object Oriented Programming, start with the basics, the classes, then move on with design patterns etc.

Zhafur
  • 1,626
  • 1
  • 13
  • 31
  • What exactly do you mean by a 3rd party IDE? – Anay Karnik Apr 15 '14 at 07:21
  • An IDE (Integrated Development Environment) is a software which helps programmers work faster and more efficient. Adobe's Flash Pro CS series also has environment for programmers, but they are really bad. So that's why I suggest using another software such as the above ones. :) – Zhafur Apr 15 '14 at 17:15
1

Instead of using flash to create games like this you can Game Maker it is more efficient. You can go to its website yoyogames.com

Tanay Karnik
  • 424
  • 6
  • 19