PDA

View Full Version : Clicking Madness: Not all functions fire


Scott Witte
09-13-2007, 12:01 AM
Again, is it just me or what?

In the motion tween I've been laboring over, often only one functions fires (zoom) during the onClick. Other times they all do and it seems to depend on the character of the click. A quick click usually fires just zoom. A more solid click usually fires pan, tilt and zoom. The doneFunction seems to only fire if the function calling it fires. Doesn't matter if the motion functions are packaged in a separate custom function or just part of the onClick

To see what I mean check out my test site: Entrance

NOTE: Fixed. See post from 10/2

Click on the hotspot near the "Big Boy" (mouseover reveals it) to zoom down the hall. Turn around and click near Big Boy again to return. As long as you can see the hotspot somewhere on the screen, clicking on it should center the screen toward the next pano while zooming toward it before cross fading to the next pano. Its a beautiful thing when it works, but often only the zoom fires.

The following code shows two ways I tried addressing this: <spot id="Reception" url="Images/Reception2.png" linked="Images/Entrance" pan="-93.00" tilt="-3.00" scale="0.62" alpha="0" onOver="alpha=1" onOut="alpha=0"
onClick="pano.qualityStatic=low;move1"
move1="pano.pan = -99,600;pano.tilt=-2,1000;pano.zoom=1.5,1000,,,move2;"
move2="loadPano(?panoName=Images/Reception&panHome=55,600)"
/>

<spot id="RcptnEntrnc" url="Images/Entrance.png" linked="Images/Reception" pan="-137.00" tilt="-6.00" scaleX="0.52" scaleY="0.42" alpha="0" onOver="alpha=1" onOut="alpha=0"
onClick="pano.qualityStatic=low;pano.pan= -138,600;pano.tilt= -5,600;pano.zoom=1.5,1000,,,move2"
move2="loadPano(?panoName=Images/Entrance&panHome=80,600)"
/>

MORE FUN THINGS:

While in reception place the hotspot back to the Entrance on the far right of the screen. Give it a solid click and if all functions fire you do a quick 360 while zooming home. Great fun.... but I don't think it was suppose to happen that way.

If you make enough round trips (4 to 10) eventually the Reception area becomes a green cube with one gray cubeface. (Actually all gray when viewed over the internet.) The hotspots still load so you can return to the entrance.

What's up with all this????? Are there workarounds?

cheathamlane
09-13-2007, 12:44 AM
Possibly you've changed things since posting, but I had no issues with the example... everything appeared to work as intended!

