| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Nov 2001
Posts: 12
|
I have a function that sets correct position, changes colors and plays a sound when a button is dragged and dropped. It works great in test mode but when I try to use it by double-clicking the .swf file or in a .html it doesn't work at all.
If I put in traces it works partially. If I was working in C I'd think it was a memory leak. What should I look for? John |
|
|
|
|
|
#2 |
|
(@_@) -("pretty lights")
Join Date: Sep 2001
Location: the Netherlands
Posts: 3,988
|
I never heard of memory leakage with actionscript
![]() It's probably sumthing silly. R u perhaps loading in data or sumthing ? Its hard to tell from here u know. If u trace the used data, where does it go wrong ?
__________________
RicoD Link ? |
|
|
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Nov 2001
Posts: 12
|
Thanks for the reply!
I didn't think it was really a memory leak. It's just that when you have on in C it acts something like this is acting. Traces don't help me when I'm not in test mode and it works fine in test mode. It drops in the right spot changes color and makes the sound. When I try to run it for reals it won't even drag and drop. If I put traces in, even though I can't see the results, it drags and drops but in the wrong place and doesn't change color or make the sound. I could put up the function but I thought maybe the symptoms were familiar to someone and it was just something dumb I'm doing. John |
|
|
|
|
|
#4 |
|
done
Join Date: Jun 2001
Location: portland, or
Posts: 8,048
|
add this to one of your frames:
ActionScript Code:
then replace your trace() actions with ActionScript Code:
you will get a messagebox popup with the var/message.
__________________
tg --- what the hell was i thinking? |
|
|
|
|
|
#5 |
|
village halfwit
Join Date: Jul 2001
Location: USA, PA
Posts: 3,187
|
That's pretty sweet TG.
Now I know how to trace a message in the browser window using Javascript. I think that may be handy at some point in time. Thanks, -PiXELWiT http://www.pixelwit.com
__________________
There are no answers, only choices. |
|
|
|
|
|
#6 |
|
(@_@) -("pretty lights")
Join Date: Sep 2001
Location: the Netherlands
Posts: 3,988
|
Or, if you're not using html / java u could put an extra layer on top of the rest of your swf, put a dynamic textbox in and send the variables there.
__________________
RicoD Link ? |
|
|
|
|
|
#7 |
|
Registered User
Join Date: Nov 2001
Posts: 12
|
Thanks for the help!
I'll try it as soon as I can - but... I created the most simplified version I could and the "on (release)" will only do the "stopdrag" and nothing else. If I comment out the stopdrag it does nothing (that is - it doesn't stop dragging). This is only in the normal execution modes; in the test mode it does everything it's supposed to. I've even duplicated the function's innards as just lines within the "on (release)". I find this bizarre since I have other applications where I do the same kinds of things and they work just great in both test and execution modes. John |
|
|
|
|
|
#8 |
|
(@_@) -("pretty lights")
Join Date: Sep 2001
Location: the Netherlands
Posts: 3,988
|
Why don't u copy paste the code here ? (use code brackets around them plz ... and disable smilies)
Maybe its umthing silly which you've missed cuz you've been staring at the same piece of code for a day or so (I know I usually miss stuff after being toasted)
__________________
RicoD Link ? |
|
|
|
|
|
#9 |
|
Registered User
Join Date: Nov 2001
Posts: 12
|
Hi!
The little "alert" function works in test mode but not in normal or html mode. I just discovered it works fine on Explorer. Here are the facts: It works correctly in test mode (CTRL-S). It doesn't work in normal Flash player mode. It doesn't work in html in Navigator. It works correctly in html in Explorer. When I say it doesn't work I mean stopdrag always works but no other action I've tried ever works. This is true whether I put the actions in a function and call it or if I put the actions directly in the "on(release)". Here's my simple attempt: on(release, releaseOutside) { stopdrag(); C = new Color("/Testbox"); C.setRGB(0xFF0000); setProperty("/Testbox", _x, 100); setProperty("/Testbox", _y, 100); } The Testbox is blue to start and at 200,200. It doesn't move to 100, 100 or change color in normal or Navigator. It does in test or Explorer. As I said, I've done other applications with very similar function and have had no trouble. Thanks again! John |
|
|
|
|
|
#10 |
|
done
Join Date: Jun 2001
Location: portland, or
Posts: 8,048
|
hmm... the alert box works for me all the time in ie4.x+, netscape 4.x+, opera.
i use it all the time. won't work in a projector file tho... uses javascript.
__________________
tg --- what the hell was i thinking? |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 24/7 Memory Leak | badlorry | Other Flash General Questions | 6 | 02-17-2005 02:47 PM |
| Local XML object remains in memory. | michaelbirch | ActionScript 2.0 | 3 | 09-24-2004 07:57 PM |
| FLASH BUG (memory leak - LoadVariables) | MaKe | ActionScript 1.0 (and below) | 3 | 04-19-2004 06:48 PM |
| setInterval and memory leak | jsignal | ActionScript 1.0 (and below) | 4 | 10-29-2003 04:38 PM |
| FMprojector memory leak | dancarlson | Flashants Support Forum | 1 | 02-12-2003 03:44 PM |