Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
tangomidia
tangomidia's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Draw a mask with video background in play
[2 Replies]
15-Oct-2011 10:10 PM
Forum:
Core Library Questions
Hello world, i want to create a applet with mask with video background in play
i have this code:
import processing.video.*;
Movie myMovie;
public static int SQUARE_WIDTH = 20;
public static int SQUARE_HEIGHT = 20;
PImage img1, img2;
void setup() {
size(640, 480);
myMovie = new Movie(this, "001.mov");
myMovie.speed(1);
myMovie.play();
img1 = loadImage("glow1.jpg");
img2 = loadImage("glow2.jpg");
image(img1, 0, 0);
}
void movieEvent(Movie myMovie) {
myMovie.read();
}
void draw() {
//copy(img1, constrain(mouseX-SQUARE_WIDTH/2, 0, width), constrain(mouseY-SQUARE_HEIGHT/2, 0, height), SQUARE_WIDTH, SQUARE_HEIGHT, constrain(mouseX-SQUARE_WIDTH/2, 0, width), constrain(mouseY-SQUARE_HEIGHT/2, 0, height), SQUARE_WIDTH, SQUARE_HEIGHT);
copy(myMovie,constrain(mouseX-SQUARE_WIDTH/2, 0, width),constrain(mouseY-SQUARE_HEIGHT/2, 0, height), SQUARE_WIDTH, SQUARE_HEIGHT, constrain(mouseX-SQUARE_WIDTH/2, 0, width), constrain(mouseY-SQUARE_HEIGHT/2, 0, height), SQUARE_WIDTH, SQUARE_HEIGHT, ADD);
}
but, when i draw the video appears in portion, i need the video in background in play all time. I want to discover the video when the mouse is over
Tks
«Prev
Next »
Moderate user : tangomidia
Forum