hey cedric if you've got code that you think 100% works on everything send
it on and i'll put it up on the link. i thought that too :)

after googling i've found stuff about looping through character names and
attaching google cameras to video objects offstage, or pulling out the name
for the usb cam on a mac if on mac OS, or even just using index 2 for the
mac. all seem a bit hacky to me. this is somethign that has worked in flash
fine for a LONG time, that now appears to be broken. what's up?

2011/9/19 Cédric Muller <flashco...@benga.li>

> Doesn't work for me, Mac, Safari 5.1 and Flash Player 10.3.181.14
>
> Could you drop the 'if (stage) init' line ?
>
> (I am asking because I have plenty of webcam examples, and they do work)
>
> hth,
> Cedric
>
> > hey all,
> >
> > i want to confirm that this...
> >
> > http://46.4.226.29/camtest/
> >
> > does not work on a mac, and in chrome 14 beta on the pc? massively simple
> > webcam example, source below...
> >
> > <code>
> > package
> > {
> > import flash.display.Sprite;
> > import flash.events.Event;
> > import flash.events.StatusEvent;
> > import flash.media.Camera;
> > import flash.media.Video;
> >
> > public class Main extends Sprite
> > {
> > private var cam:Camera;
> > private var video:Video;
> > public function Main():void
> > {
> > if (stage) init();
> > else addEventListener(Event.ADDED_TO_STAGE, init);
> > }
> > private function init(e:Event = null):void
> > {
> > removeEventListener(Event.ADDED_TO_STAGE, init);
> > // entry point
> > cam = Camera.getCamera();
> >            if (cam != null) {
> > //cam.setMode(320, 240, 30, false);
> > cam.setMode(400, 300, 30, false);
> > video = new Video(cam.width, cam.height);
> > video.attachCamera(cam);
> > cam.addEventListener(StatusEvent.STATUS, startcam);
> > addChild(video);
> > }
> > }
> > private function startcam(event:StatusEvent):void {
> > // stuff
> > }
> > }
> > }
> > </code>
> >
> > i've NEVER experienced probs with webcam before, what is going on here?
> >
> > tom.
> > _______________________________________________
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to