Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

lingo question/ image compression 1

Status
Not open for further replies.

quince

Technical User
Mar 13, 2001
4
AU
A couple of questions,
1) I have some sprites that I wish to remain hidden until a roll over occurs, I am using the lingo
on prepare movie
sprite(number).blend = 0
end
with this in the first frame of the movie and also on the frame the sprites start on, but when I run the movie they flash on the screen when entered for a second, and then disappear to be revealed when rolled over, I have also tried on enter frame, but both ways produce the same result, any suggestions?

The second problem is the size of jpeg images, I must be missing something in the translation but when I import the images, Director blows the size out of the water. Is there a way of keeping the size down while maintaining quality.

I currenty use Director 7
Thanks
 
Have you tried setting the visiblility property to false and then to true on the rollover?

on prepare movie
sprite(number).visible = 0
end

for the button:
on mouseEnter me
sprite(number).visible = 1
end

Tom K.
 


Hi Tom

Thanks for the reply, your code has worked for the roll over nav buttons, but I am still having problems with another part of the movie, where you choose an item from a cupboard when the item is chosen the cupboard disappears and the item is prominent on the screen with a detail of the the content on the background to show detail. The problem is the after using you suggestion, it didn't want to work. It's frustrating it eith work with a second flash on entering the frame or it wont work at all, any way, this it the lingo I have used

So all the items are hidden

on prepare movie

sprite(9).visible = 0
sprite(10).visible = 0
sprite(11).visible = 0
sprite(12).visible = 0
sprite(13).visible = 0
sprite(14).visible = 0
sprite(15).visible = 0
sprite(16).visible = 0
sprite(17).visible = 0
sprite(18).visible = 0
sprite(19).visible = 0
sprite(20).visible = 0
sprite(21).visible = 0
sprite(22).visible = 0
sprite(23).visible = 0
sprite(24).visible = 0
sprite(25).visible = 0
sprite(26).visible = 0
sprite(27).visible = 0
sprite(28).visible = 0
sprite(29).visible = 0
sprite(30).visible = 0
sprite(31).visible = 0
sprite(32).visible = 0
sprite(33).visible = 0
sprite(34).visible = 0
sprite(35).visible = 0
sprite(36).visible = 0
sprite(37).visible = 0
sprite(38).visible = 0
sprite(39).visible = 0
sprite(40).visible = 0
sprite(41).visible = 0
sprite(42).visible = 0
sprite(43).visible = 0
sprite(44).visible = 0
sprite(45).visible = 0
sprite(46).visible = 0
sprite(47).visible = 0
sprite(48).visible = 0
sprite(49).visible = 0
sprite(50).visible = 0

end

Then when you enter the frame and click on any one of the items so the above should happen

on mouseEnter me
cursor 280

sprite(17).visible = 1
end

on mouseLeave me
cursor number
sprite(15).visible = 0
sprite(16).visible = 0
sprite(17).visible = 0
sprite(51).visible = 1
sprite(52).visible = 1
end
on mouseDown me

sprite(15).visible = 1
sprite(16).visible = 1
sprite(51).visible = 0
sprite(52).visible = 0
end


Do you have any thought on this

Thanks

Allan
 
I'm not clear on what you are rolling over. If you want to make the thing you are rolling over appear and disappear, then make it and others appear when you click it, that won't work because you lose mouse interactivity when something is invisible.

You can make a dummy button, like just a square (just one cast member for all), set the ink to copy, 0%, and add behavior scripts to each of these to control what you want to change. Then you place the dummy right behind or in front of your item, and since it's transparent, it appears that you're rolling over the item.

I can't help feeling there's a simpler solution since I don't exactly know what you're goals are, but this might work since it seems you have a lot going on at once.

TomK.

PS: You might try using this in your prepare movie script to save some writing time.

repeat with i = 9 to 50
sprite(i).visible = 0
end repeat
 
hello, sometimes, to make things easier, just ignore the invisible things.
Why not just move them all in and out from the stage?

let say you have a sprite, lets make it sprite 1 which is a can.

h = (desired h)
v = (desired v)

on mouseEnter
sprite(1).loc = point(h,v)
end

on mouseLeave
sprite(1).locH = -200
end

hope that helps
 
Oh yes, about the image compression things. Try to play around with the bit depths.

After you finish authoring your movie, try to use the "save and compact" instead of ordinary save or save as.

But one thing is that i am not sure whether there is a drawback for always save and compact.

Worth a try.
 
I think you're right about bit depth being the key. That can greatly reduce the jpg sizes. However, be careful if you're working in say, 16 bit depth on your monitor and you import and save at that depth. If someone views your director movie at 24 bit or higher, the images will look crappy, even though they look good on your machine.

TomK.
:)
 
The only drawback of always save and compact is that it is slower than normal save. I generally only do it when I am about to make a projector or need to know how my file size is going.

And I would use silverblues suggestion and move things off the screen. There were bugs (may still be) with setting the visible, more predictable results are obtained by shifting things on and off the screen.

 
Many thanks for all the replys, I have been away for a few days and I am just catching up with mail etc sorry for the late reply. I appreciate your help and will give it all a try, I have tried the save & compact and it works a dream in file size compression amazing tool.

Thanks
Quince
 
Greetings,

In the situation which you wrote about the lingo i always use is as follows.

on mouse enter set the loch of sprite "12" to whatever you wish to create the rollover effect, and then
on mouse leave set the loch of sprite "12" to -600 to get it right out of the screen altogether.
ALternativley, i have used a square or circle of the same colour of the background if possible and cover the area until it is meant to be revealed, then have the code the same as above.
on mouse enter set the loch of sprite "cover" to -600,
Other than that, instead of using jpegs, i find that the file ext .pict works best in director on both mac and pc.

Hope this is some help for you.

mazdarx7s1sav
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top