It's because when you use "play sprite" the next time it sees "play sprite" it tries to do the same frames as the last "play sprite" regardless of the fact they are now different frame numbers. You need to add "set sprite frame" before you use the "play sprite" command to make sure it doesn't continue to use the old values.
Also at certain points all three if/thens change the sprite frames and replays the sprite per loop. You need to change your code so that only one if/then runs at a time when it's needed... not constantly. You need only one "play sprite" command too (right under the sprite command would work).
Normally I would advise against using floats for screen coordinates but I realize you did that on purpose to slow down the movement on screen.
Because the if/thens are only run when the character goes to the limits the actual movement is in a different if/then checking for a new variable which determines what direction the character is moving.
Rem Project: SpriteTesting
Rem ***** Main Source File *****
set display mode 640,480,32
create animated sprite 1,"Girlwalking2.png",8,8,1
` Set the x and y variables
GirlX#=10:GirlY#=240
` Set the movement amount
GirlM#=0.25
` Set the starting frames
L1=1:L2=8
` This sets the starting direction ( 0=Right 1=Left )
Direction=0
do
sprite 1,GirlX#,GirlY#,1
play sprite 1,L1,L2,150
` Check the right movement limitation
if GirlX#>500
` Change the frames
L1=57:L2=64
` Change the current frame to the new frame number
set sprite frame 1,L1
` Change the direction to left
Direction=1
endif
` Check the left movement limitation
if GirlX#<11
` Change the frames
L1=1:L2=8
` Change the current frame to the new frame number
set sprite frame 1,L1
` Change the direction to the right
Direction=0
endif
` Check which direction the character is going
if Direction=0
` If the current direction is right increase the x coordinate
inc GirlX#,GirlM#
else
` If the current direction is left decrease the x coordinate
dec GirlX#,GirlM#
endif
loop
Edit: Ack beat me to it.