Behavior keeps dying...

I have a behavior on a sprite which seems to do exactly what
it's supposed
to most of the time, but after about 10-20 trial runs in
Authoring mode, it
suddenly just stops responding. To anything. I can even add a
"put"
command into its beginSprite just to see if it's responding,
and it just
doesn't do anything. The only ONLY thing that works once this
happens is to
save, quit, and reload, which is getting really annoying to
have to do every
10 minutes or so. So far it always seems to work in the
Projector, but it's
getting hard to test things on this because of the constant
need to keep
quitting and reloading. There's nothing fancy on this script:
property my
on beginSprite me
my = sprite(me.spriteNum)
end
on mouseUp me
--Set val based on mouse relative position on mouseUp
sprite(my.name.word[1] && "Dropdown Act").val = (the
mouseV - my.top) /
15
--Scroll Activator text to line to match line selected from
Menu
member(my.name.word[1] && "Dropdown Act
Text").scrollTop =
sprite(my.name.word[1] && "Dropdown Act").val * 15
--Menu and Selector disappear on mouseUp
my.visible = FALSE
sprite(my.name.word[1] && "Selector").visible =
FALSE
--Execute command based on val from Activator
case sprite(my.name.word[1] && "Dropdown Act").val
of
0: <do this command>
1: <do another command>
etc. (there's 20 commands total)
end case
end
on mouseLeave me
--Menu and Selector disappear on mouseLeave
my.visible = FALSE
sprite(my.name.word[1] && "Selector").visible =
FALSE
end
on mouseWithin me
--Selector follows mouse on mouseWithin
sprite(my.name.word[1] && "Selector").locV = my.top
+ (((the mouseV -
my.top) / 15)*15)
end
The whole "my.name.word[1]" thing is because I have several
dropdown lists,
each having 3 parts grouped by having similar sprite names.
The "Dropdown
Act" is a 20-line text member fixed-height so that only 1
line shows, which
you click on to activate the menu, it has a property "val"
which is set by
this script. (It has a mouseDown script which just makes the
other two
visible.) The "Selector" is just a rectangle shape with a
Reverse ink to
show which command you have your mouse over. Is there
anything in this
script that stands out as a no-no that would be causing it to
so royally
screw up on such a regular basis?

"Darrel Hoffman" <[email protected]> posted in
macromedia.director.lingo:
> on endSprite me
> sprite(me.spriteNum).visible = TRUE
> end
>
> Does it matter that this happens in another behavior
than the script
> that does the juicy bits?
Nope. That should be just as good, though you might want to
play with the
order of behaviors as attached to the sprite.
Pure guesswork here, but maybe Director still has problems
with .visible if
it's toggled n times in a session?
> As for using the visible property, I know of
> the alternatives, but I don't like 'em. Setting blend to
zero is
> useless, as it doesn't stop script from running on mouse
events. Moving
> them off-stage works, but then you have to put in extra
code to keep
> track of whether it's been moved or not or you end up
moving it
> off-stage twice, or add a property telling it where its
homeLoc is, etc.
> The visible property works on one line of code, and it's
nice and
> simple, provided you remember to make turn visible again
on endSprite.
> (I can't tell you how much I'd pay if the next version
of Director made
> the visible property sprite-specific instead of
channel-specific. If
> they released an 11.5 patch that did just that, I'd buy
it on the spot.)
> Incidentally, I'm still using MX2004, in case that
matters at all.
Yep. I opted for the off-stage method many moons ago.
Slightly more code, but
it's proven reliable for me.
Where to go from here?
Can you observe a pattern occuring when it begins to fail?
ie: certain sprite
channels are visible/not visible?
Perhaps you can create a simple test movie with just your
menu system and
some minimal navigation if that's what your real project
does.
That might help eliminate some possible causes. If it still
happens in the
test movie, see if converting to an off-stage method cures
it.
If not, then I may have led you down the wrong path
altogether and something
else is likely the cause.
If you're open to the off-stage method, I still have my
ancient D7 example
(using graphics for the menus) on my site that you might use
as a quick
starting point:
http://www.mboyd.com/director/windowsui.html
It uses an even
older version of my D7 "MAB beginOffStageGrouped" behavior
shown (perhaps a
bit confusingly) here:
http://www.mboyd.com/director/showhide.html
It's old, but I still use that behavior in every nearly every
Director
project. Not so often for menus, but for artsy dialog boxes
when the client
doesn't want the OS widgets.
(I still get hits on those pages. Maybe it's past time for me
to upload the
D8+ versions of those behaviors.)
For more recent code, I seem to recall seeing some better
written scripts
posted on the DOUG site some years ago. Sorry I don't have
the links avail,
but they should be easy enough to find.
Mark A. Boyd
Keep-On-Learnin' :)

Similar Messages

  • Why does my fully charged iPad 2 battery keep dying at 50% charge? I have updated to iOS 7 and this started happening. What could be the cause of it?

    My iPad's battery keeps dying. When I plug it in and put it back on, the screen shows a drained battery. After a few moments it boots up. However, when I check the battery charge, it's at 52% or so. Can someone tell me what's causing this? And what can I do to fix it?

    For proper reporting of the battery’s state of charge, be sure to go through at least one charge cycle per month (charging the battery to 100% and then completely running it down).
    From Here  >  http://www.apple.com/batteries/ipad.html

  • My ipod wont turn on, it keeps dying even if i leave it in charge the whole night and then after it dies it wont turn on the apple logo keeps flashing on and off and it also doesnt let merestore

    My ipod touch 5th gen wont turn on. it keeps dying sometimes it would die even if it was in charge, once it dies it doesnt turn on it keeps flashingthe apple logo and so i put it to restore and while it was restoring it said that there was an error and that it couldnt restore my ipod so i took it out of chrage and put it back in and it showed that my ipod was dead so then after a while it turned on and it showed the connect to itunes sign i connexct it to itunes but itunes doesnt let me restore or update. so i took it out of the usb that was plugged to my laptop and it showed that it was charging but it was dead, i left it in chrage for 3 hours and i dont know what happend but now it completly wont turn on

    You said "while it was restoring it said that there was an error ".
    What was the wording of the error message?
    Also:
    Not Charge
    - See:    
    iPod touch: Hardware troubleshooting
    iPhone and iPod touch: Charging the battery
    If you can’t charge your iPhone, iPad, or iPod touch
    - Try another cable. The cable for 5G iPod (lightning connector) seems to be more prone to failure than the older cable.
    - If a 5G iPod               
    Iphone 5 lightning port charging problem - SOLUTION!
    - Try another charging source
    - Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    - Make an appointment at the Genius Bar of an Apple store.
      Apple Retail Store - Genius Bar

  • Adapter Keeps Dying

    Why do my adapters keep dying? I've had 2 croak in the last four months. At $80 a pop, this is getting pretty costly.
    Any way to fix these stupid little things?
    About to turn a loyal Mac owner (20+ years) into a bitter ex-Mac owner. FEH!

    Welcome to the Apple discussion forums.
    Are you using the 3 prong, with grounding, plug? Is it always plugged into the same outlet? Could there be a quality of electricity issue that's toasting your adapter? If that's possible, you may want to invest in a device that moderates the electricity into a narrower band, which also provides buffer against power spikes. There are a number of them on the market for computers.

  • Jst bought an iphone 5s and 5c battery keeps dying have noticed a lot of people have had this issue for awhile but I haven't seen any real fix. ???

    I just bought a 5s and the battery keeps dying. I have noticed several people have had this same problem for awhile but I haven't really seen a fix.
    I am loosing about 1% every 2 min as well. not very tech savy but I did turn off the LTE. I did originally let phone die all the way then charge all the way.
    Have only had for 3 days should I start with taking it back and replacing? or does everyone think this is a software fix we are all gonna have to wait for ?
    Thanks

    You can try this link for some help http://osxdaily.com/2013/09/19/ios-7-battery-life-fix/. I do not see my iPhone 5s behaving in this manner, so there has to be some settings that you are using that are giving you problems. Did you restore this phone from an older iPhone backup? If so, you might want to restore the device as new and start over and sync over individual parts to see what might be bad.

  • Why does my iPhone 5 keep dying at 33% ?

    My iphone 5 keeps dying at around 33% battery left and when i try to turn it back on straight after ut goes off  it shows i have to charge it but 10 minutes later when i try it, t will come back in for a minute but then go back off and do the same. Ive bought a new charger for it but yet it still dying at that percentage. The phone is out of warranty and dont know what to do. Please can somebody help me.

    Your battery is failing.

  • Messaging Bridge keeps dying

    I am using weblogic 10.3 on sunos and i am seeing this issue where the messaging bridges keep dying ever so often(once or twice a week). I have over 15 servers in the weblogic domain but out of them only 2-3 messaging bridges die at random. The issue is compounded by the fact that the weblogic logs say unable to connect to source destination will retry later but weblogic never retries. I can't see any configuration where i can configure duration and number of retries for messaging bridges. Does anyone know how to fix this problem?

    Ok is there a way anyone knows of by which we can reset the messaging bridge from the admin console without having to restart the managed server?

  • Has anyone got a solution for an iphone 4s as the battery keeps dying really quickly? It's only one year old

    My iphone is only 1 year old, and it keeps dying does anyone know how I can fix it

    Tips here:
    http://osxdaily.com/2013/09/19/ios-7-battery-life-fix/

  • Xdm keeps dying

    After a recent upgrade to Solaris 9 the xdm keeps dying and restarted after about 5-10 minutes. I can speed this up by stopping and starting the script in the /etc/rc2.d/ directory but it still dies after about 5 minutes with no real error message to go on.

    Stu
    On another related subject... if my computer is 'chuffed' I don't understand about Apples approach to repairs and stuff... It was my understanding that if a piece of hardware was under a year old and suffered from a technical fault it was the responsibility of the company to replace/repair for free? Apple seem to only do 90 days? IS that right?
    If I need a new part will I have to pay for parts and service even though I've had it less than a year (7 months)
    Your Imac has 90 days phone support and 1 year parts and labour. If you phone after the 90 days is up they will ask for a credit card #, now if they find out it is a hardware issue you will not be charged.
    Now if it won't power on at all I would thing it is a hardware issue, if it was a bad hard drive or corrupted software then it should turn on but not find the drive or the OS on the drive. Call Apple again and tell them you want it fixed or take it in you are still covered.
    You should also think about extended warrentee which gives you a total of three years phone support and three years parts and labour. Keep us posted, Bob :~))

  • My battery keeps dying. How do I fix this?

    my battery keeps dying. How do I fix this?

    Go into settings>General>Background App Refresh> TURN IT OFF ... This will help with your battery life

  • I phone 4S keeps dying.

    My 4 month old iPhone 4S keeps dying, it happened 6 times in a row, should i be worried.  I got it back eventually by constantly hard rebooting.  Is this sinister.  I dont have apple care, can I take it in to be looked at, will they care?

    Hello:
    Same issue here, called Support last night and after 1 hour and 30 minutes, I was transferred to a support specialist.  Basically Im getting a replacement units since it seems to be a hardware issue...
    Problem is I will be without phone for a couple of days, but at the end lets hope the problem does not come back again.
    Samlopez1

  • Iphone 5 battery keeps dying! Will apple charge me a lot??

    Iphone 5 is just out of warranty and the battery keeps dying so fast! So from 70% it dies and then have to wait ten minutes for it to come back on! To then have the percentage at 1%!!! So disappointed with apple. Will they charge me for a new battery???

    If out of warranty, yes, they will probalby charge you.
    Try restoring the device as new, i.e. without your backup.

  • My I phone 4 keeps dying and I keep restoring it and now I don't even have a decent downloaded Itunes on my computer? When it is about to dye it turns a Sepia color than keeps rerouting. Help please?

    I phone keeps dying I have had it since 12/2012, Christmas past 2 months started dying and then keeps trying to reroute, I have restored it 20 or more times. Right before it dyes the screen turns Sepia Brown and then nothing. Now computer is telling me that Itunes is corrupted. Any ideas???  Much appreciated and Thank You.

    Sounds like an impending failure of the phone. Try to get a good backup of all data and photos. Then Make an appointment at an Apple Store to have your device examined by a technician. Or contact Apple Support.

  • Ipod Keeps dying :-(

    so my video ipod keep dying on me whenever i go running...any ideas why or how to fix it? i dont want to lose my 5K songs...

    As long as they are in iTunes you won't lose them. It sounds like your battery has died. You'll either need a new battery which can be a little difficult to replace, or a new iPod.

  • My iPhone 5 keeps dying

    My phone keeps dying at 40% or more and then when it is charging, it stays at the same percentage or looses battery. Also, my keyboard periodically stops working completely. I don't know what to do..?

    Press home button twice quickly, delete all the background apps from memory, with iOS 7 slide all the window panes up. Then Reset, hold both the home and power buttons for about 10 seconds until the iPhone restarts.

Maybe you are looking for

  • When I use a GSI external antenna for WiFi I first get a message that "Firefox is already running but not responding etc", and then Firefox crashes. Can anyone help please?

    Because of weak WiFi signal I need to use an external antenna (GSI USB wireless WIFI long range network adapter). My computer can see the signal clearly and shows that I am connected to the right network. But when I try to launch Firefox I get a mess

  • MacBook Pro 1.83GHz or 2GHz

    Just in general which one do you think is the better value and which would you prefer. The price diference as you know is around $500 plus tax. Do you think what you get with the upgraded version is worth the price (2Ghz, 1gig Ram, and 100GB Hard Dri

  • PSE 5 Export photos

    I am using PSE 5 and my son is using PSE 3. I have created a folder with some pictures which contain captions, tags and notes. If I burn these photos to a CD and send it to my son, will these captions, notes and tags be readable in his earlier versio

  • Question about somepage.jsp?id=10

    I have a few questions about passing variables inside the actual URL. Say for example i have a products list, each product has an id. When i click on the product various information will be displayed including price, name etc etc. At the same time co

  • Printing all docs in windows

    I'd like to print all generated doc-files under windows (which is 324 files in 32 folders). I would find a way in linux like "find ./ -name *.html -exec lpr {} \;" but how may I do this with windows 2000? No - I dont't have this MIF - Framework.