List Info

Thread: onEnterFrame question




onEnterFrame question
user name
2007-07-23 11:34:14
OK, this must be simple but I've been banging my head for an
hour.

When the user clicks on movie 1 I want it to roll the movie
- however if movie 2 isn't sitting on frame 1 I want it to
roll backwards to frame 1.

movie1.onRelease = function(){
    if(movie1._currentframe == 1){
    this.onEnterFrame = function(){
        movie1.nextFrame();
        if(movie2._currentframe != 1){
           trace("movie2._currentframe = " +
movie2._currentframe);
           movie2.prevFrame()
        }
    }
    }
}

With this code, movie1 rolls forward and movie2 does not
move. The trace repeats "movie2._currentframe =
40"

-Gene_______________________________________________
Flashnewbiechattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashnewb
ie

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.c
om
Re: onEnterFrame question
user name
2007-07-23 11:59:42
sounds like some thing is not targeted correctly or maybe a
duplicated movie
clip (2 instances with the same name) on stage. I just
tested your code and
it works. I added some small things for testing but yeah,
your code should
work.

movie1.onRelease = function(){
   if(movie1._currentframe == 1){
   this.onEnterFrame = function(){
       movie1.nextFrame();
       if(movie2._currentframe != 1){
          trace("movie2._currentframe = " +
movie2._currentframe);
          movie2.prevFrame()
          if(movie2._currentframe == 1){
            delete this.onEnterFrame;
          }
       }
   }
   }
}
movie1.gotoAndStop(1)
movie2.play()




On 7/23/07, Gene Olchefske <Gene.Olchefskedot.state.mn.us> wrote:
>
> OK, this must be simple but I've been banging my head
for an hour.
>
> When the user clicks on movie 1 I want it to roll the
movie - however if
> movie 2 isn't sitting on frame 1 I want it to roll
backwards to frame 1.
>
> movie1.onRelease = function(){
>     if(movie1._currentframe == 1){
>     this.onEnterFrame = function(){
>         movie1.nextFrame();
>         if(movie2._currentframe != 1){
>            trace("movie2._currentframe = " +
movie2._currentframe);
>            movie2.prevFrame()
>         }
>     }
>     }
> }
>
> With this code, movie1 rolls forward and movie2 does
not move. The trace
> repeats "movie2._currentframe = 40"
>
> -Gene
> _______________________________________________
> Flashnewbiechattyfig.figleaf.com
> To change your subscription options or search the
archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashnewb
ie
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.c
om
>
_______________________________________________
Flashnewbiechattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashnewb
ie

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.c
om

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )