I've Got Flash 4, And I'm Stuck...

An attempt to make a simple game

Page 1 of 1

7 Replies - 1590 Views - Last Post: 23 March 2003 - 01:46 AM

#1 llothcat  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 15-March 03

I've Got Flash 4, And I'm Stuck...

Post icon  Posted 15 March 2003 - 09:54 PM

I started this 2 weeks back, and I have been searching for a code that will work with this older flash. I want to make a very simple "pong" like game.

I have figured out how to make the "paddle" move with the arrow keys, but I'm stuck with the ball. Animating the ball using 'tweening will not work for this concept, and this is all that I can find for it on the web.

I have been experimenting with the limited coding you can do in flash 4, but thus far, I haven't run across what I really need. Anyone want the challenge of moving the ball with the coding for flash 4? :rolleyes: :crazy:

For a look-see of what I have managed so far, please go here

Is This A Good Question/Topic? 0
  • +

Replies To: I've Got Flash 4, And I'm Stuck...

#2 Dr. Tim  Icon User is offline

  • D.I.C Addict

Reputation: 0
  • View blog
  • Posts: 993
  • Joined: 20-March 02

Re: I've Got Flash 4, And I'm Stuck...

Posted 15 March 2003 - 11:12 PM

http://samsonswig.com/guestbook/admin/pong/pong.swf
Simple pong whipped up for you. Email me for the source.
Was This Post Helpful? 0
  • +
  • -

#3 llothcat  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 15-March 03

Re: I've Got Flash 4, And I'm Stuck...

Posted 16 March 2003 - 04:10 AM

umm..for some reason..it's not loading for me. Maybe the 'net is slow right now. Maybe I don't have the right player?

I'll try again later
Was This Post Helpful? 0
  • +
  • -

#4 Dr. Tim  Icon User is offline

  • D.I.C Addict

Reputation: 0
  • View blog
  • Posts: 993
  • Joined: 20-March 02

Re: I've Got Flash 4, And I'm Stuck...

Posted 16 March 2003 - 08:57 AM

Its Flash 5, youll pretty much need at LEAST Flash 5 to run a pong like app without lots and lots of code.
Was This Post Helpful? 0
  • +
  • -

#5 llothcat  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 15-March 03

Re: I've Got Flash 4, And I'm Stuck...

Posted 16 March 2003 - 07:31 PM

Very nice..and it works real well. But it's not what I was looking for.

sigh...Like I said..flash 4 is SO limited.

I know it is likely much easier in other ways...like flash 5 or even DHTML. I was just hoping that someone had tried it in flash 4 before I did.

Welp..looks like I will have to invest in a flash upgrade, afterall:P
Was This Post Helpful? 0
  • +
  • -

#6 MarkoDaGeek  Icon User is offline

  • Dirty Technophile
  • member icon

Reputation: 11
  • View blog
  • Posts: 11,158
  • Joined: 13-October 01

Re: I've Got Flash 4, And I'm Stuck...

Posted 18 March 2003 - 08:06 AM

llothcat Have you checked Flashkit ? Take a look around there, Maybe you will find something that could help, they have flash 4 forums there and I'm sure your not the only one looking to do this. http://www.flashkit.com
Was This Post Helpful? 0
  • +
  • -

#7 Guest_Red93CobraR*


Reputation:

Re: I've Got Flash 4, And I'm Stuck...

Posted 18 March 2003 - 10:16 AM

okay:
1.
This will get you the right direction it's a basic dynamic friction code. in flash 4
__________________________________
startx2 = GetProperty(/:info2, _x)
moved =/:targetx2-startx2;
setProperty(/:info2, _x, startx2 +(moved/9))
__________________________________

Stick this in the first frame of the main timeline of a 2 frame movie clip.
on the second frame place "gotoAndPlay(1);"

This sets a loop of code that checks the position of "info2", and if info2 is move it will move it.



button event to make the object move
__________________________________
on (press) {
targetx2 = -2000;

}
__________________________________

3. make an object and name it info2

when you press the button the object should move

then only way in flash 4 and 5 to programmatically move objects is using the above technique since the language is does not have listeners. In mx it's bit easier to do this.

Flash Kit should have a pong game in flash 4

BTW Josh Davis of Praystation Fame did all of his cool physics experiemnts in flash 4... It can be done...I have all his code on CD...It's pretty sloppy but it works.
Was This Post Helpful? 0

#8 llothcat  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 15-March 03

Re: I've Got Flash 4, And I'm Stuck...

Posted 23 March 2003 - 01:46 AM

Thanks for your help so far:D

:blink: um..I tried your code in flash 4, and this is what I got: http://members.fortu...hcat/Movie1.swf
It did move the object, but probably not the way you wanted it to.

This was much the same effect as the "set property" example that comes with flash. This example is what I played with to get the "butterfly" ball that I currently have made.

I wonder if there' s a way to access javascripting outside of this flash program? The coding would be much easier then, and you wouldn't have to mess with the interface at all.

BTW: I have tried looking for this in flaskit, but they've seemed to have long since moved on to newer flash platforms. I had a hard time even finding the tutorial for boucing a ball through the timelines:P
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1