We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, i'm importing some .svg and i used the MouseFuncion\Examples\Processing.org script, the problem is that when running the script all the shapes appears in the same position and so i can only move all togheters. There's any way to impose a starting position for each shape? or to create a kind of levels(like adobe illustrator)
here's the link of the example http://processing.org/examples/mousefunctions.html
best, Filippo
Answers
Have you some code to show, so we understand more precisely your problem?
here you are!
You should have xOffset / yOffset per shape.
thanks! ;)
Hey... now at
void mouseReleased() {
it sayunexpected tonken: void
Can you please comment where i'm falling? What's happening? i'm not a good programmer, sorry... thank you so much!best, Filippo
You've forgotten to close curly brace pair for the 1st
if () {}
block within mouseDragged()! :-Sahauauah! Ok, i know now i'm looking so stupid but i'm more stupid than you can imagine becouse i really don't understand what's PhiLho sayin'... can someone show me where i have to put xOffset / yOffset, is that a math operation or just to say both of them? Sorry i'm bad in english and very very new to forums and programming... :((
No, i wasn't stupid, it wasn't the solution. The solution is to create a class for each drag...
best, Filippo
xOffset and yOffset are variables in your code, already there, you need one for each shape, like you duplicated other variables.
I avoid suggesting to do classes to beginners, because it can be even more confusing. But if you chose this way, all the best!
Sorry but i miss you definition of 'duplicated' , creating xOffsetA and xOffsetB isn't duplicating? 8-X