We are about to switch to a new forum software. Until then we have removed the registration on this forum.
1) Button that changes image - (got it)
2) add a button with multi selector several choices of social media - (need it)
3) user selects images and selects social media and post it - (need it)
4) post has link back to original site - (need it)
Answers
So what do you have so far?
Starting from scratch. I have this.
var fet = [];
function preload() { for(var i =0; i< 7; i++){ fet[i] = loadImage('notes/notes_' + i + '_white.png'); }
}
function setup(){ createCanvas(400, 400); }
function draw(){ background(0); imageMode(CENTER); image(fet[i], 10, 10); }
function mousePressed(){ for(var i =0; i< 7; i++){ fet[i] = 'notes/notes_' + i + '_white.png'; imageMode(CENTER); image(fet[i], 10, 10); } }
Okay. So you have an array with your images in it, and you've loaded them. Which one from that array are you then displaying?
What are you trying to do in mousePressed()?!?
Here's some changes:
Now there is a current_image counter that is the index into the array. It determines which image to show. When the mouse is clicked, this index increases.
If you're going to add buttons, WHERE you click might matter - use mouseX and mouseY to determine where the click was. What happens when you click in different places?
how do you get the images to fit the canvas without distortion?
How are you getting your post on this site looking like real code?
Edit your post (gear icon in the top right corner of your post), select your code and hit ctrl+o to format your code. Make sure there is an empty line above and below your code.
Kf
add a button so user can share selected image on several choices of social media with link back to original site?
I have no idea how to attach checkbox option to social media or even if this is a way to approach it. Suggestions anyone?
This is what it looks like live for testing purposes. link.