Announcement

Collapse
No announcement yet.

[solved] CLIK components and movieclip events

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [solved] CLIK components and movieclip events

    Hi there,

    to be honest I really start to hate Scaleform for more than one reason, so I hope to find some assistance with my current problem. I am trying to build a simple inventory bar at the bottom of the screen (like most point&click adventures). So far I managed to get a basic mouse interface via Scaleform and it's working ... except for one thing:

    There is no hit detection for HUD elements, whenever I click a button I also click inside the game world.

    I read about this issue in several threads:
    http://forums.epicgames.com/threads/...uring-Gameplay
    http://forums.epicgames.com/threads/...nd-UI-for-RTS)

    So I came up with the idea to add a RollOver/Out event for the movie clip containing all my inventory elements (background, buttons, etc.):

    Code:
    inventory_mc.onRollOver = function() {
    	ExternalInterface.call("HitInventory", true);
    }
    
    inventory_mc.onRollOut = function() {
    	ExternalInterface.call("HitInventory", false);
    }
    While I solve the inital problem with this, every CLIK element stops working. Since I am not really familiar with Flash and ActionScript, I really hope someone can explain me why this is happening and how I can fix it.

    Thank you!

    #2
    It's hard to tell without seeing your actual Flash file. But if you put every CLIK component into one movieclip and add a Roll Over listener to it then the inventory_mc will get all the Roll Over events. So the CLIK components won't receive any Roll Overs and they won't work. Try to add Roll Over/Out events to each and every component.
    It's not a Scaleform issue its a AS2 'feature'.

    Comment


      #3
      Thank you piotrO!

      Seems like AS2 has some nice 'features'

      Comment

      Working...
      X