I recommend checking your syntax in your functions/calls (see my response to your post at http://flashpanoramas.com/forum/showthread.php?t=380 ), and also putting your fuinctions in one place, such as the global tag -- so it's easy to reference them from any hotspot.

HTH

Scott Witte
09-13-2007, 02:39 AM
Possibly you've changed things since posting, but I had no issues with the example... everything appeared to work as intended!

Not even the breathtaking 360 swing from reception? That is reassuring, if at least I am the only one having problems with my site -- disturbing in that I am having those problems. No, I haven't changed the XML and going to that site just now I get the same problems.

Thanks for checking. I hope others will report back as well.

Not sure what else I can put into the global tag, however. Suggestions? And I've been checking syntax for this the past couple days with no luck. Any help would be most appreciated.

Oh! I forgot to mention that I don't seem to have these partial execution click problems with the motion on your inspiring SFCM panos, which makes my problems with my panos all the more perplexing.

Scott Witte
09-14-2007, 03:59 AM
Alas.... It isn't me, or at least not just one machine. I've tested on three computers (WinXP) with multiple browsers and the motion tweens are consistently inconsistent. That is, sometimes all motion functions fire and sometimes only zoom. It still feels as though the character of the click makes the difference.

The wild 360 flip still exists in Reception and do enough round trips between Entrance and Reception and Reception loads an all gray cube (green on my local machine, gray/black over the internet so it is showing the loading screen background color, not the pano image).

Anyone else care to try and let me know what they experience? Any suggestions on what may be causing this?

Thanks.

Ken
09-14-2007, 08:01 AM
Hi Scott,

It behaves exactly as you describe for me using both IE 7 and Firefox 2 on a Windows Vista PC. I didn't go back and forth often enough to get the green cube thing though. I don't have time to look at your code right now and, even if i did, I'm probably not competent enough to find the problem but I wish you luck with it. It's a nice idea and one I wouldn't mind implementing myself.

Ken

Scott Witte
09-14-2007, 03:41 PM
Ken,

Thanks for checking. Drat! This is quite perplexing though at least not fatal.

Haven't seen Denis around here for quite a while or maybe he could give a better idea of what's happening and why. Hope its just that he's hard at work on the next release of this exceptional program and will perhaps be addressing issues like this.

Gary
09-14-2007, 06:15 PM
Hi,

I've just spent most of my spare time this summer programming an actionscript 3 authoring tool that generates scripts with timed parameters (Pan Tilt Zoom as well as special effects) that are run as a non-interactive movie.

I too have often seen the green screen that you mention above. My take on the cause was revealed when running the Nvidia Monitor software that came with my motherboard and watching the memory usage of the host... Unfortunately, as new tours load (and the old ones are unloaded using LoadPano), particularly if they are loaded quickly, the memory "stairsteps" upward until all available memory fills up and the panorama green screens (it certainly doesn't feel any better than the Windows bluescreen!). I'm quite sure this is the issue because I can predict when the green screen will appear based on the amount of memory available (unavailable). The behavior isn't always present if the machine isn't stressed and panos aren't swapped out too frequently. (Rapid panning also seems to clog up the unloading or freeing of memory as well)

In conclusion, since this all runs on the host, I'd suggest monitoring host memory usage to see if this is what's happening. I'm quite sure that this has nothing to do with the browser, as I've seen this happen when embedding the SWF in the browser as well as running it separately.

<gary>

cheathamlane
09-14-2007, 07:16 PM
Gary, interesting note about the memory usage.

This is exactly what I'm running into (viz my other posts: http://flashpanoramas.com/forum/showthread.php?t=352 )

Scott Witte
09-14-2007, 11:02 PM
Gary,

I was starting to suspect a memory leak, which sounds like what you observed. What made me think this was while navigating the tour everything works fine at first but eventually you get a green cube instead of the pano. Jump to another pano and it almost always appears. But the green cubes become more and more frequent the longer you move about the tour. I believe you would call that problem recursive and it seems like a memory leak, as far as I understand that.

I gather you weren't using FPP in your development so the most likely common element would be Flash itself. Unless this is a common problem I don't know that we will see a fix any time soon. I wonder if Denis can find a workaround.

I gather this is video RAM you are talking about?

In any case, the less capable the viewer's system the quicker this problem will rear it's ugly green (or gray or red) head. That could make large fullscreen linked tours essentially unusable for the general public and that, for me, would be a very big deal.

Patrick,

I may be mistaken, but I don't think this is the same issue affecting you. If I understand correctly, the renderer needs enough contiguous video memory to load the entire pano image. If there isn't enough the pano may still load -- or at least not fail to load, but it won't render, therefore the loader background color displays instead. If that isn't happening to you your problem is likely something different. That may be good! in that you may not have to wait for a bug fix to solve it.

cheathamlane
09-14-2007, 11:36 PM
Hi Scott:

I meant that it was a memory / memory usage issue which was the common element (not that it was a rendering issue).

I do believe it is a related issue, even if the visible symptoms are different. I've had the issue verified on both Mac and Win, and the memory usage thermometer hits tilt pretty quick on either OS.

I get the same high usage of memory at Walt's link from this post:
http://flashpanoramas.com/forum/showthread.php?p=1541#post1541

Cheers

Gary
09-15-2007, 02:47 AM
Hi,

This is all very interesting to me. Actually I'm issuing FPP commands from an actionscript program that has a timer running to determine when to initiate the next command. In that sense, I am using FPP.

I have found that system memory does free up as it should if there is enough time for it to do so, but this varies widely based on the processor and amount of host memory. The only exception I found is that if one specifies none for the transition type in the loadpano call, then the memory seems to be unfreeable and creates more of a problem.

Sidenote: Don't get me wrong here! I love this toolkit and just want it to work so I can put it on everyone's machines. I'm currently concerned about 2 issues: this memory issue, and scrolling on low end machines... scrolling is clearly very processor intensive... In my tests, I pretty consistently see full screen panos lock up the machine quickly when loaded into a 512K laptop (admittedly an ugly machine, but a bunch of them are still around!).

One question I have for Denis concerning memory... I load panostripe Panos of about 400-600K each. Do you think Flash would do a better job managing memory with separate cubes instead of stripes because they're smaller? I just haven't had the time to run these tests...

Thanks,
<gary>

Scott Witte
09-15-2007, 03:37 AM
...The only exception I found is that if one specifies none for the transition type in the loadpano call, then the memory seems to be unfreeable and creates more of a problem.
OMG! And of course that is exactly what I do -- or don't do -- because why bother specifying a transition type if the one you want is the default anyway???

Thanks SO much for that tip. It will be my next test.

Oh, one other thing for anyone who may care, there seems to be a connection that after a couple of these "green cube" instances Photoshop CS3 can't perform any on-image function other than the hand tool. You can select any other tool but only the hand cursor appears and that is the only tool you can use regardless of what is selected in the tool palette. FWIY

Scott Witte
09-15-2007, 04:14 AM
Drat! It may have taken a wee bit longer but I still got the "Green Cube of Death".

Gary, the fact that you were using FPP when you experienced this means that the finger is no longer off FPP. Not to say it isn't Flash's problem. Just can't say it isn't FPP specific. Sure would be nice if Denis could weigh in.

Gary
09-15-2007, 09:12 PM
Hi Scott,

I agree with you, I'm not completely sure that FPP is off the hook here. Internally, Denis may be issuing the unload command and Flash is not executing it at all or in a timely fashion, or perhaps unload pano isn't being executed.

I finally took a few minutes (I should have done this earlier) and looked at your issue with your Entrance panorama. Yes, I confirmed the green screen occuring when system memory fills up. I also witness stairstepping whenever another panorama is loaded (even if you're just clicking between 2 panoramas... maybe some sort of a caching mechanism is possible?).

When using the hotspots plugin, I don't know of any way to explicitly unload a Pano. In the FLA for embedpano, Denis does explicitly call panorama.pano.remove(), but I think I've read in one of the posts Denis mentionedthis interface is not usable once the hotspot controller has been invoked. In conconclusion, I see the memory issue in your entrance example, but know of no workaround.

Denis, you're fans and faithful await, any comments about these memory issues?

Regards,
<gary>

Scott Witte
10-03-2007, 02:44 AM
Denis, bless his heart, took time from writing the final docs for FPP2.2 to answer my questions.

Regarding pan and tilt often not firing, Denis suggested it had to do with "residual" panning movement of the pano. Even slight movement after the click will cause an interrupt to pan and/or tile. The solution is to force a stop with a "pano.pan_v=0;tilt_v=0;zoom_v=0" and then call the pano.pan and pano.tilt.

It worked! So for example:

onClick="pano.qualityStatic=low;pano.pan_v=0;tilt_v=0;pano. pan= -99.00,600;pano.tilt= -2.00,600;pano.zoom=1.5,1000,,...."
Regarding the memory leak issue (Green (or gray) pano after several pano loads...) Denis said:

Yes, memory leaks is a big problem in Flash 9 if you have a lot of external resources. Actually, I fixed a lot of leaks in v2.2 (including one big leak with pano stripes). But it was mostly light tuning, simple things like listeners and weaked links was fixed in 2.0 version. I test 50-60 panoramas in tours without any gray screens or something...

So, not much help on that. However, using a smaller pano size seems to avoid the problem alltogether.

Tanks again, Denis! Looking forward to v2.2 and beyond.