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

#1 2012-08-03 11:49:52

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

iOS/JavaScript coding questions

This is a somewhat advanced question about iOS and JavaScript. I am hoping to be able to use this in a future (unstarted) HTML5/JavaScript game similar to Guitar Hero or Rock Band.

Before people tell me to go to Coder's Shed, I just want to say that some of the people I hope can answer my question are less active/not active on there than they are here.

Basically, a browser based game based on Guitar Hero. To avoid any legal issues or anything, I want to be able to use the user's music library (including music from another app like Rhapsody or Spotify) instead of music included with the game. People could then translate the songs into the needed information using a built in sequencer, and it would play the notes in sync with the song.

The thing I need to ask is wether it is possible to access the volume controls and pause/play controls in JavaScript. I know it is possible in native Obj-C applications, (in fact the app can have access to the whole music library) and I also know that the Nitro JS engine in Webkit compiles JavaScript into native code. I was wondering if it was possible to use that to pause/play the music player.


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#2 2012-08-03 11:53:53

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: iOS/JavaScript coding questions

Mmmm... No.


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#3 2012-08-03 15:36:54

GameHutSoftware
Scratcher
Registered: 2010-04-24
Posts: 1000+

Re: iOS/JavaScript coding questions

Try Stack Overflow.

Last edited by GameHutSoftware (2012-08-03 15:37:15)


Lurking more than posting, but still here.

Offline

 

#4 2012-08-03 15:58:01

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: iOS/JavaScript coding questions

I don't think so, sorry. It would be a pretty big security concern were JS (or other web scripting languages) able to mess around with the host device.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

Board footer