[Xerte] erte 2.11 - Setting the height _h and Width _w of graphicicon in script

Julian Tenney Julian.Tenney at nottingham.ac.uk
Tue Jun 29 14:39:40 BST 2010


_width and ._height

-----Original Message-----
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Peter
Snowball
Sent: 29 June 2010 14:23
To: xerte at lists.nottingham.ac.uk
Subject: Re: [Xerte] erte 2.11 - Setting the height _h and Width _w of
graphicicon in script

Thanks very much I added an interaction and then added  a  button with 
script
Graphic._width = 500;
Graphic._height = 400;

All is fine when you interact with the button however
Graphic._w and Graphic._h does not work

Understand now that I cannot set the height and width of a graphic icon 
until it is loaded.
So then I added an event "onLoad" to an interaction linked to the 
Graphic icon and the script which also worked fine.

I have several graphic components on a page so is there a way you can 
detect when all page icons have loaded so you can run a resizing script 
or just have an interaction for each Icon.

Peter Snowball
Dept Of Economic Development
Tasmania


On 28/06/2010 11:35 PM, Michael G Taylor wrote:
> Hi Peter,
>
> To control size using AS 2.0 try using ._width&  ._height instead of
._w
> etc...
>
> e.g.
> Graphic._width = 500;
> Graphic._height = 400;
>
> Mike
>
> -----Original Message-----
> From: xerte-bounces at lists.nottingham.ac.uk
> [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Peter
> Snowball
> Sent: 28 June 2010 14:14
> To: Xerte discussion list
> Subject: [Xerte] erte 2.11 - Setting the height _h and Width _w of
> graphic icon in script
>
> Hi All
>
> With a very limited understanding of Action script 2  I am trying to
> control the size of a graphic icon through script. Can alter or set
the
> position with script no problems but height and width seem to have no
> effect.
>
> eg : Graphic._x = 200;
>           Graphic._y = 100;
>
> but  Graphic._h =400; or Graphic._w = 500;  has no effect.
>
> It seems  like I need some script similar to 'resize' in the page
> wizards triggered by an onload event etc. but I have no idea how to do
> this.
> Any help appreciated.
>
>    
_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte


More information about the Xerte mailing list