Doesn't work: set the top of img "MyImage" of stack pStackName to 0
chipp at chipp.com
Tue Sep 14 17:03:10 EDT 2010
Does it throw an error at anytime? Is there a stack "Test" ? Have you run it
through the debugger?
Assuming all the objects exist, here are a couple things I might try.
set the name of last image of stack pStackName to pName
set the name of img "ImageLib" of stack pStackName to pName
some other things you might look at..
setting the defaultstack to pStackName
getting the width of the card, not the stack.
btw, you don't need to set the lockloc to true to move an image around via
On Sun, Sep 12, 2010 at 7:39 PM, Mark Stuart <mfstuart at cox.net> wrote:
> Why doesn't the following scripts work?
> stack 1 (Name: Test)
> on mouseUp
> start using stack "MyLib"
> CreateImage "Test","MyImage"
> end mouseUp
> stack 2 (Name: MyLib)
> command CreateImage pStackName,pName
> --// the image "ImageLib" already exists on the "MyLib" stack.
> --// its properties: Name=ImageLib, Width=150, Height=24, lockLoc=true.
> copy img "ImageLib" of stack "MyLib" to stack pStackName
> set the name of img "ImageLib" of stack pStackName to pName
> --// prepare the image to be unlocked before setting the position on
> stack 1.
> set the lockLoc of img pName of stack pStackName to false
> --// one way to set the position of the image. But this doesn't place it
> in the desired position.
> set the rect of img pName of stack pStackName to 0,0,the width of stack
> --// this is another way I tried, but it doesn't work either.
> --set the width of img pName of stack pStackName to the width of stack
> --set the left of img pName of stack pStackName to 0
> --set the top of img pName of stack pStackName to 0
> set the lockLoc of img pName of stack pStackName to true
> end CreateImage
> I also used each script in the MessageBox. But that didn't do anything to
> the image on stack 1 after running the script.
> What am I doing wrong?
> Mark Stuart
> View this message in context:
> Sent from the Revolution - User mailing list archive at Nabble.com.
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
CEO, Shafer Walters Group, Inc.
More information about the Use-livecode