Hi, everyone,
  I met with a strange problem today, see following code:
 
      BranchGroup br = new BranchGroup();
      MediaContainer mediacontainer = loadSoundFile("background.wav");
      BackgroundSound backgroundsound = new BackgroundSound(mediacontainer, 1.0f);
 
      TransformGroup tg = new TransformGroup();
         tg.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
         tg.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
      tg.addChild(backgroundsound);
      br.addChild(tg);
 
I don't know why the system always warns me: javax.media.j3d.RestrictedAccessException: Group: only a BranchGroup node may be added.
 
 
Anyone can help me to solve this problem? It will help me much.
 
 
 
 
Best regards,
 
 
 
Chaohui

Reply via email to