There's a macro for that
See all
Members (1,421)
Justin Donaldson's profile photo
Haxe's profile photo
Nicolas Cannasse's profile photo
Lee Sylvester's profile photo
Franco Ponticelli's profile photo
Skial Bainn's profile photo
Bruno Fonzi's profile photo
Cauê Waneck's profile photo
Nailson Santos's profile photo
Silex Labs's profile photo
Adi Reddy Mora's profile photo
Roger Câmara's profile photo
Kerrigan Sara's profile photo
Matt Sayers's profile photo
Changxin Dai's profile photo
Gianmichele Mariani's profile photo
Štěpán Vyterna's profile photo
Julien's profile photo
Jon Borgonia's profile photo
Robert Konrad's profile photo
Александр Красовский's profile photo
Corné Dorrestijn's profile photo
Nidin Vinayakan's profile photo
Andy Robertson's profile photo

Stream

Join this community to post or comment
 
I am in need of a little help with the latest version of Haxe/openFL.

When targeting a movie clip in openFL from a function I get the error unknown identifier. An example:

addChild(parentMC);
......
parentMC.addChild(childMC);

......

private function someFunction():Void{
trace(parentMC.childMC.x);
}

output:
Source/Main.hx:263: characters 2-18 : Unknown identifier : parentMC


I have also tried calling the child directly like so

childMC.x

but get the same type of error.

How do I get the property the child MC or even the parent from within a function?


using hate version:
3.2.1
Libraries:
actuate: [1.8.6]
air3: [0.0.1]
box2d: [1.2.3]
flambe: [4.1.0]
format: [3.2.1]
haxeui: [1.8.18]
hscript: [2.0.7]
hvm: [0.0.2]
hxcpp: [3.2.205]
hxsl: [2.0.5]
layout: [1.2.1]
lime-samples: [2.6.0]
lime: [2.9.1]
openfl-samples: [3.3.1]
openfl: [3.6.1]
swf: [2.2.0]
1
Frank Hernandez's profile photoJustin front's profile photo
2 comments
 
It helps if you post a full example somewhere, I read the question but did not really understand what aspect you were struggling with, but full code would have been clearer, and I don't use Openfl often so would have been a hassle to create you a demo even if I was sure of your need, as I probably don't have it setup right now.  I found Kha IRC and Snowkit gitter very active, I think Openfl has forums though did you try them yet?
Add a comment...

Devin Curry

General  - 
 
Did a little #haxe #kha #code after work. Got particle vs circle collision in! http://www.devination.com/2016/04/verletkha-collision-primitives.html
7
Add a comment...
 
I like too execute an function when an the last reference to an specific object is lost. Is there anyway to do this in Haxe?
1
Yanis Benson's profile photo
 
No, there isn't. Only some of haxe target platforms support finalizers, therefore it's pointless to implement them in haxe. However you can probably hook specific platforms(cpp and java I guess) to support finalizers. Also it is not an idiomatic way in haxe, so not recommended except when you really need it.
Add a comment...
 
Updated hxPolyK port with a div drawing triangulation test, you can drag the points around and it will recalculate. Obviously this is heavy ( not using canvas or webgl ) so I only recalculate and redraw lines once in every 3 frames when dragging.

https://cdn.rawgit.com/Justinfront/hxPolyK/master/test/triangulate/index.html

I will add tests for some of the other PolyK features prior to perhaps putting hxPolyK on haxelib.

#PolyK #hxPolyK #Divtastic3 #Javascript #Div
1
Add a comment...
 
 
Ported PolyK to Haxe and using it to create fills using triangulation ( weird red shape ), example also shows animation on graphics4 and 'BasicKha' mouse movement of image on graphics2.

https://cdn.rawgit.com/Justinfront/GraphicsKha/master/build/html5/graphicsKha_.html

https://github.com/Justinfront/GraphicsKha

#Haxe #Kha #PolyK


3
Add a comment...

Marcos D

General  - 
 
My new puzzle game made in Haxe + Openfl!
Figures vs Ground
(free version)

https://goo.gl/ApVWHl

1
Add a comment...

Skial Bainn
owner

General  - 
 
This is the sixth dedicated Ludum Dare roundup for Haxe. Ludum Dare 34 took place between December 11th and 14th and the chosen theme was tied between Two Button Controls and Growing.
6
3
Justin front's profile photoPol Goasdoué's profile photo
Add a comment...

Created by

About this community

The Platform Agnostic Open Source Language

Skial Bainn
owner

General  - 
4
3
Paul Bennett's profile photoFabricio Gonçalves's profile photo
Add a comment...

Devin Curry

General  - 
 
Just ported a cool Verlet physics engine to Haxe and Kha! Play around with it here: http://www.devination.com/p/verletkha-shapes.html Get the source here: https://github.com/Devination/VerletKha
10
Fabricio Gonçalves's profile photoDevin Curry's profile photo
3 comments
 
+Justin front thanks! +Fabricio Gonçalves​ haha so rough, this is why we can't have nice things :p
Add a comment...
 
Simple example of rendering two differently colored triangles in 2D webgl with haxe, the example is self contained, and is perhaps a good starting point to extend and adapt, it can be a pain setting up webgl with a lot of time spent in front of a black screen so having a starting point that works can be really useful and is also important prior to just using a framework for that deeper understanding or not in the case of webgl!
http://try.haxe.org/#Dc3f2 #webgl #haxe #javascript #2triangles #color #mat4 #varying
Haxe is an amazing multiplatform programming language. Check it out !
2
Add a comment...

Skial Bainn
owner

General  - 
11
2
Pol Goasdoué's profile photoPaul Bennett's profile photo
Add a comment...
 
seems a cool concept perhaps using Macros in haxe it would be feasible to insert a regular expression at runtime, but the idea of trying to implement such a mini library does not excite me, but it could be super useful.
 
This is awesome - verbal expression - #RegularExpressions  but using normal words. Useful #JS  library for your consideration if you find them tricky.

Hat tip to +Addy Osmani for the find.
5
Justin front's profile photoMaximiliano Fernández's profile photo
2 comments
 
Really nice! Great finding, Justin!
Add a comment...

Skial Bainn
owner

General  - 
6
2
Pol Goasdoué's profile photoTong Disktree's profile photo
Add a comment...

Tiago Souza

General  - 
 
hello, I would like to learn lime, however as there is no documentation, I would like to study the project code done with it, any recommendations?
1
Justin front's profile photo
 
hi I have not looked at lime yet, but I found that Joshua has this example online which looks like a good start.
https://github.com/openfl/lime-samples/blob/master/demos/BunnyMark/Source/Main.hx
Since Lime offers a few ways to render perhaps the gl approach is most flexible, from that perspective the kha tutorials might give some insight because it's linked to a full on gl tutorial but is haxified.
http://luboslenco.com/kha3d/#opening-a-window if you compare it with the lime gl rendering, there are probably a lot of similarities.
https://github.com/openfl/lime-samples/blob/master/demos/BunnyMark/Source/render/GLRenderer.hx
I guess I should take a proper look at lime, certainly the samples repository linked above seems a good place to start.
Add a comment...