action to set properties on all hotspots

  • Klaus,

    Further to what Michel has posted.

    The action to create the hotspots is not called in 'onviewchange'. It is called at as part of the action called in the 'onstart'. The action to hide the hotspots when not in POV is called in the 'onviewchange', which has no looktos/waits etc and only some maths and set the hotspots alpha. The action names are similar I should change one of them.

    Michel has found the problem was my action to then hide the graphic hotspot when the user enters the original polygonal hotspot. We removed this action and the 'relic' hotspot problem seems to have gone away i.e. the action is creating the right number of hotspots with graphics on them.

    The problem is now I can't have my action to hide the graphic hotspot when you rollover the polygonal hotspot, which I need (please see Michels posts above).

    Any ideas on how to solve this problem?

  • Hi viewinz,

    Zitat

    Michel has found the problem was my action to then hide the graphic hotspot....

    No really true... *g* *sad* *wacko*

    Notice this: the hs_text_graphic_off() action seems to have some effect with the relic hotspot problem (post ref. ).... But it is not the exclusive cause of the problem.... as I explain on my last post , you can let it unchanged and then make some modification on the hs() action and you reach the same effect: get the hotspot.count correct....

    All this really strange things... that I do not understand.... I only note...

    Salut.

  • Michel - thank you for your help. All is working great now, with both the lookto and the graphic_off action working. I must have changed something somewhere which is not longer causing the problem.

    Klaus, thanks for sending the updated swf.. it threw up another load of errors so I've just kept the version I have which is now all working great.

    I've got quite confident with this action and used it to automatically create map spots, populate comboboxes and a few other things so thanks all for your help!

  • Hi viewinz,

    Give me a beer *g* ... I am going to explain something that you will interested I think *smile* ...
    Seems to have a way to solve the relic hotspot problem *attention*

    I think all comes from the events.onloadcomplete.... It make the call to the loop_all_hotspots() action when a new scene is loaded and, for some reason that I do not know, it create the relic hotspot....
    So, I have changed your hs() action code, that is the one makes the loadscene() action, setting the events.onloadcomplete to null at the begining, restoring it at the end after calling the loop_all_hotspots() action....
    The hs() action code becomes like this:

    The rest of your code stay unchanged.... And all your features are functional...

    Anyway, I still do not understand why the relic hotspot it is created....

    I see you have solved the problem too... how?

    Salut.

  • Hi,

    Klaus, thanks for sending the updated swf.. it threw up another load of errors so I've just kept the version I have which is now all working great.

    what errors did you get?

    about the problem itself - I think the problem were the onviewchange event - it was called on every small change, normal not a problem, but when a lookto() action is running the execution of actions is blocked, and in this case the actions were queued for later execution, and the number of this queued actions becomes just too much,
    when you use a DEBUG flashplayer plugin you will see an error from it, and when this error happens the following states are undefined...

    best regards,
    Klaus

  • Cheers Klaus, I've restricted the number of times that gets called and it seems to have helped. Something has changed which means there is no longer a problem as long as I inadvertently don't change it back I should be OK! I've used this method on a few things now which has worked really well, I'm really happy with it. I'm using it for combo box and map spots in this site.

    Thanks for such a thorough investigation.

  • Hi all,

    I think the problem were the onviewchange event - it was called on every small change,

    Note that in my last post the events.onviewchanges stays unchanged... only the events.onloadcomplete is changed... and the code then works as expected without any other modification...

    Salut.

  • Hi,

    Thanks for such a thorough investigation.

    could you send me errors that you got with the test version anyway (per mail or pm)
    I would be interested to see, because there shouldn't be some

    Note that in my last post the events.onviewchanges stays unchanged... only the events.onloadcomplete is changed... and the code then works as expected without any other modification...

    yes, I've seen, that could fix it too of course

    but I think the 'real' problem was that there were just too much actions that must be executed at once,
    the 'loop_all_hotspots' action were called very often and it contains a lot of (looping) code, so removing
    it one time could be the help,

    (the current version executes the actions in an recursive way, which lets the flashplayer crash internally
    when too much actions were to execute at once (over 2000! ), this 'crash' will be only visible with
    the DEBUG flashplayer, but I have changed that now for the next version, now the actions were executed in an iterative way, and this problem can't happen anymore in that way)

    best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!