attach to runtime: video but no sound

View: New views
3 Messages — Rating Filter:   Alert me  

attach to runtime: video but no sound

by Marco-71 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi List,

I'm trying to get a flv playing but I failed all time. I've got a video object that is included in a videoContainerMc. Tracing the video shows that the object is right up there. The sound works fine but any picture is displayed.

The problem only occurs if my videoContainerMc (where the video is in) is placed on a movieclip that was dynamicly attached to runtime and was binded to a class. 

like
mc = WidgetSelectorItemForm (attachMovie ( WidgetSelectorItemForm.symbolName, "WidgetSelectorItemForm"+i, this.getNextHighestDepth() ) );

class
class quovadis.MainApplication.receiver.view.WidgetSelectorItemForm extends ArpXXForm
{

public static var symbolName:String = "WidgetSelectorItemForm";
public static var symbolOwner:Function = WidgetSelectorItemForm;
public static var symbolLinked = Object.registerClass(symbolName, symbolOwner);

...

}


If the videoContainerMc is located on a "normal class" that was not created to runtime all works fine and the video is playing.


anybody an idea what I do wrong?

best wishes,

marco




--
MTASC : no more coffee break while compiling

Re: attach to runtime: video but no sound

by jannerick :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi marco,

the problem is with the Object.registerClass, you must not register the
class in the class itself, but in the class from where you build the object.


like
Object.registerClass(WidgetSelectorItemForm.symbolName,
WidgetSelectorItemForm);
mc = WidgetSelectorItemForm(attachMovie
(WidgetSelectorItemForm.symbolName, "WidgetSelectorItemForm"+i,
this.getNextHighestDepth() ) );

class
class quovadis.MainApplication.receiver.view.WidgetSelectorItemForm
extends ArpXXForm {

  public static var symbolName:String  = "WidgetSelectorItemForm";
  ...
}


Marco Frank schrieb:

> Hi List,
>
> I'm trying to get a flv playing but I failed all time. I've got a video
> object that is included in a videoContainerMc. Tracing the video shows
> that the object is right up there. The sound works fine but any picture
> is displayed.
>
> The problem only occurs if my videoContainerMc (where the video is in)
> is placed on a movieclip that was dynamicly attached to runtime and was
> binded to a class.
>
> like
> mc = WidgetSelectorItemForm (attachMovie (
> WidgetSelectorItemForm.symbolName, "WidgetSelectorItemForm"+i,
> *this*.getNextHighestDepth() ) );
>
> class
> *class* quovadis.MainApplication.receiver.view.WidgetSelectorItemForm
> *extends* ArpXXForm
> {
>
> *public* *static* *var* symbolName:*String* = "WidgetSelectorItemForm";
> *public* *static* *var* symbolOwner:*Function* = WidgetSelectorItemForm;
> *public* *static* *var* symbolLinked =
> *Object*.registerClass(symbolName, symbolOwner);
>
> ...
>
> }
>
>
> If the videoContainerMc is located on a "normal class" that was not
> created to runtime all works fine and the video is playing.
>
>
> anybody an idea what I do wrong?
>
> best wishes,
>
> marco
>
>
>

--
MTASC : no more coffee break while compiling

Re: attach to runtime: video but no sound

by Marco-71 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi jannerick,
very nice dude, it works now pretty well :)

it's very curious, I'd never heard about to register the class before  
attaching.
So I did it always wrong... like the most samples I found on the web.

thx alot,
marco

Am 28.05.2007 um 12:59 schrieb jannerick:

> hi marco,
>
> the problem is with the Object.registerClass, you must not register  
> the
> class in the class itself, but in the class from where you build  
> the object.
>
>
> like
> Object.registerClass(WidgetSelectorItemForm.symbolName,
> WidgetSelectorItemForm);
> mc = WidgetSelectorItemForm(attachMovie
> (WidgetSelectorItemForm.symbolName, "WidgetSelectorItemForm"+i,
> this.getNextHighestDepth() ) );
>
> class
> class quovadis.MainApplication.receiver.view.WidgetSelectorItemForm
> extends ArpXXForm {
>
>   public static var symbolName:String  = "WidgetSelectorItemForm";
>   ...
> }
>
>
> Marco Frank schrieb:
>> Hi List,
>>
>> I'm trying to get a flv playing but I failed all time. I've got a  
>> video
>> object that is included in a videoContainerMc. Tracing the video  
>> shows
>> that the object is right up there. The sound works fine but any  
>> picture
>> is displayed.
>>
>> The problem only occurs if my videoContainerMc (where the video is  
>> in)
>> is placed on a movieclip that was dynamicly attached to runtime  
>> and was
>> binded to a class.
>>
>> like
>> mc = WidgetSelectorItemForm (attachMovie (
>> WidgetSelectorItemForm.symbolName, "WidgetSelectorItemForm"+i,
>> *this*.getNextHighestDepth() ) );
>>
>> class
>> *class* quovadis.MainApplication.receiver.view.WidgetSelectorItemForm
>> *extends* ArpXXForm
>> {
>>
>> *public* *static* *var* symbolName:*String* =  
>> "WidgetSelectorItemForm";
>> *public* *static* *var* symbolOwner:*Function* =  
>> WidgetSelectorItemForm;
>> *public* *static* *var* symbolLinked =
>> *Object*.registerClass(symbolName, symbolOwner);
>>
>> ...
>>
>> }
>>
>>
>> If the videoContainerMc is located on a "normal class" that was not
>> created to runtime all works fine and the video is playing.
>>
>>
>> anybody an idea what I do wrong?
>>
>> best wishes,
>>
>> marco
>>
>>
>>
>
> --
> MTASC : no more coffee break while compiling
>


--
MTASC : no more coffee break while compiling