@Melonlity -- I think both scenarios you've laid out are clever marketing, but I don't know that I'd call them advertising directly to children. In the second scenario, the stadium sponsorship isn't strictly advertising to kids because the computer company is looking to reach an entire community rather than a bunch of children. In other words, that is advertising in a loose sense of the word, but the target audience isn't necessary children -- XYZ wants to get the attention of parents and people in the community rather than just children.
In the second scenario, computer companies regularly offer preferred pricing to school and there is certainly a desire to generate more retail sales as a result. However, keep this in mind -- the company is offering something of value at a price schools can afford. Those practices should be encouraged rather than branded as advertising. Yes, the kids will be more inclined to bug their parents for computers like they are using in school, but the benefit -- inexpensive computers for schools -- outweighs the ethical considerations of allowing that company access to impressionable children.