There really is nothing magical about the way the 317 works. Let's keep all of this simple. The voltage between the output and adjust should always be 1.25 volts, provided the input voltage is high enough to keep the regulator from dropping out.
The 1.25 volts is known as the sense voltage. The more current/voltage the device we are powering requires, the more voltage we need to supply to the regulator.
Using the following formulas it is easy to calculate the resistor needed for the current we want to use.
Take the sense voltage and divide it by the current to calculate for the resistor needed. For example, lets assume the blu-ray diode will need 40ma's to lase. I believe this is a comfortable amount of current to supply it with.
1.25 divided by .040 = 31.25 ohms. Since no one makes a resistor that is exactly 31.25 ohms, we will choose the next highest value which is commonly available even at Radio Shack....a 33 ohm resistor.
Now we can calculate the current we will be driving the diode with, using the 33 ohm resistor:
Take the sense voltage and divide it by the resistor:
1.25 divided by 33 = .038ma's.
Next we need to calculate the wattage of the resistor needed. This is done by taking the sense voltage and multiplying it times the current:
1.25 times .038 = .0475 watts. As you can see the power we are using is very low so a 1/4 watt resistor will be ample.
Now I do realize that many will want to drive their blu-ray to the limit. I have taken mine as high a 55ma's...do this at your own risk. The thing with using pots is they can get dirty over time which will cause a spike possibly destroying your diode. Therefore use a resistor in series with the pot that will not cause the current to go high enough to damage the diode if it spikes. Also unless you are using a precision multi turn pot, it is easy to mistakenly turn it too high. So for the blu-ray calculate the resistor needed for 50ma's (for example) and put the pot in series with it.
I use the same ideas and formulas for driving red diodes.
All I have done here is expand on what a_pyro_is has been explaining. I hope between his explanations and mine everything will begin to make sense..