Using the docs for reference, if you want to use ARG in FROM, ARG must be the first line in your Dockerfile (as reminded by koby.el's answer) and FROM must come immediately after. See this section for details.
This minimal Dockerfile works:
ARG url=docker-local.artifactory.com/projectA FROM $url
Built using this command with a build arg:
docker build -t from --build-arg url=alpine:3.9 . [+] Building 0.1s (5/5) FINISHED => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 116B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/alpine:3.9 0.0s => CACHED [1/1] FROM docker.io/library/alpine:3.9 0.0s => exporting to image 0.0s => => exporting layers 0.0s => => writing image sha256:352159a49b502edb1c17a3ad142b320155bd541830000c02093b79f4058a3bd1 0.0s => => naming to docker.io/library/from
The docs also show an example if you want to re-use the ARG value after the first FROM command:
ARG url=docker-local.artifactory.com/projectA FROM $url ARG url RUN echo $url