I could be wrong, but my understanding of most laws regarding advertising to kids is: It's OK to run ads on media consumed by kids (so long as those ads aren't for inappropriate things like alcohol or cigarettes or adult chat, etc). It's NOT OK to try and pressure/trick/cajole/persuade/influence or otherwise actually target those kids in the ads. It's a weird distinction, but it's what allows ads to still run on daytime television and during children's programming.
For example, you can have an ad that happens to show a toy being played with (I think). You can't have an ad that tells kids to ask their mom and dad to buy it right away.
There's a lot of nuance in between, but I've never bothered to master it because as a matter of principle I refused to be involved in any marketing aimed at kids. Life's too short to feel that kind of guilt.