MovieMaterial questions

0 views
Skip to first unread message

Yasuto

unread,
Jun 14, 2010, 5:00:16 AM6/14/10
to Away3D.dev
Greetings everyone, first post here as my company is just getting into
Away3d.

We're working on a rather simple scene but are running into a few
separate issues regarding moviematerials and collada files. Our goal
is to have a plane with a movieclip material attached. The movieclip
will house a whole bunch of buttons and interactivity, kind of like
regular flash on a plane.

Any help with the following will be much appreciated:

1. None of the event listeners in our movieclips are firing when the
material is added to a collada dae file. We're modeling a custom
'panel' that we want to apply our moviematerial to in 3d software and
then bringing into away through DAE files. When we apply the
moviematerial to the dae panel sometimes none of the event listeners
work. What's really weird is that this would change if we re-
published the swf. Sometimes it would work and sometimes it
wouldn't. This would even change between viewing the swf from the OS
or viewing the swf from a browser. Even a browser refresh would
sometimes cause the buttons to work and sometimes not.

We can't use 3d events because there will be multiple buttons and
screens that show up on the panel. Our workaround so far has been to
apply the material to an away3d plane instead, but really we'd still
like to use the DAE model.

2. We're also trying to work on a reflection in the scene, and the
reflection has to do exactly as the original movieclip does without
interactivity. So we're adding the same moviematerial to 2 panels
(original and reflection). When we do this, the mouseevents sometimes
work but what's weird is sometimes they don't fire at all. This will
happen on a refresh of the browser, where everything works, and then
it will just stop if the browser is refreshed. As an average, the
events won't fire about 1 out 5 times the browser is refreshed. The
swf isn't being republished, just a browser refresh.

Any help with these issues is greatly appreciated. I went through the
group and searched for these issues but I didn't see anything else
similar.

katopz

unread,
Jun 14, 2010, 5:20:53 AM6/14/10
to away3...@googlegroups.com
"sometimes" issue happen to me when event listener is "too weak"
so do try remove all weak in any addEventListener as possible(even in
away3d libs if need)
and also use private function instead of local scope function eg.

// weak case 1
addEventListener(some_event, onSomething, false, 0 ,true );

// weak case 2
addEventListener(some_event, function():void{doSomething()});

// weak case 3 inside function scope
var _function:Funtion;
addEventListener(some_event, _function);

if process wait too long and gc clean it before thing done, no event
will fire easy as that
so, do try declare event handler function as private function instead
should help

hth


--
Regards
-----------------------------------------------------------
katopz, http://sleepydesign.com
Away3D and JigLibFlash Developer Team

Yasuto

unread,
Jun 14, 2010, 5:53:26 AM6/14/10
to Away3D.dev
Hi Katopz,

Thank you for the quick reply. I understand what you're saying about
the 'weak' handlers, but how do I write a handler that is 'strong'? I
generally write listeners as your '//weak case 1', but not sure how to
write a handler as 'strong'.

Also, very weird how even with the same swf we can get completely
different results. Is this because of the way we're writing listeners
as well?

katopz

unread,
Jun 14, 2010, 6:03:46 AM6/14/10
to away3...@googlegroups.com
here's strong one
addEventListener(some_event, onSomething);

don't be amaze, even "-debug=true/false" can produce diff
result/freeze loader to fire event "complete"

but in case it's random happen, so i didn't submit to adobe JIRA bug
base just yet ;p

trust me, i'm always use all weak before for gc, but after face this problem
i make it weak case by case after that ;)

hth

On 14/06/2010, Yasuto <yasut...@gmail.com> wrote:

Reply all
Reply to author
Forward
0 new messages