List Info

Thread: Flash 8 Asset




Flash 8 Asset
user name
2006-10-26 16:27:35
hi elia,

you already can catch any events dispatched by flash by
using setCallBack.
components or your own. which is very powerful because you
could pass 
any flash object/variable through the event object.
there is also an article by mark jonkman on adobe.com.

on beginSprite(me)
  _rSprite = sprite(me.spriteNum)
  _bInitialized = false
  _foEventListener = 0
end beginSprite

on init(me)
  if not(_bInitialized) then
    _bInitialized = true
--the component e.g. a combobox in _root named combo
    mycombo= _rSprite.combo
--create listener
    _foEventListener =
_rSprite.newObject("Object") 
--add empty property
    _foEventListener["change"] = 0  
--set the callback
    _rSprite.setCallBack(_foEventListener,
"change", #combochanged, me)  
--addlistener
    mycombo.addEventListener("change",
_foEventListener)
  
  end if
end init

on combochanged(me, foListenerObject, foEventObj)
--catch the changed event
  put foEventObj["target"].selectedItem.data
end

on exitframe me
    me.init()
end

greetz

joerg



Elia Morling schrieb:
> Any news if component events will work soon with the
Flash 8 Asset?
>
> Thx
> Elia
> _______________________________________________
> dirGames-L mailing list  -  dirGames-Lnuttybar.drama.uga.edu
> http://nuttybar.drama.uga.edu/mailman/listinfo/dirgames
-l
>

_______________________________________________
dirGames-L mailing list  -  dirGames-Lnuttybar.drama.uga.edu
http://nuttybar.drama.uga.edu/mailman/listinfo/dirgames
-l
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )