Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Creative Link. Please Help.

10 years ago

Hi, it's me, Avery.

I was going through the Help and Info section as well as the notes about coding my brother gave me, trying to see what features I could use for my first story-game, as I want it to be great.

One thing that caught my eye was the possibility to turn the title of the page into a clickable link. I wanted to do something similar: put the link into the main text box so that the link to click is centered on the page and not near the top. I followed Zikara's instructions in the article and attempted to put the code into the text box. When I previewed it to see if it worked, it hadn't, and I made sure I followed the steps exactly, doing it a second time just to be sure. Am I doing something wrong? Or did Zikara type the coding wrong by mistake?

Here is the code I'm using:

<font size="6" color="maroon" face="fantasy"><a onclick="PostBack(&#39;FollowLink&#39;,&#39;1&#39;);return false;" href="#"></font>

Please help me. I want to make a good first impression on the site.

Creative Link. Please Help.

10 years ago

Yeah, there's a number of things wrong.

For starters, you have no text for them to click.

Next, you don't close your link (the <a>).

<font size="6" color="maroon" face="fantasy"><a onclick="PostBack(&#39;FollowLink&#39;,&#39;1&#39;);return false;" href="#">CLICK ME<a/></font>

You should also be able to use single quotes ( ' ) fine, so I'm not sure why you are using the codes.

Creative Link. Please Help.

10 years ago
Try that code^

(Maybe change the codes to single quotes too)

Creative Link. Please Help.

10 years ago
But on the last part, if you copy and paste that code, be sure to switch the < a/> to < / a> (without the spaces)

Creative Link. Please Help.

10 years ago
Ah, that's right. <'a/> should be <'/a>

Creative Link. Please Help.

10 years ago

In the rich text editor, there should be a "source" button that reveals the HTML formatting of the page. Make sure you're putting the code in the source. If you don't, it will get reformatted as text.

Creative Link. Please Help.

10 years ago

thanks. I'll try that.

Creative Link. Please Help.

10 years ago

I put in the code and used Killa's "CLICK ME" to test it, and all it's doing is showing the "CLICK ME" without my being able to click on it or anything. The link isn't working. Can you help me with that?

Creative Link. Please Help.

10 years ago
The part of that link that starts with POSTBACK needs to be changed to match your own story. Did you read in the help instructions part where to get that code from?

Creative Link. Please Help.

10 years ago

No, I'm fairly new and I'm not very good at navigating yet. What do you mean change the POSTBACK to match my own story? I'm confused...

Creative Link. Please Help.

10 years ago

The source of your page doesn't show any link tags. Make sure the "CLICK ME" text is exactly this:

<a onclick="PostBack('FollowLink','1');return false;" href="#">CLICK ME</a>

Creative Link. Please Help.

10 years ago
You need to change the 1 in the above post to whatever the actual link number is.

Creative Link. Please Help.

10 years ago

And how do I know what number link it is? Is it just whatever one comes first is 1 or.....?

Creative Link. Please Help.

10 years ago

OK! The link is working, I'm just having trouble getting the text to the center of the page, getting the right color (which isn't showing up) and putting it into the right font (fantasy). A little help? The link is fine, it works perfectly.

Creative Link. Please Help.

10 years ago
Just use the font stuff you posted in the original post. This time though, make it only go around the word click me. And if it doesnt work, paste what you have here.

Creative Link. Please Help.

10 years ago

Ok so something like this should work right?

<font size="6" color="maroon" face="fantasy"><a onclick="PostBack('FollowLink','1');return false;" href="#">CLICK ME</a></font>

Is this what you mean?

Creative Link. Please Help.

10 years ago

Nope, not working. Crap, what the hell am I supposed to do?

I totally SUCK at coding, and while this might be simple for some of you, for me it's about as difficult as climbing Mount Everest with a hippo on my back! (not that that has happened of course, but you get what I mean!)

Creative Link. Please Help.

10 years ago
Try this: < center>< a style="font-size: 250%; color: #800000;" onclick="PostBack('FollowLink','1');return false;" href="#">CLICK ME< /a>< /center>

Just be sure to remove the spaces after each less than sign...

Creative Link. Please Help.

10 years ago

And if you're going to use CSS, you might as well go all the way and add the fantasy fonts and get rid of the center tags.

<a style="font-family: fantasy; font-size: 250%; text-align: center; color: #800000;" onclick="PostBack('FollowLink','1');return false;" href="#">CLICK ME</a>

Creative Link. Please Help.

10 years ago
Funny thing is -- I tried that exact code in a story box here, and it didn't work -- it didn't center it. It only actually centered it when I used the center tag. I just tried it again using that code you pasted, and it still won't center for me.

Creative Link. Please Help.

10 years ago

Huh.

<a>CLICK ME</a>
<a style="display: block;">CLICK ME</a>

Looks like formatting it as a block element works.

<a style="display: block;font-family: fantasy; font-size: 250%; text-align: center; color: #800000;" onclick="PostBack('FollowLink','1');return false;" href="#">CLICK ME</a>

Creative Link. Please Help.

10 years ago
I have a hard time sympathizing with you when you don't follow the basic things we tell you.

Like how the '1' part of your code is likely wrong and that you need to change it.

Go back and read Zikara's article, because she explains how to find out what the number is.

You also need to actually say what isn't working, as simply saying "it doesn't work", isn't enough info. Is the link not showing? Is it not going anywhere? I'd recommend just using the basic text editor, because the rich text editor has a bad habit of messing things up for no reason.

Creative Link. Please Help.

10 years ago

Sorry, I'm just getting confused with the simple things. I write things I don't code things. 

What I mean is that the text is showing up, but it isn't clickable like it should be, and the font and color don't show up at all. 

BradinDvorak, you're just confusing me more, man. Let me tell you guys EXACTLY what I'm doing, kk?

I used this exact code in order to create the link (as a test):

<a onclick="PostBack('FollowLink','1');return false;" href="#">CLICK ME</a> 

And this exact code for the color, font, and font size:

<font size="6" color="maroon" face="fantasy">

The '1' in the link coding DID WORK when I just put that string of code in there. It was clickable and it went to the right page. It's only when I try to add the customization code does it not work. I'm putting the code like this into the source:

<font size="6" color="maroon" face="fantasy"><a onclick="PostBack('FollowLink','1');return false;" href="#">CLICK ME</a>

It didn't work, so I tried to do it like this:

<font size="6" color="maroon" face="fantasy"><a onclick="PostBack('FollowLink','1');return false;" href="#">CLICK ME</a></font> 

Because THAT'S what I thought you meant by "put this code around the code" or however you worded it. Obviously I thought wrong.

Someone told me not to use the rich text editor early in this post, but then someone told me to put the code in the source, and the source button doesn't show up without the rich text editor. I got really confused and I think I might've fucked up big time. If someone could just tell me, plain and simple, the code to use and where exactly to put it and whether or not to use the rich text editor, then I'll be able to understand and I'll owe you a big one. And sorry for being so stupid, like I said, I'm not great at all this coding stuff. I'm probably getting in over my head trying to code something like this for my first storygame. I just want to make a good first impression, buuuuuuuuuuut it doesn't look too good does it? -slaps face (embarrassed)- 

Creative Link. Please Help.

10 years ago

Sorry if the whole "source" thing is confusing. The rich text editor is designed to show you your page as it would appear in the story viewer; it formats the text for you. The "source" button allows you to view the HTML of that page. When you turn off the rich text editor, it displays the source all the time, so there's no need for such a button. Honestly, it's your choice whether you use it or not, but we'd recommend turning the rich text editor off, because, as Killa said, it has a tendency to mess up HTML coding.

As for the code itself, it seems like the "font" tag is giving you trouble. The final code you posted looks correct to me and it should work (though the font tag is technically obsolete), but since it doesn't, Ogre and I seem to have come up with a solution:

<a style="display: block;font-family: fantasy; font-size: 250%; text-align: center; color: maroon;" onclick="PostBack('FollowLink','1');return false;" href="#">CLICK ME</a>

Creative Link. Please Help.

10 years ago

Alright, thanks for the explanation. The basic text editor is the equivalent of viewing the rich text editor in source mode. You'd literally see the code, and when you play the game the code would become the link. Interesting that the 1 works. I guess the link you made it for is the first link in your story (happy coincidence).

I notice the font on some of your code is weird, so that may be part of the problem.

[a onclick="PostBack('FollowLink','1');return false;" href="#"][font size="6" color="maroon" face="Fantasy"]CLICK ME[/font] [/a]

Try the above code, but replace the square brackets, the [ and ], with < and > ones. I'm working in the basic editor, so I can't actually post the code normally without it actually turning into the link, lol.