Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - paala

Pages: 1 [2] 3 4 ... 13
21
I found a solution:
You have to check the pixel color of the game by using:
Code: [Select]
FlxG.camera.buffer.getPixel32(FlxG.mouse.x, FlxG.mouse.y);and then compare it to the buton pixel color.
If they are the same there is no overlapping sprite. If not some sprite must be overlapping.
CAUTION: DO NOT USE IMAGES FOR BUTTON WITH TRANSPARENT COLORS. If so the game pixel value will be a mix of sprite of button and the color behind it.

So, I modified FlxButton.as:
1. Added function:
Code: [Select]
public function isObstructed():Boolean
{
var color:uint = FlxG.camera.buffer.getPixel32(FlxG.mouse.x, FlxG.mouse.y);

//trace("culoare:" + color.toString(16) );
var colorbuton:uint = this.framePixels.getPixel32(FlxG.mouse.x + this.offset.x - this.x, FlxG.mouse.y + this.offset.y - this.y);
//trace("culoare buton:" + colorbuton.toString(16));
if (colorbuton == color) { return false ; }
else return true;
}
and : last line is modified with check for obstruction:
Code: [Select]
protected function updateButton():void
{
//Figure out if the button is highlighted or pressed or what
// (ignore checkbox behavior for now).
if (FlxG.keys.justPressed("E")) {trace("is obstructed"+isObstructed())}
if (FlxG.mouse.visible  )//aici
//if(FlxG.mouse.visible&&this.overlapsPointFilledPixel(new FlxPoint(FlxG.mouse.x,FlxG.mouse.y))==true)
{
if (FlxG.keys.justPressed("E")) { trace("e cale libera: " + this.overlapsPointFilledPixel(new FlxPoint(FlxG.mouse.x, FlxG.mouse.y)));}


if(cameras == null)
cameras = FlxG.cameras;
var camera:FlxCamera;
var i:uint = 0;
var l:uint = cameras.length;
var offAll:Boolean = true;
while(i < l)
{
camera = cameras[i++] as FlxCamera;
FlxG.mouse.getWorldPosition(camera,_point);
if(overlapsPoint(_point,true,camera)&& isObstructed()==false)

FlxButtonPLus:
Code: [Select]
public function isObstructed():Boolean
{
var color:uint = FlxG.camera.buffer.getPixel32(FlxG.mouse.x, FlxG.mouse.y);

trace("culoare:" + color.toString(16) );
var colorbuton:uint = this.buttonHighlight.framePixels.getPixel32(FlxG.mouse.x + this.buttonHighlight.offset.x - this.x, FlxG.mouse.y + this.buttonHighlight.offset.y - this.y);
trace("culoare buton:" + colorbuton.toString(16));
if (colorbuton == color) { return false ; }
else return true;
}


and only last line modified :
Code: [Select]
protected function updateButton():void
{
var prevStatus:uint = _status;

if (FlxG.mouse.visible)//aici
{
if (buttonNormal.cameras == null)
{
buttonNormal.cameras = FlxG.cameras;
}

var c:FlxCamera;
var i:uint = 0;
var l:uint = buttonNormal.cameras.length;
var offAll:Boolean = true;

while(i < l)
{
c = buttonNormal.cameras[i++] as FlxCamera;

if (FlxMath.mouseInFlxRect(false, buttonNormal.rect)&& isObstructed()==false)



22
Hello,

I need to modify the FlxButton class in order to check if a other sprite is between mouse and the button and if it is not to execute the function of the button.
I saw here:http://www.funstormgames.com/blog/2012/01/flixel-the-trouble-with-removing-buttons-callbacks/ in comments a function that will do a hittest but it bad written and even after I correct it it doen't work.

Can someone help me?

Thanks.

23
help / Re: What Flixel should I use?
« on: Sun, Aug 18, 2013 »
I would use normal flixel and smartfoxserver/unionplatform for multiplayer engine.
Haxe flixel doesn't have yet a proven solution for smartfox server.

24
releases / Re: FlxSlider.as
« on: Tue, Jul 30, 2013 »
I found project jumper. The link from here: http://www.haxeflixel.com/demos/project-jumper
doesn't work.
I will try tomorrow to see if your fix worked. Thanks.
EDIT: I studied the modification you did and the trick to put 3.3 instead of 3 if max value is 3 works. Is kind of weird but works.

25
releases / Re: FlxSlider.as
« on: Tue, Jul 30, 2013 »
I found the haxe version of project jumper...
Now regarding this, I think you misunderstood me.
I wasn't referring to the actual shape but to the slider in general.
If you want to select  option "triangle" you need to move the slider in the most right part of it. if you move 1 pixel to the left  the option "circle " is selected.
This doesn't occur on left side. You can move the slider from the most left side like 1 cm before other option is selected.
I hope is clear what I mean

26
releases / Re: FlxSlider.as
« on: Tue, Jul 30, 2013 »
Well, I intend to use the sliders in my future game but is ugly the way they are. I will try to have a look at the haxe version to see if I can do something. I can;t swicth to have since the game is a multiplayer and needs as3 to work.
EDIT: I can't find the haxe flixel repositoryon gitbub. ALso the github for project jumper haxe flixel version doesn;t work either.
Thanks.

27
releases / Re: FlxSlider.as
« on: Tue, Jul 30, 2013 »
Hi Gama,
I noticed a little problem with FlxSlider.
As you can see in your example is very hard to select "Triangle" , because somehow to area of slider for the last options is getting smaller and smaller.
Can you fix it so that if you have a slider with 3 options , the first 33% of slider to be choise 1 next 33% choise 2 , last 33% choise 3.
Now the first 49% is choise 1, next 49% is choise 2, and last 2% is choise 3
Thanks.

28
I found that if you don;t set Encrypt names = false in swf encrypt 6.0, Google analytics don;t work.

29
Thanks, Arkeus, that was it. So GA doen't track very well duration of visit, but is good anyway.

30
Ok, done: http://www.screenr.com/SZhH
Thanks for having a look.

31
After 1 day and  many hours still avg duration visit is 0 seconds...

32
Ok, I checked, nothing the bugs are still there:
<a href="https://dl.dropboxusercontent.com/u/79341481/AxonometricLibDemo.swf" target="_blank" rel="noopener noreferrer" class="bbc_link bbc_flash_disabled new_win">https://dl.dropboxusercontent.com/u/79341481/AxonometricLibDemo.swf</a>
1. the most important for me: if you are near the wall(as near as possible-- touching the wall) and you try  jump on that platform is doesn't jump. Odd thing if you release the mouse while you are landing it will land correct on higher platform.
2. if you walk at the edges of map you get stuck in some tiles, same tiles everytime.
3.diagonal wall - can walk through it . try to reach the upper right corner of map
4. sometimes when you walk, the tiles are drawn in front of the shadow. causing a eye discomfort.

After all a great plug in. Hope mol can solve this bugs to make it perfect.

33
I didn't wait. The hostname works, thanks.
I come back tommorrow to see if time spent is different than 0.

34
I am trying to use GA for my game.
So far i far 2 problems:
1. Duration of visit is 0 sec
2. I can't find a way to display source of swf like funstorm showed here: https://www.fgl.com/view_thread.php?search=1&offset=25&thread_id=42358

Code i use:
class GA:
Code: [Select]
package 
{
/**
* ...
* @author Mihai Morosanu
*/
import com.google.analytics.AnalyticsTracker;
     import com.google.analytics.GATracker;
public class GA
{


public  static var tracker:GATracker;//GA
}

}

 in preloader:
Code: [Select]
GA.tracker =  new GATracker(this, "UA-******2-1", "AS3", false )in main menu under overwrite create:
Code: [Select]
GA.tracker.trackPageview("/MainMenu");

35
oops, no i didn;t see that post. I will check and leave feedback

36
I told you mol has email notifications.
Do you manage to have look  at the bug described above?
Thanks.

37
It doesn';t matter where you spawn. And you don;t fall, it doesn;t jump on higher ground.
Mol, maybe has email notifications on forums

38
There is a bug very annoying.
I downloaded the  demo ...
I mad the map to be :
34567
33333
33333
33333

when i am on first tile at 0,0 and i try to jump at tile 4 it doesn't jump.
Same thing for every tile no matter where is placed.
Can you fix this?

EDIT: Also the shadow is overlapping with tiles when you move from right to left

39
Ok, i let you know if is the case for my game. Thanks

40
Hi, how do you do that, haxe flixel? or?
And what are your fees?

Pages: 1 [2] 3 4 ... 13