To start off with this topic, I like to say this:
I have been noticing this problem lately between friends.
Everyone has troubles, right? And everyone wants someone there to listen to those troubles and hopefully they can make you feel better and make them go away.
Well, sometimes that doesn't seem to happen.
When a friend comes up to you trying to talk to you, the best thing to do is listen to him/her, then try to help out. What I have noticed is that isn't what happens at times. Instead, what would happen is that at times the other person doesn't really listen to their friend and may change the subject all of a sudden. Here's an example:
Friend 1: "Man, I'm so upset... We're moving to another state and I have to leave all of my friends behind. I'm going to miss them, and I'm not even sure if I'll like the new place we're going to..."
Friend 2: "Oh yeah, that's lame. Hey, can you download this map?"
Friend 1: "...."
Yeah, not very helpful. Another thing that may happen is that the second friend may suddenly start saying things that are troubling them, and so the first friend ends up comforting them when they came seeking for comfort in the first place. Kinda gets annoying after awhile.
So, the advice I give is that if your behavior towards friends is like Friend number 2, you should listen to your friends more carefully, see if their behavior is different than normal, and if so see what's wrong and try to help out. Show them that you care and that you are there for them, for they will be there for you as well.
If your like Friend number 1, try to talk to the friend who is basically ignoring whats wrong. Perhaps they just misunderstood and thought you weren't that affected by the issue. Try explaining to them how it makes you feel and that you want to talk about it, and that they should listen to you more. ^^