OZONE Asylum
Forums
Multimedia/Animation
Set transparency in Director
This page's ID:
11417
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Alrighty then, I don't understand what your trying to do without actually seeing the project (linking to your DIR file might help) but I just thought I'd run with this: [quote]The summary: what's the best way of taking a long time to change the opacity of a sprite from 0 % to 100 % and back to 0 % again?[/quote] But I'm still a little confused. You've got the right idea, but I think your not quite understanding how lingo can work without needing to progress through the score. Anyways, try knocking up a quick test with the code below and that should help you figure out how to get what you actually want: Sprite Script (Behaviour): [b] property myCounter, myStaticLimit, myLimit, mySprite on beginSprite me mySprite = sprite(me.spriteNum) mySprite.blend = 0 myCounter = 0 myStaticLimit = 200 --// The ammount of frames for sprite x, Best to put this in a propertyDescriptionList handeler so you can set it form the behaviour property dialouge box. myLimit = myStaticLimit end on on exitFrame me put myCounter if myCounter < myLimit then myLimit = myStaticLimit myCounter = myCounter +1 --// Increase Opacity Counter else if myCounter >= myLimit then myLimit = 1 --// Set the limit back to 1 (it's 1 because we're testing for '>=') to count down myCounter = myCounter - 1 --// Decrease Opacity Counter end if mySprite.blend = integer((myCounter.float/myStaticLimit.float)*100) --// Translate Frames Passed to Percentage for alpha value end on [/b] That bit of code will slowly fade in whatever sprite you drop it on from 0% to 100% over 200frames then back again over another 200 frames, then back to 100% again and so on and so on, untill you stop the movie. This only requires one frame in the score, but you'll have to add a little frame script with: [b] on exitFrame go the frame end on [/b] This will cause it to loop indefinatly on that frame and trigger the exitFrame handeler for the sprite with the blend behaviour on it. I hope that's kinda what you were asking for. Anyways, just write that up in a little demo for youself so you understand how it all works and hopefully you'll be able to apply the same logic your project. Best of luck =) [b]Edit:[/b] Just to make sure this would work I did up a couple of quick tests: [url=http://www.whatever.net.au/~cameron/testMovie.dir]http://www.whatever.net.au/~cameron/testMovie.dir[/url] -- Director MX PC/MAC file [url=http://www.whatever.net.au/~cameron/fadeTest.exe]http://www.whatever.net.au/~cameron/fadeTest.exe[/url] -- Projector EXE, PC only, requires Shockwave Plugin (The non Shockwave version was 2 meg!) [b]NB:[/b] Scan the EXE file for viruses! I scan my PC regurarly but I can't garuntee anything. :) Anyways, I hope this helps. [url=http://dracusis.deviantart.com/] [img]http://www.whatever.net.au/~cameron/files/images/ozone/ArtDecoSiggy.gif[/img] [/url] [This message has been edited by Dracusis (edited 05-21-2003).]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »