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 Mohsena
Hello 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
Similar Messages
-
Making dynamic links from report fields
Is there a way to make report fields link to differnt websites? I can't use the 'link' tool in 'editing' option of making the report because the link will not be the same for each record in the database. The field itself is actually the address of the website I want to be able to link to. So essentially, what I want to do is something like: ..but this does not work. Does anyone know if this is possible??
Thanks!You can use SQL report to do this:
Suppose the column which contains the web addressed is called url_column, your SQL
will be something like
select htf.anchor(url_column, name) from the_table
Then in the Column Formatting page,
set the "Display as" for column url_column as HTML.
Run the report and the values form that column will be a url which links to other web sites
null -
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 muchThank 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. -
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 -
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 -
Load flash cast member in the root of flash sprite (is possible?)
load flash cast member in the root of flash sprite, is
possible?i explain better, the user must download the projector from
internet and i
want protect the swf files include these in one exe
application
this is what my client want
tnanks
"Rob Dillon - Adobe Community Expert"
<[email protected]> ha
scritto nel messaggio
news:[email protected]..
> I'm not sure when or where you would need this
functionality. If you are
> creating a projector, then how are you distributing it?
If you are using
> a CD, then it doesn't matter how many files you have.
>
> If you want to bundle everything together for a
download, then just use
> an installer.
>
> --
> Rob
> _______
> Rob Dillon
> Adobe Community Expert
>
http://www.ddg-designs.com
> 412-243-9119
>
>
http://www.macromedia.com/software/trial/ -
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. -
I'm sure this must crop up but I've been unable to find
anything by searching...
I am developing a catalogue browser - users scroll through
thumbnails and click on them to view the product in a larger
window. However, the catalogue changes frequently and ideally I'd
like to load the items (sprites) at run time from a specified
directory so that each 'release' of the catalogue only needs to
have this directory replaced for it to be up to date.
I'm thinking to use text files within the root of this
product directory and subs to identify folder names and product
names but I've been unable to find any advice on how to load
sprites via lingo from a filepath.
Can anyone help?
JonHi Jon,
Actually, you want to load in new members, not sprites. If
this is an
app that's on a CD or a hard drive then you can use
downloadNetThing()
to download the file to the user's hard drive. You can then
import,
open, or link that file to your movie. If this is a graphic,
you can
update a cast member using member.fileName(), if this is a
text file
then you can open the file and copy the contents into an
existing, or
new member.
There are a number of data base Xtras that can pull in new
content
directly from a data base.
Another option is keep, at least one, cast external and not
protected.
You can then update the cast and make it available for
download. You can
have this update done at runtime, or you could write another
app to do
the update.
Rob
Rob Dillon
Adobe Community Expert
http://www.ddg-designs.com
412-243-9119
http://www.macromedia.com/software/trial/ -
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
> -
Dragging sprites from a window to another???
Hello,
How can I drag moveable sprites from a window (miaw) to
another? I have two layered windows. I want to drag a sprite from
the window on bottom to the window on top (miaw). The problem is
that the sprite stays behind the target window...
- StefuYou've given me a challenge. I'm going to try to program
this. I don't
think it would be too difficult. A mouse down on your
moveable sprite
should set a flag that would make the MIAW look for the mouse
passing over
it. When that flag is set and the mouse is over the MIAW, a
sprite from the
miaw can track the mouse movement just as it would in the
main movie or
other MIAW. You could also load the image of the member of
the sprite from
the first window into a variable and send it to the MIAW,
create a cast
member, assign that image to the member and assign it to a
sprite so it can
be set to the location of the mouse. A small detail: you need
to save the
offset of the mouse loc relative to the original sprite and
use that offset
to place the new sprite relative to the mouse.
If you understand any of this you win the grand prize. But if
I have time
to do a mock up of this before you get another answer I'll
post the code.
It really should take that many lines. I vaguely remember
having to do this
on a project back in about '98 but it'd be easier to recreate
it rather than
search the archives to find it.
Craig Wollman
Lingo Specialist
Word of Mouth Productions
212-928-9581
www.wordofmouthpros.com
"Stefu80" <[email protected]> wrote in
message
news:ff5437$dem$[email protected]..
> Hello,
>
> How can I drag moveable sprites from a window (miaw) to
another? I have
> two
> layered windows. I want to drag a sprite from the window
on bottom to the
> window on top (miaw). The problem is that the sprite
stays behind the
> target
> window...
>
> - Stefu
> -
Excel or table style grid in text cast member
I copied an Excel style table out of MS Word and pasted it
into a text cast member and to my surprise, the grid lines came
with the text, nicely formatted and everything. Having a
spreadsheet like grid (or something like an HTML table) that would
auto fit the contents of each cell sure would help.
Anyone know how to apply grid lines to text cast members I
create from scratch? and are there any formatting options I can
access from lingo to modify the grid?Check out the data grid in Inplicity, a fantastic set of
add-ins for Director. All Lingo based. They kick butt.
http://www.inplicitytoolkit.com/
best,
FBC -
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. -
Creating a new instance of a cast member
I want to create an instance of a cast member on stage, that
will not exist as a new member in the cast.
I read some stuff about child objects, but I wasn't
successful in getting it to work.
I also want to be able to create more than one instance, and
to be able to manipulate them separately.
Can someone help?
Thanks a lot,
IsaacThere is a variety of ways to accomplish this ("is" agreeing
with "a
variety" not "of ways"). You can puppet as many sprite
channels as you need
and assign the one cast member to each. Each will function
independently
although any modification to the cast member itself will be
reflected in
each sprite instance.
The following code takes the first cast member in the first
castLib and
places it on the stage 10 times using channels 1-10. It
places the sprites
side by side horizontally. The position is not important but
I showed that
each sprite can be treated independently, in this case by
setting the loc
property. Of course you can do this with any sprite property.
The
significant lines are 2 and 3.
repeat with x = 1 to 10
sprite (x).puppet = TRUE
sprite (x).member = member (1)
xPos = member (1).width * (x - 1) + (member (1).width / 2)
sprite (x).loc = point (xPos, member (1).height / 2)
end repeat
Craig
"ytlevine" <[email protected]> wrote in
message
news:ggk8be$fr7$[email protected]..
>I want to create an instance of a cast member on stage,
that will not exist
>as
> a new member in the cast.
> I read some stuff about child objects, but I wasn't
successful in getting
> it
> to work.
> I also want to be able to create more than one instance,
and to be able to
> manipulate them separately.
> Can someone help?
> Thanks a lot,
> Isaac
> -
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!
Maybe you are looking for
-
Stories and GOPs - Open or Closed
Hi All, I'm currently working on a DVD which is going to make use of stories to play different versions of the main feature (one version playing a concert with interceding documentary sequences and one where the docs are skipped). I have been trying
-
How to create Master Detail Form in htmldb 2.0
This option use to be available in 1.6 but I can't see it anywhere in 2.0.
-
Ipod video crashes when I attempt to eject after sync (Windows XP)
My ipod video synced perfectly in itunes for first two months. About two weeks ago, however, the ipod started crashing four out of five times when I try to eject it in itunes or stop the disk from Windows' "remove hardware safely" dialog box. It also
-
IBooks 3 app and automatic optimisation?
I have not upgraded yet but I have read that images are optimised automatically. Has anyone any more information about how this is achieved in the program or does it only happen when uploading. Is there any control over individual images? Ken
-
Big Green spot in center of both the front and rear camera's pictures
My new iPhone 4 has a big green spot in pictures I take. It is visible on the LCD when framing the picture and also shows up in the saved picture after its taken. It is most noticeable when there is a light colored background. Restoring has no effect