PDA

View Full Version : any ideas how to flip the getcamera function???


vin23
08-13-2007, 02:58 AM
hey people

im making a game atm, using the webcam input in flash, i want to be able to use the random function to randomly flip the camera zertically, horizontially, after 10 seconds into the game, flipping maybe like every 5 secs, any ideas???

this is my code for the set up of the camera, the camera name in "output"

max=7
cam=Camera.get()

cam.onStatus=function(e)
{
//if we are given permission
if(e.code == "Camera.Unmuted")
{
//start the application
initialize()
}
else
{
System.showSettings(3)
}
}
//if there are no Cameras
if(cam == null)
{
System.showSettings(3)
}
else
{
output.attachVideo(cam)
}


cheers

sirebral
08-23-2007, 05:40 AM
try attaching your video output to a movieclip and then using this code:

function flip()
{
movieclip_holding_camera_output._xscale = -100

}

my_Interval = setInterval(flip, 5000)


hey people

im making a game atm, using the webcam input in flash, i want to be able to use the random function to randomly flip the camera zertically, horizontially, after 10 seconds into the game, flipping maybe like every 5 secs, any ideas???

this is my code for the set up of the camera, the camera name in "output"

max=7
cam=Camera.get()

cam.onStatus=function(e)
{
//if we are given permission
if(e.code == "Camera.Unmuted")
{
//start the application
initialize()
}
else
{
System.showSettings(3)
}
}
//if there are no Cameras
if(cam == null)
{
System.showSettings(3)
}
else
{
output.attachVideo(cam)
}


cheers