Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: RE: FLASH: Flash 4 Scripting
From: Ed Harvey
Date: Wed, 19 Jul 2000 00:01:12 +0100

I got it to work by moving the Set Property values out of the main timeline
and into the button that was running the commands.

>From Main Timeline
Set Property ("Tree1", Alpha) = "0"
Duplicate Movie Clip ("Tree1", "Tree" & treeCount, treeCount)
Set Property ("/Tree" & treeCount, Alpha) = "0"
Set Variable: "TreeAlpha" = GetProperty ( "Tree" & treeCount, _alpha )
Set Variable: "plantCount" = plantCount + 1
Stop

>From Button
On (Release)
Set Property ("/Tree" & treeCount, Alpha) = 100
Set Property ("/Tree" & treeCount, X Position) = 210
Set Property ("/Tree" & treeCount, Y Position) = 137
Go to and Play ("enactive")
End On

It works, but now I am running into problems with duplicating the MC. I
think I know the problem. I can seem to pass the global variable from the
main timelime into the button. Do you have to use Tell Target and get
property?

Ed


> ----------
> From: Glen Grant
> Reply To: flasheratchinwag [dot] com
> Sent: Tuesday, July 18, 2000 4:33 PM
> To: 'flasheratchinwag [dot] com'
> Subject: RE: FLASH: Flash 4 Scripting
>
> i just tested what i suggested. worked fine. make your movie 2 frames. the
> code for the button instance should be
> On (Press)
> Set Property ("Tree1", Alpha) = "100"
> End On
> On (Release)
> Play
> Go to Next Frame
> End On
> the code in the first frame should be
> Stop
> the code in the 2nd frame should be
> Set Variable: "TreeAlpha" = GetProperty ("Tree1", _alpha )
> If (TreeAlpha = 100)
> Set Property ("Tree1", X Position) = 150
> Set Property ("Tree1", Y Position) = 77
> Else
> Set Property ("Tree1", X Position) = 70
> Set Property ("Tree1", Y Position) = 222
> End If
> Stop
>
>
> > ----------
> > From: Ed Harvey[SMTP:eharveyatiddnet [dot] com]
> > Reply To: flasheratchinwag [dot] com
> > Sent: Tuesday, July 18, 2000 4:09 PM
> > To: 'flasheratchinwag [dot] com'
> > Subject: RE: FLASH: Flash 4 Scripting
> >
> > I still can not get this to work. Any more suggestions?
> >
> > Tree1 is an instance of a movieclip and in the main timeline.
> >
> > Ed
> >
> > > ----------
> > > From: Helen Triolo
> > > Reply To: flasheratchinwag [dot] com
> > > Sent: Tuesday, July 18, 2000 2:40 PM
> > > To: flasheratchinwag [dot] com
> > > Subject: Re: FLASH: Flash 4 Scripting
> > >
> > > Assuming Tree1 is an instance of a movieclip which is sitting on the
> > > main timeline (or on whatever timeline you're executing this code
> from),
> > > then try:
> > >
> > > Set Variable: "TreeAlpha" = GetProperty ( "Tree1",_alpha)
> > > If (TreeAlpha = 100)
> > > Set Property ("Tree1", X Position) = 150 (no quotes)
> > > Set Property ("Tree1", Y Position) = 77
> > > Else
> > > Set Property ("Tree1", X Position) = 70
> > > Set Property ("Tree1", Y Position) = 432
> > > End If
> > >
> > > hth,
> > > Helen
> > > ---------------------------------------------------
> > > helen triolo � http://i-technica.com � 301-424-6037
> > > Flash Q&A archive � http://i-technica.com/flashlist
> > >
> > > Ed Harvey wrote:
> > > >
> > > > I have a Tree1(instance name) sprite that in the color effect, I set
> > > alpha
> > > > to 10. Then I have a button the sets the Tree1's alpha to 100. When
> I
> > > select
> > > > the button the Tree1 sprite does changes its alpha to 100, but the
> > > sprite
> > > > doesn't move. The movie only contains 1 Frame.
> > > >
> > > > Can anyone tell me why I can't get the Tree1 sprite to x 150 y 77.
> > > >
> > > > Set Variable: GetProperty ( "Tree1",_alpha) = "TreeAlpha"
> > > > If ("TreeAlpha" = 100)
> > > > Set Property ("Tree1", X Position) = "150"
> > > > Set Property ("Tree1", Y Position) = "77"
> > > > Else
> > > > Set Property ("Tree1", X Position) = "70"
> > > > Set Property ("Tree1", Y Position) = "432"
> > > > End If
> > > >
> > >
> > > flasher is generously supported by...
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > flashforward2000 and the Flash(tm) Film Festival
> > > July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
> > > www.flashforward2000.com
> > > Produced by United Digital Artists and lynda.com
> > > Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
> > > shockwave.com and Electric Rain.
> > > 1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
> > > Register before June 30 and save $200!!-- www.flashforward2000.com
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > To unsubscribe or change your list settings go to
> > > http://www.chinwag.com/flasher or email helpatchinwag [dot] com
> > >
> >
> > flasher is generously supported by...
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > flashforward2000 and the Flash(tm) Film Festival
> > July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
> > www.flashforward2000.com
> > Produced by United Digital Artists and lynda.com
> > Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
> > shockwave.com and Electric Rain.
> > 1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
> > Register before June 30 and save $200!!-- www.flashforward2000.com
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > To unsubscribe or change your list settings go to
> > http://www.chinwag.com/flasher or email helpatchinwag [dot] com
> >
>
> flasher is generously supported by...
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> flashforward2000 and the Flash(tm) Film Festival
> July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
> www.flashforward2000.com
> Produced by United Digital Artists and lynda.com
> Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
> shockwave.com and Electric Rain.
> 1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
> Register before June 30 and save $200!!-- www.flashforward2000.com
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> To unsubscribe or change your list settings go to
> http://www.chinwag.com/flasher or email helpatchinwag [dot] com
>

flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
www.flashforward2000.com
Produced by United Digital Artists and lynda.com
Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
shockwave.com and Electric Rain.
1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
Register before June 30 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]