You can add these things, but they must be added to a
branchgroup before being added to a live scene. ie To
add a behavior to a live scene use:
MyBehavior mybehavior=new MyBehavior();
BranchGroup adderGroup=new BranchGroup();
adderGroup.addChild(mybehavior);
liveScene.addChild(adderGroup);
hope this helps.
--- Rick Livesey <[EMAIL PROTECTED]>
wrote:
> Hi all,
>
> Sorry if this is the wrong place for programming
> issues but I'm new to
> this game.
>
> I'm having problems adding objects to a scene graph
> at runtime.
> I keep getting the Restricted Access error, saying
> that I can only add a
> Branch Group.
>
> This I've tried, together with setting all the
> capabilities to allow, reads, write, children
> r+w, children extends, but non have worked.
>
> I was under the impression that it was possible to
> use 'addChild(node)'
> during runtime , to add an object to a Group or
> TransformationGroup, so
> long as the appropriate capabilities were set for
> that group.
>
> For example , surely it's possible to have a program
> with AWT
> interaction, that allowed the user to add, say, a
> sphere every time a
> button is pressed?
>
> Any help or examples would be gratefully
> appreciated.
> Thanks
>
> Rick Livesey
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED]
> and include in the body
> of the message "signoff JAVA3D-INTEREST". For
> general help, send email to
> [EMAIL PROTECTED] and include in the body of the
> message "help".
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".