[solved] Implementing Swiff and general help ...

here you will find only solved Help topics

Moderator: 1.2 Moderators

[solved] Implementing Swiff and general help ...

Postby beingalex on Thu Mar 11, 2010 3:03 pm

Hi people,

I'm trying to write a class that implements the Swiff class but I'm not sure how to pass through the first argument (the one where you would normall give the path to the .swf file) ..

I call my class like this:

  1. new FlashPlayer(mp3, '', 'FlashPlayerContainer', 'FlashPlayer');


FlashPlayer looks like this:

  1.  
  2. var FlashPlayer = new Class({
  3.     Implements: Swiff,
  4.     initialize: function(mp3, title, container, id) {
  5.         this.mp3 = mp3;
  6.         this.title = title;
  7.         this.container = container;
  8.         this.id = id;
  9.     },
  10.     container: this.container,
  11.     id: this.id,   
  12.     vars: {
  13.         'bg': '0xf8f8f8',
  14.         'leftbg': '0x006f3a',
  15.         'lefticon': '0xffffff',
  16.         'rightbg': '0xcccccc',
  17.         'rightbghover': '0x999999',
  18.         'righticon': '0x666666',
  19.         'righticonhover': '0xFFFFFF',
  20.         'text': '0x666666',
  21.         'slider': '0x666666',
  22.         'track': '0xFFFFFF',
  23.         'border': '0x666666',
  24.         'loader': '0xdddddd',
  25.         'soundFile': this.mp3
  26.     },
  27.     width: 290,
  28.     height: 24
  29. });
  30.  


Now I'm missing where to pass the actual .swf through, normally
  1. new Swiff(base + 'swf/player.swf', { ...


Can anyone offer any help with this ? Or even a point in the right direction.

Thanks in advance

- Alex
Last edited by beingalex on Thu Mar 11, 2010 4:18 pm, edited 1 time in total.
beingalex
 
Posts: 18
Joined: Tue Oct 14, 2008 12:18 pm

Re: Implementing Swiff and general help with building a class

Postby daKmoR on Thu Mar 11, 2010 4:07 pm

this might help...
  1. initialize: function(mp3, title, container, id) {
  2.     this.parent([params for original swiff]);
  3. },
"Speak when you are angry and you will make the best speech you will ever regret." - Ambrose Bierce
User avatar
daKmoR
Site Admin
 
Posts: 860
Joined: Mon Jul 14, 2008 11:40 am

Re: Implementing Swiff and general help with building a class

Postby beingalex on Thu Mar 11, 2010 4:17 pm

That's excellent!

Thanks :D
beingalex
 
Posts: 18
Joined: Tue Oct 14, 2008 12:18 pm


Return to Solutions

Who is online

Users browsing this forum: No registered users and 2 guests