How do I create hyperlinks inside text?

0 favourites
  • 7 posts
From the Asset Store
94 Inside buildings views - Isometric view - PNG transparent - 2048x2048
  • Is there any way to create multiple hyperlinks inside a single text?

    The possible solutions I've come up with all seem cumbersome.

    1. Dynamic text, each word having it's own instance allowing each one to have it's own hyperlink.

    2. Pure html where bbcode could handle it.

    3. Allow only 1 hyperlink per text.

    Ideally, something like:

    "If you clicked on this hyperlink it goes to main, but if you click on this hyperlink it goes to a sales page."

    (Funny enough, the editor we are using for this forum has the ability to do exactly what I want, just not sure if that's doable with C3.)

    Tagged:

  • Just use the Iframe plug with a custom html page.

  • For what I'm actually doing, I can't figure it out using the iframe.

    I'm actually trying to have linkable "#", "@", and hyperlinks.

    It's doable with dynamic box creation. It's just crazy to have 50k text boxes lol, surely there is an easier way.

  • Well then what can't you figure out? Because Newt's answer is exactly the easier way you're looking for.

  • Another possible approach would be to place sprite buttons behind the words you want clickable. You might have to use a sprite font to make sure the text renders the same in all browsers.

  • Array.At(0,0)&" "&Array.At(1,0)&" "&Array.At(2,0)&" "&Array.At(3,0)&" "&"<a href="&Array.At(4,0)&">"&Array.At(4,0)&"</a>"

    Creates the text properly, then codes the link. Link opens inside the iframe.

    Unfortunately, this isn't what I need.

    I'm trying to embed links after someone posts a message.

    If they type "@whomever", that would be an internal link (not a webpage) and switch to a layout, call a php for that user and then show his profile(easy stuff).

    Unless I've missed something about iframes, they are good for web links and videos.

    Is that wrong? If so, any idea if anyone's done a tutorial on any of this?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • It would be better to ask how to do something rather than how to do it with the methods you're having trouble with. Break it down in to steps if need be.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)