Change cast member images
Hello:
I need to change images in the stage from the cast member.
The problem is that when I change the image, the previous
image on the stage
appears and quickly the new appears.
How can I desappear the previous image before to show the
new?
Thank you very much
Thank you:
The problem is that I am stopped in frame 10 for example, in
this frame I
change the cast member image by Lingo and send the head to
frame 1 and the
image that I had before I see it and then change to the new.
"JB" <[email protected]> escribi� en el
mensaje
news:[email protected]..
> Not understanding exactly what your are doing, one can
temporarily had
> the sprite by setting the blend prop to 0 or by setting
the vidoble of
> >
> A sprite triggered by an on EnerFrame handler could
switch te member
> before the score assigned mbmer makes it's initial
appearance.
Similar Messages
-
Change cast member of another sprite on rollover?
There is probably a really easy answer for this question but I just have NO IDEA how to approach it and am about ready to blow my brains out ... (new at this, yes) so ANY HELP would be greatly appreciated.
When rolling over or "on mouseEnter me" of a certain sprite, I would like to change the cast member of ANOTHER sprite as well as the current one (having no problems with the current one as it's all set up in the behaviours lol) is this possible? and how would the lingo go for this?
thanksDon't do what Multiduck suggests. Sprites should never change the properties of other sprites. That is a bad practice prone to creating nasty bugs.
Create a behavior for the second sprite that has a handler for changing its member. You might call it "showRollOver". Then your first sprite simply calls that handler.
sprite(x).showRollOver()
If you want the second sprite to react to mouse overs, then just use the mouseEnter method and call that handler from the first sprite.
sprite(x).mouseEnter()
Note: You can directly call any handler that is added to a sprite, ie,
sprite(x).mouseDown()
sprite(x).beginSprite()
sprite(x).setText()
sprite(x).fadeOut() -
Changing the cast member of a sprite
Hi, I have the following code so that when a user clicks on a
shape (acting as a button), it changes the cast member of an
existing sprite called "base" on the stage to an image cast member
called "Italian Lira". However the code does not work, any
suggestions what I have done wrong?
on mouseUp me
currency = "Italian Lira"
sprite("base").member = member(currency)
endThanks for keeping me sane Mike. I've always used a global
list with sprite
assignments so I never had to deal with whether or not the
sprite names
feature worked. But I guess you've dispelled the myth.
Thanks.
I guess we still don't know whether "base" is a sprite name
or mistakenly
and cast member name. I see that we haven't heard back from
pete_484 on
this.
Craig Wollman
Lingo Specialist
Word of Mouth Productions
212-928-9581
www.wordofmouthpros.com
"Mike Blaustein" <[email protected]> wrote in
message
news:enthgu$22c$[email protected]..
> Yes they did. I am not sure why so many people are
saying not to do it,
> because I name sprites in practically every project I do
these days.
> Assuming that you sprite is named correctly, this should
work (I just
> removed the word member in the 2nd line):
>
> on mouseUp me
> currency = "Italian Lira"
> sprite("base").member = currency
> end -
Making dynamic sprites from a cast member
Hello ,realy I am making a movie that it has the words and
the meanings and the pronounciation and the image of the word of 20
lessons ,realy I make a propertly list for the words and the
meanings for each chapter in a text document for each lesson and
retrievet the words and the meanings on the stage and assign the
them into separate sprites made by a text cast member ,Now I have a
problem ,the number of words and new words are not equal for each
lesson ,there fore I look for a way to make the sprites same as the
number of the words of each lesson from the cast member , is it
realy possible ?
Thank you very much
Sincerely yours MohsenaHello and thank you for your attention ,yes as you mentioned
I should change the content of the text members ,in this way when I
want tthe words and the meanig of lesson 2 ,I should change the
content ,But my problem is in this phase exactly ,for example if
the lesson 1 has 30 words and meaning and lesson 2 has 20 meaning
,one way is to predefined 30 sprites froem the cast memeber and use
object oritented programming that make just 20 new object for
lesson 1 (I can do it) but realy what is in mind is that ,is it
possible to make the sprites as needed? for example for lesson 1
make 30 sprites ,the somehow destroy them ,and for lessson 2 make
20 sprites?
thank you very much for your attention sincerely yours
Mohsna -
How to intersect with any sprite of a certain cast member?
Hi. I am trying to script a simple 2d platformer engine for a larger University project. I have movement sorted with W and A and gravity. I can get collision detection with the floor by doing
if sprite 1 intersects sprite 2 then
gvGrav = 0
end if
Sprite 1 is the player and sprite 2 is an instance of the cast member called ground. How would I get this to work with any sprite that is ground? Ill paste the full code below.
global gvRight
global gvLeft
global gvGrav
global gvDown
on enterFrame
-----------MOVE LEFT---------------------
if keyPressed("a") then
sprite(4).locH=sprite(4).locH+gvLeft
_movie.updateStage()
gvLeft = gvLeft - .5
if gvLeft < - 15 then
gvLeft = -15
end if
end if
if not keypressed("a") then
gvLeft = 0
end if
-----------MOVE RIGHT--------------------
if keyPressed("d") then
sprite(4).locH=sprite(4).locH+gvRight
_movie.updateStage()
gvRight = gvRight + .5
if gvRight > 15 then
gvRight = 15
end if
end if
if not keypressed("d") then
gvRight = 0
end if
-----------GRAVITY-------------------------
gvGrav = gvGrav
sprite(4).locV=sprite(4).locV+gvGrav
_movie.updateStage()
gvGrav = gvGrav +.5
if gvGrav > 30 then
gvGrav = 30
end if
-------------GravityCollision----------------------
if sprite 4 intersects sprite 1 then
gvGrav = 0
end if
if sprite 4 intersects sprite 2 then
gvGrav = 0
end if
end ifI dare say there's a better way to do this, but an easy way is to set a global variable, do a sendallsprites message, and check the global variable again.
So, if you had an extra global in your man control script:
global hitman
then in your collision checking part you would say this:
hitman = false
sendallsprites #checkcollision 4
if hitman = true then
gvGrav = 0
end if
The #checkcollision message would get sent to all sprites, and if you had a behavior placed on the floor sprites, that was like this:
global hitman
property mysprite
on beginsprite me
mysprite = the spritenum of me
end
on checkcollision me,s
if sprite s intersects sprite mysprite then
hitman = true
end if
end
any one of those sprites that intersected with the sprite you ask about would then change the global 'hit man' variable to be true. To make a sprite behave like floor, you would just attach that behavior script.
Notice how the floor sprite makes a note of its sprite number when it first shows up on the stage, you could do the same with your other script, if it's attached to the man character. Then you wouldn't have to have it hard coded to '4', which would save some headaches later if you have to change the sprite layers. -
Hi,
I need to create a dynamic menu for an application. Right
now I am creating every item as a new cast member:
newMember = new(#text)
member(newMember).name = "Item1"
member(newMember).text = "Blabla"
What I would like to do, is have an existing cast member with
the good font, font size, color, etc... and in my lingo script,
create all my new cast members based on the existing one, so I
would only need to change the text it contains and not the color,
size....
It could also be usefull to do this since I could attach a
behavior to the existing cast member and then all my new ones would
have the same behavior attached to them.
I hope this can be done, sorry if it is obvious, I'm in the
process of learning Director and Lingo.
Thanks,
PatHi Pat, and welcome to the list.
As for your question, I'd suggest you work with a single cast
in general,
unless it really helps organizing your project.
Creating members on the fly -as it seems you are doing- is a
much cleaner
approach.
Why don't you create a handler that would accept as arguments
the formatting
options and the member they should be applied to?
Or e.g. two handlers that each would apply some fixed
formatting to a member
that is passed to it.
The less the members, the smaller the project, btw.
> It could also be useful to do this since I could attach
a behavior to the
> existing cast member
I suppose you are talking about cast member scripts, not
behaviors. Another
thing you'd better avoid, since behaviors (scripts attached
to sprites) are
more flexible, receive notifications that script members
don't (like e.g. on
beginSprite), and are designed for oop (a reference to the
script
object -me- is passed as the first argument by the system
when calling
behaviors' handlers).
"PDiLalla" <[email protected]> wrote in
message
news:f97p50$rh1$[email protected]..
> Hi,
>
> I need to create a dynamic menu for an application.
Right now I am
> creating
> every item as a new cast member:
>
> newMember = new(#text)
> member(newMember).name = "Item1"
> member(newMember).text = "Blabla"
>
> What I would like to do, is have an existing cast member
with the good
> font,
> font size, color, etc... and in my lingo script, create
all my new cast
> members
> based on the existing one, so I would only need to
change the text it
> contains
> and not the color, size....
>
> It could also be usefull to do this since I could attach
a behavior to the
> existing cast member and then all my new ones would have
the same behavior
> attached to them.
>
> I hope this can be done, sorry if it is obvious, I'm in
the process of
> learning Director and Lingo.
>
> Thanks,
> Pat
> -
How can I save a cast member to the hard drive?
Hi,
I am using 'canvas' from the Paintbox library.
I found a line of code on the forum to create a 'new' cast member.
Now, I'd like to save that new cast member to the hard drive.
BuddyApi doesn't have an option to do that, and I haven't had any luck with the Xtras lists I've found.
How can I accomplish this?
Thanks in advance for your assistance,
BigDaddyTo elaborate, this is how you would call the Xtra in your code:
-- create the instance of the xtra
objImg = xtra("ImgXtra").new()
-- get the member's image we want to save
imgToSave = member("foobar").image
-- set the path and filename for the bitmap
strFileName = the moviePath & "foobar.jpg"
-- call the ix_saveImage method, with required parameters
success = objImg.ix_saveImage(["image": imgToSave, "filename": strFileName])
-- returns 1 if successful, 0 if not
if success then
-- something here
else
-- something else here
end
-- clear the xtra object instance
objImg = VOID
The other optional parameters such as format and flags can be set, if you like, and the info can be found in the imgXtra.txt document. -
Missing Cast member names in score
Hi,
I'm having a problem with the Score when I open Director.
The names of the members on each sprite don't show up (see image), now I can work around this, but I'm editing someone else's document so locating each cast member on the score is turning into a time consuming and confusing issue.
I'm on Director 2004 MX and I'm fairly new to Director so I haven't found anything in the help files or the forumThank you!
So obvious when you know how
Cheers! -
Can anyone tell me why the %^$& I get a "script cast
member not found"
error?
I've been working in Director for 17 years and I get this
from time to time.
I generally just copy the code from the behavior, paste it
into a new
behavior, name the new one the same as the old on, then copy
the new cast
member over the old one and it solves it. But it happened
rarely enough
that I didn't bother questioning why. I know it's not a
syntax error
because the code runs fine after the above process. But it
does only
happens when I've made a change to the code in that behavior.
Now I'm working with a simple movie with one parent script
and a
prepareMovie handler that instantiates one child object and
I'm getting this
darn error all the time. My above solution isn't working
anymore. The
error points to the first line of a particular handler. That
first line was
a comment. So I got rid of the comment and the new first line
of the
handler is code and the error points to it. If you see where
I'm headding,
no matter how many lines of "errored" code I get rid of the
error alert will
always point to the first line of that handler.
I'm sure many have seen this because it's happened in almost
every version
of Director I've owned. And by the way, I'm in MX on a PC.
Craig Wollman
Lingo Specialist
Word of Mouth Productions
212-928-9581
www.wordofmouthpros.comDean, I might do that. No, this has been going on long enough
that I sure
it's not any definable user error.
But, I did, after all of these years, discover something last
night. In one
case, I did get a legitimate script error that I fixed. When
I ran the
project again, I received the same script error, even though
it was a simple
fix and I was sure I corrected it. I recompiled several times
and ran it
again and received the error again. Then it dawned on me that
since parent
scripts remain in memory until disposed of, Director must
have been, for
some reason, referring to the old parent script. I had
already set the
object's global variable to 0 in my stopMovie handler and
even though that
handler might not always run when errors occur, I ran it from
the message
window to insure that the object's global was 0. But that
still didn't
solve the problem. Then I used clearGlobals in the message
window and
voila, the issue went away. Dare I say that this is a
shortcoming of
Lingo's design to allow variables to persist/linger after an
error?
But what still baffles me is that most of the time when I get
that
particular error,, even though I seemed to have found a
workaround, it is
not an actual issue with any code.
When it happens again, I'll send you the code. Obviously, if
I'm correct
about the scripts lingering in memory, then you won't receive
the error when
you run the movie.
I just find it interesting that there haven't been a bunch of
"Yeah, I get
that darn thing too" here.
Craig
Craig Wollman
Lingo Specialist
Word of Mouth Productions
212-928-9581
www.wordofmouthpros.com
"Dean Utian" <[email protected]> wrote in message
news:[email protected]...
> Hi Craig,
>
> Could it be a simple mistake of the script type not
being properly defined
> (movie/parent/behavior)?
>
> If you have a very baic movie where this error occurs
repeatedly, you
> could
> email me ([email protected]) and I'll take a fresh
perspective look at
> it.
>
> regards
> Dean
>
> Director Lecturer / Consultant
>
http://www.fbe.unsw.edu.au/learning/director
>
http://www.multimediacreative.com.au
>
>
>
> -
Simple import of PDF as cast member
I believe that there used to be a method to import PDF and
DOC files into Director Cast members. Does anyone remember if this
did exist and where they may be currently found.
I want to be able to hold the content of an exisiting PDF or
DOC document inside a Director Cast (Dir 8.5) and then view / print
from the cast member. This is as opposed to turning them into
straight bitmap images. I am not wishing to have the user being
able to access the output via either a PDF reader or Word.
Thank youif you use the gotonetpage script and put your pdf in an
external folder along with any videos etc it works e.g. for a
button link
on mouseUp me
gotonetpage "xxx.pdf"
end
this worked for me:)
Paula -
I have just downloaded Mac OS X 10.9 and Pages 5. When I open any pre-existing document in the new Pages the format is zoomed to 125%, the headers are out of position, the margins are changes, and inserted images are also relocated. What can I do?
Have you tried resetting the SMC ? > Resetting the System Management Controller (SMC)
-
How do I change the JPEG image size in PSE-12 when opening from RAW
Switching from PSE-9 to PSE-12. When a JPEG image is opened RAW in PSE-12 the size is 18.72" Wide x 12.48" high 300 DPI. The same image in PSE-9 is 23.4" wide x 15.6" High 240 DPI. How do I get PSE-12 to open the image as in PSE-9?
Uncheck the boxes at the bottom of the dialog Scale styles and resample Image so that only constrain proportions is checked. If you the change the resolution box from 240 to 300 you will get back to your original dimensions.
This is a meaningless thing to do, you still have the exact same number of pixels, you have only changed the metadata number in the file for ppi, and your prints are not affected by this number.
You could also use the same method to change the dimensions to 6 x 4 or 9 x 6 etc.
There are some cases (actually most cases) where you need to CROP the photo to change the dimensions, when the aspect ratio of the original photos is different than the aspect ratio of the final photo; the specific case in 99jon's example is the only case you ever want to change dimensions using Image->Resize->Image Size, where the aspect ratio doesn't change from 6x4 to 9x6 (or 12x8 or 18x12 or ...), and even then, you could do the same thing simply by telling the printer the size you want, you don't really need to do anything in PSE. -
Changing resolution and image size doesn't change result on screen?
I'm using Photoshop CS3. I am trying to change the resolution of several images that will be printed in a newspaper. So the current images are 72 ppi and really huge -- for example 36 x 27 inches (document size), and when I change them to 300 ppi, the image sizes shrink to about 8 x 6 inches, as I expect. But the image I see on the screen doesn't change. So, for example, when I open up the image originally, it's at 33% and the entire image is visible. After I change the resolution, and the image size has changed accordingly, the image still appears the same and it remains at 33%. Shouldn't the image shrink on the screen since its size has shrunk? Or if it remains the same on the screen, shouldn't the percentage shift? I mean if the document size is now 8 x 6, it should be able to be displayed at 100% and not fill my whole screen... I'm so confused. Thanks...
gradded,
The "Document Size" area of the Image Size dialog is just to indicate the size (in inches) that your document will be printed. The ppi adjustment has nothing to do with what is displayed on your monitor. Your monitor doesn't care anything about ppi. The monitor contains a certain number of pixels and after you change that ppi setting, the monitor will still have that same number of pixels.
As long as you leave the "Resample Image" box unchecked, your image size (Pixel Dimensions) will not change. You will see no change on your monitor. If you check the "Resample Image" box, then your image size (in pixels) will change.
Hope this helps. -
Financial Reporting Studio - Subtotals at each change in Member
I am using "bottom of Hierarchy" to pull all potential members but would like to subtotal at each change in member. I've tried auto calculation but that only works for the total. I know I could also make each member a line item and have a subtotal that way but this opens up maintenance issues (If we add a new member to the outline will we remember to update the report?).
Has anyone be able to do this?
Thanks.You can do a conditional suppress.
Do you still want to show
A, B and formula column? If so add another data column which is nothing but A
So you'll now have A, B, formula column, Data column which is equal to A
Add a conditional suppress on formula column to suppress the column when user selects Chicago.
Add a conditional suppression on the duplicate data column to suppress this when member name is not chicago
Regards
Celvin Kattookaran -
How do you change the default image at the login screen??
I want to change my default image that is at the login screen. The image is also in the desktop display(so i can set it as my background), but those are the only two places I can find it. Is there a way I can delete the image from my computer?
Well quick and dirty is to replace the applelogo.tif file with a .tif of your own.
Read this site for cool ways to hack your login window:
http://tinyurl.com/reanz
Richard
Maybe you are looking for
-
In ALV report is possible to display the subtotals in separate column
Hi, I have made one ALV report, i need to show the subtotals of ekpo-brtwr (Gross Value) grouped by or sorted by ekko-ebeln (Purshasing Doc) but in separate column not at the end of the line items of each purshasing doc any idea how can i do this?
-
Motion crashes - Macbook Pro Software update and Firmware update
Anyone out there that is working with Motion 3.0.1 on one of the new Macbook Pros (Santa Rosa) and has installed both the Macbook Pro Software Update 1.0 and the EFI Firmware update (for the 15 inch models)??? Motion 3 crashes on the Macbook Pros wit
-
Damaged Hard Drive, Can I Clone?
I have a damaged hard drive that does everything but boot my MBP, I can use it as an external drive and it works fine. My question is when i get my new hard drive can i boot damaged hard drive in safe mode and clone it to new hard drive or will it t
-
ITunes has stopped updating my podcast, posted weekly
iTunes has stopped updating my podcast, posted weekly: http://itunes.apple.com/us/podcast/kpfk-4-oclock-report-jon-wiener/id492010645 first one missing is Oct. 29, http://archive.kpfk.org/mp3/kpfk_141029_160001johnwiener.MP3 http://archive.kpfk.org/x
-
Visual Web Developern 2010 Express
I am trying to install the Web Platform Installer 5.0 so that I can download Visual Web Developer 2010 Express. It does not seem to be installing. It evidently is running, at least the task Manager says it is. I let it run all night, Probably a total