might be that you need the full path to your flag texture, make sure it is also sized in 2^.
So instead of setflagtexture "cos1.jpg", you would have setflagtexture "upstairs\inmybedroom\underthebed\cos1.jpg"
256 X 256 is about normal.
Edit: Just realised you are trying to use the us flag pole, this comes complete with us flag, so not sure what the result of that would be.
You need to use the empty flagpole, "FlagCarrier".
pole = "FlagCarrier" createvehicle getpos player; pole setFlagTexture "cos1.jpg"
presuming the texture is in your mission folder.
Planck