Actionscript problem....newbie help!

Hey guys,

I’m getting stuck with a weird problem. I’m trying to create a sequence of events that occur when a user first opens the flash movie. 1st I have 2 lines that originate from the same spot that move and expand to fit the width of the page and stop at a certain _y (layer 1). Then I have a block that is set to 0 _alpha at first, and then appears (layer 2).

After that I want to be able to display a few links on the bottom of the page (layer 3) along with a logo. The link is below:

http://www.rsotrade.com/temp/test2.html

The first two work fine as you can see. However, the links and logo do no appear. Even though I have created them at a layer that is above the block. I even copied the block down to a layer below all the active layers the text appears but then is gone when the block loads. I’m not quite sure, and I’m very new to this whole thing. Any help would be greatly appreciated…I’m just stuck.

The link to the actionscript is here:

http://www.rsotrade.com/temp/actionscript.txt

Thanks a lot for your time,

Lior

Sorry I didn’t specify…

Please post your FLA.
:slight_smile:

I appreciate the help. :slight_smile:

Any ideas yet on what I’m doing wrong…

Ok, here’s the section that’s causing problems.

appear=function()
{
if (this._alpha < 100) this._alpha += 20;
else {
goToAndStop(3);
stop();
}

}
blockBottom.onEnterFrame=appear;

what’s happening is that on every frame that the blockBottom is running, after it gets to over 100% alpha, it’s going to send the _root timeline to frame 3. Now, this seems like it should work, but it won’t, because it’s repeatedly going to refresh the _root timeline to frame 3. Then the problem goes to the actions that occur there.

Because the actions (adding 20% to the alpha) take more than 1 frame to be noticeable, you’ll never see anything happening because the root timeline is stuck refreshing frame 3, and not allowing anything to happen.

So there’s the problem, here’s the solution:

First, take out the else statement in that if/else i typed above.

Next, change the function you have on frame 3:

appear=function()
{
if (this._alpha < 100) this._alpha += 20;
else {
stop();
}

}-

Change that if statement to something like this:
if (this._alpha < 100 && _root.blockBottom._alpha >= 100)
–#> rest of actionscript here

Anyway, hope this helps.

Sorry,

I don’t really understand which if/else statement I was supposed to remove. I guess I’m not used this this fact that Flash keeps calling the onEnterFrame repeatedly.

Should I just create a function that increases the _alpha for the bottomBlock and let the movie go and play through without stopping it? I’m just not sure at all about actionscript, and it’s very frustrating. How can I get the actionscript to run a function and then stop running it? Right now if I add a trace(“test”) in the code I can see that it keeps printing out test over and over and over.

Thank you very much,

Lior