New Object Creation help!

Get help using Construct 2

Post » Wed Oct 28, 2015 4:44 pm

hello people!

I'm trying to make a mobile app forum but i'm having trouble creating a new object. The problem is how do i create a new text box every time someone comment on a topic. this text box have to expand depending on how big or small the comment is. then the box should know to move to the next area without overlapping the previous comment box. The user can also touch scroll to see all the posted comments up and down. i know i'm asking a lot here.

here is my list:

1) create new text box every time someone comment on a topic

2) text box should expand to big or small depending on the comment

3) touch scroll to see all the comment up and down.

HELP!
B
15
S
6
G
1
Posts: 5
Reputation: 1,640

Post » Wed Oct 28, 2015 4:52 pm

In what way does the user enter his/her comment?
In what way are you storing the comments/sharing the comments between users?
what format is the text/comment in?
Do you want to use text-objects or spritefont objects?
Will the text have a background / username / picture attached?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Oct 28, 2015 5:13 pm

I think you mean Text object not TextBox object.

1) You can use "System -> Create Object" to create any object instance whenever you need, or you can spawn it from another object.

2) Text object will bring you a lot of performance issues especially if you want to scale it on the fly. I stronlgly recommend to use SpriteFonts, and then you treat them like sprites, so you can easily scale/resize.

3) You can create an invisible sprite called for instance "pinBoard". Then every visible/movable (by scrolling/sliding) objects should be pinned (Pin behaviour) to this sprite. The "pinBoard" itself should have "drag&drop" behaviour with only vertical axis enabled. This is the easiest solutions. You can of course add scroll limits etc.
ImageImageImage
B
28
S
17
G
82
Posts: 1,033
Reputation: 45,910

Post » Wed Oct 28, 2015 5:33 pm

"In what way does the user enter his/her comment? -text box
In what way are you storing the comments/sharing the comments between users? -mysql
what format is the text/comment in? -ajax output from php
Do you want to use text-objects or spritefont objects? -whatever is better for a forum app
Will the text have a background / username / picture attached? - yes!
B
15
S
6
G
1
Posts: 5
Reputation: 1,640


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 21 guests