Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411587 Posts in 69386 Topics- by 58443 Members - Latest Member: Mansreign

May 06, 2024, 08:52:05 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Flash AS3
Pages: 1 [2]
Print
Author Topic: Flash AS3  (Read 4878 times)
Sigma
Level 1
*


View Profile WWW
« Reply #20 on: May 09, 2010, 09:47:03 PM »


I'm not looking for this. I mean a 2d game with z depth (play some tennis game).

Thanks in advance...

Are you referring to CurveBall?

Exactly the same kind. you have any idea about it? How to or just tell me the stuffs i should google for?
Logged

Rob Lach
Level 10
*****



View Profile WWW
« Reply #21 on: May 09, 2010, 11:16:29 PM »


I'm not looking for this. I mean a 2d game with z depth (play some tennis game).

Thanks in advance...

Are you referring to CurveBall?

Exactly the same kind. you have any idea about it? How to or just tell me the stuffs i should google for?

I don't know of any tutorials specific to something like that. Where you should start looking entirely depends on your current level of knowledge.
Logged

ishlilith
Level 0
**


View Profile WWW
« Reply #22 on: May 10, 2010, 07:36:21 AM »


I'm not looking for this. I mean a 2d game with z depth (play some tennis game).

Thanks in advance...

Are you referring to CurveBall?

Exactly the same kind. you have any idea about it? How to or just tell me the stuffs i should google for?

I have uploaded the source code of this game here. It has an effect similar to what you are looking for.

It's not the best way to do it but it works. I was experimenting with some other things so I didn't give a lot of thought to that.

Logged

Sigma
Level 1
*


View Profile WWW
« Reply #23 on: May 17, 2010, 03:20:33 AM »

can anyone tell me which event did flash receive when the browser containing the swf closes?
Logged

bateleur
Level 10
*****



View Profile
« Reply #24 on: May 17, 2010, 04:35:56 AM »

You can't do this directly from Flash (as far as I know). You need to use a JavaScript window.onbeforeunload function and then have that communicate with the Flash app.

I realise this isn't much use if you're not the author of the containing page!
Logged

st33d
Guest
« Reply #25 on: May 17, 2010, 05:32:34 AM »

I've noticed that the DEACTIVATE event that is used in Flixel games to detect when the Flash object loses focus, is also called when the browser closes (I can see my game pause as I close the page).

I don't however know if there's enough time to execute some code in that time.
Logged
Sigma
Level 1
*


View Profile WWW
« Reply #26 on: May 18, 2010, 02:09:06 AM »

i too used the same event to pause the game; but how do i know whether focus was changed or browser was closed?
Logged

st33d
Guest
« Reply #27 on: May 18, 2010, 04:10:27 AM »

I think you could use bateleur's suggestion of the javascript method to bind an action to the window closing, possibly in conjunction with the DEACTIVATE event.

I've been wondering for a while now if an ExternalInterface call to javascript would allow me embed javascript code into the surrounding page. Surely if a library like jQuery is present, then you can pretty much access the entire document object through the jQuery object and do whatever the hell you like.

But jQuery also teaches you that you can call a function in javascript and wrap another entire function inside the parameters for that call. Maybe it would allow you to poke stuff into the document object for use later.

This is pure speculation, but I'm pretty certain the jQuery route would be really easy to implement.
Logged
Sigma
Level 1
*


View Profile WWW
« Reply #28 on: May 19, 2010, 04:55:06 AM »

thanks for the reply.
Logged

Pages: 1 [2]
Print
Jump to:  

Theme orange-lt created by panic