A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: [CS3] Easing problem with AS2.0

  1. #1
    Member
    Join Date
    Mar 2003
    Posts
    50

    [CS3] Easing problem with AS2.0

    I am using Lee Brimlows 3D carousel tutorial, but have adapted it and added in quite a bit for it to fit my needs. The carousel that I have altered works fine. My problem is that I had created a new .swf file and added some script so that when you click on a navigation icon it loads a .swf file. I am not sure how to get the external .swf file to be loaded onto a specific level since it's being called upon via XML. That's my first question.

    However, my main issue is this...
    The .swf file I have asked it to load has 3 buttons that slide in. Originally I had these buttons manually animated in the timeline and all worked fine. I decided that adding easing to those buttons as they slid in would look better so I did the following.

    1) created a new symbol and placed each button in it's own movie. I placed each movie on the timeline and gave them their own instance name.

    2) I created 3 "targets" (one for each button movie) so I could place exactly where I wanted each button to end up at. I also gave these each their own instance name.

    3) on each button (that is inside each movie) I put my onRelease code to load in additional movies on other levels using the loadMovieNum attribute.

    4) I placed the following code on each of the 3 movies that contains a button: (NOTE: videoTarget = the instance name for one of my 3 targets I created - see above)

    onClipEvent (enterFrame) {
    this._x += (_root.videoTarget._x-this._x)/15;
    this._y += (_root.videoTarget._y-this._y)/15;

    When I test this .swf file all works fine. HOWEVER, after I publish it and I test it with the carousel nothing happens when I click on my carousel icons. I am thinking that it has something to do with the onClipEvent (enterFrame) portion of this code since loading the .swf with no code and manually animated buttons worked fine.

    Can anyone tell me what the issue is? How can I fix this? I've gone through different easing tutorials, but I thought this was the way to go. Is there a better way to have my 3 buttons ease and still be able to have it load my external .swf?

    Thanks in advance for any help!

  2. #2
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Are you using _lockroot on your loaded swfs?

  3. #3
    Member
    Join Date
    Mar 2003
    Posts
    50
    I tried adding in the following line of code to the main timeline of my the primary .fla, but it didn't work.

    this._lockroot = true;

    I also tried adding this line of code to the main timeline of my .fla and then to the main timeline of the movie being loaded in, but it also didn't work. (holder = the name of the empty movieClip that the .swf is being loaded into.)

    holder._lockroot = true;

    I am also telling the external .swf to be loaded in via XML. So my XML looks like this:

    <icon image="3D_icon.png" tooltip="3D work" content="some text is in here" holder="3DintroMovie.swf"/>

    So nothing has worked so far and Im not sure what the problem is.

  4. #4
    :
    Join Date
    Dec 2002
    Posts
    3,518
    To check to see if it is a problem with pathing, change the code to something like this..
    Code:
    onClipEvent (enterFrame) {
    this._x += (100 -this._x)/15;
    this._y += (100 -this._y)/15;

  5. #5
    Member
    Join Date
    Mar 2003
    Posts
    50
    Ahhh....Im an idiot! My alignment was off on my empty holderMC so it was working all along, it just wasn't visible because everything was occuring out of frame. It wasn't until you had me adjust the path of the clips that I could actually see it all working. I also had some trace code on the first frame of my main timeline that was causing some conflict too. As soon as I removed that and aligned my holderMC everything worked perfectly.

    Thanks for working this through with me!
    Last edited by popflier; 09-05-2008 at 04:50 PM.

  6. #6
    Member
    Join Date
    Mar 2003
    Posts
    50
    Okay...wait. ALMOST everything is working perfectly. The buttons are easing in now and that's great, but now I have a new problem. One of the buttons that eases in loads in another swf on top of an image gallery. The gallery has an image scroller on it. My scroll function of the gallery no longer works.

    I tried putting the lockroot code again on my main timeline and again on my additional swf's, but the scroller still isn't working.

    I feel like I've opened Pandoras Box. Any ideas?
    Last edited by popflier; 09-05-2008 at 05:16 PM.

  7. #7
    Member
    Join Date
    Mar 2003
    Posts
    50
    Took a couple of days, but I figured it out and all is working fine. Thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center