This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2009-03-18 18:20:49

maxsteele2
Scratcher
Registered: 2007-10-30
Posts: 28

I need help w. embedding...

I'm working on my website (maxsteele2.pbwiki.com, for those who wonder), and I can't embed projects so they can all be an the same page, all running at once, because the sound would mix. So my problem is, I want a drop-down list in which selecting an option changes the current project to that one, but I don't know how to do one. Archmage, andresmh, JSO, PetertheGeek, nikkiperson2, or anybody really, your help would be greatly appreciated. Plz help me! I'll reward you with a music video for Green Day's Castaway.


"All the war-propaganda, all the screaming and lies and hatred, comes invariably from people who are not fighting." George Orwell, author

Offline

 

#2 2009-03-18 19:53:46

technoguyx
Scratcher
Registered: 2008-10-18
Posts: 1000+

Re: I need help w. embedding...

Does your website support, say, subpages? If so, you could make one of each project.

If not, try making a page hidden from the manu, only accesible by a link on the games page.

And if you do that, no music video for me, please.


http://getgnulinux.org/links/en/linuxliberated_4_78x116.png

Offline

 

#3 2009-03-18 21:32:37

techy
Scratcher
Registered: 2008-12-17
Posts: 100+

Re: I need help w. embedding...

It might be hard, but I would try to use javascript or just do what technoguyx said


Guppy Inc. making projects famous!
http://web-geeks.com/techy.gifhttp://web-geeks.com/grid.gifhttp://web-geeks.com/challenge.gif

Offline

 

#4 2009-03-21 11:30:37

maxsteele2
Scratcher
Registered: 2007-10-30
Posts: 28

Re: I need help w. embedding...

technoguyx wrote:

Does your website support, say, subpages? If so, you could make one of each project.

If not, try making a page hidden from the manu, only accesible by a link on the games page.

And if you do that, no music video for me, please.

I actually want them all on one page, but only one is visisble at the same time. Any clues?


"All the war-propaganda, all the screaming and lies and hatred, comes invariably from people who are not fighting." George Orwell, author

Offline

 

#5 2009-07-17 17:59:23

cool_nt3
Scratcher
Registered: 2009-07-15
Posts: 100+

Re: I need help w. embedding...

How about using javascript like techy said? (i know some web programming languages)  neutral


See my word assembler! | True or False?
Did You Know? I have gotten tired of the previous sig!

Offline

 

#6 2009-07-17 20:28:13

billyedward
Scratcher
Registered: 2008-01-03
Posts: 500+

Re: I need help w. embedding...

Okay, here's how I'd do it:
First you get the embed code for each project you want.
Then, you make a <div> element for these, with the code for the default inside it.
Also, you make a drop-down menu, such as:

Code:

<select>
<option name='project1'>project1</option>
<option name='project1'>project1</option>
</select>

You then add an onchange attribute to the select tag, referring to a javascript function.
This function would then take the current selected option, and change the innerHTML property of the div tag accordingly!
Ex:

Code:

function changeProject()
{if (document.getElementById('optionsList').tabIndex == 0)
{document.getElementById('projectDiv').innerHTML = 'code to embed desired project'};
else if (document.getElementById('optionsList').tabIndex == 1)
{document.getElementById('projectDiv').innerHTML = 'code to embed desired project'};
else (document.getElementById('optionsList').tabIndex == 2)
{document.getElementById('projectDiv').innerHTML = 'code to embed desired project'};
}

"I'd love to change the world, but they haven't released the source code yet."
Check out the latest version of Streak --> http://billy.scienceontheweb.net/Streak

Offline

 

Board footer