PS3 Javascript Functionality|PS3 Themes|Forum|PS3 Themes

Avatar
Please consider registering
guest
sp_LogInOut Log Insp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSSsp_TopicIcon
PS3 Javascript Functionality
Avatar
jbnelle
New Member
Members
April 28, 2012 - 4:54 pm
Member Since: April 23, 2012
Forum Posts: 2
sp_UserOfflineSmall Offline

Greetings All,

I am new to the site and created my first animated theme just the other day (Scarface Animated).
In building my theme, I decided to utilize custom functions with PS3 javascript as opposed to
GlowBall's template or Dynamic Theme Editor, both of which have been used to create some fantastic themes.

@GlowBall: Many kudos to you sir on your excellent animated theme tutorial. It helped me immensely in understanding
the components involved and how they fit together to create an animated theme.

All of this started me thinking about what custom javascript functionality that others may have employed in their own themes.

An example in my own theme, I needed to have five gunshots execute at a set interval a set number of times and then stop.
This was not possible using IntervalTimer because it cannot be reassigned or stopped once started. So I came up with a
function that allowed me to accomplish what I needed using a series of OneShotTimers:

function SetIntervalTimer(interval, timerID, timeInSeconds, functionName)
{
if(interval === 0) //Zero for continous loop
{
System.timer[timerID] = new IntervalTimer(timeInSeconds, functionName);
}
else //Run for a set number of times
{
for(var i = 0; i < interval; i++)
{
System.timer[timerID + i] = new OneShotTimer(timeInSeconds * (i + 1), functionName);
}
}
}

I would be curious to see what others have come up with. Perhaps we can use this topic as an exchange of ideas?

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 145
Currently Online:
Guest(s) 5
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Member Stats:
Guest Posters: 302
Members: 326486
Moderators: 0
Admins: 1
Forum Stats:
Groups: 1
Forums: 3
Topics: 1244
Posts: 4637
Newest Members:
TimothyTrert, FredRoode, maximewhite29, Michaelshili, ViktorSinatorov0Rib, Ilyiajew
Administrators: PS3 Themes: 128