PDA

View Full Version : "Relative Scrolling Content and Navigation" Tutorial Help


EirDyNamic
01-02-2001, 10:55 PM
In this Tutorial at this site, I don't quite get the actionscript part..

It's something like this:
current = sceneNumber
if (target == current) {
stop ();
}

I could not find the actions script for "CURRENT="
Where can I find it??
Thanx!!!

NOTE: I am using Flash 5 and I am a newbie, so I hope someone can answear my problem very clear and detailed.
And If there any suggetions for newbies such as me to learn actionscript, feel free to write it down...Thanx!!!!

Jesse
01-03-2001, 12:34 AM
If you look within the 'content' movie clip, there are frames with actions on them. These frames controll the value of current. As the movie plays past these frames they each set current to the correct value.

Current starts as "1" because the first frame of the content movie sets it so.

Cheers

Jesse

EirDyNamic
01-03-2001, 03:27 AM
I don't know what do u mean by "CONTENT" movie clip, Is it the property of that keyframe?? or something else??? Can U give me a more clear explaination since i am new to this?? thanx alot!!!

Also I have another problem. I compared my unfinished .fla to the finished .fla that i download in the tutorial section.
And When I click on "f1" for the original version, I am able to section the whole 5 frames. But when I click the "f1" on my .fla, it only select frames "2 to 5" (not the first one). I tried to fix this problem by adding another frame, and it doesn't seem to work. To see what I meant, click on this link http://www.geocities.com/smooth_operater_1999/help.htm
Can u tell me how to fix that??? thanx you!! thanx you!!!

Jesse
01-03-2001, 03:35 AM
The content movie clip is the one on the main stage witht he instance name 'bar'. It's name in the library is Content. It sets variables each time it pases a screen of content.

http://www.actionscripts.org/tutorials/intermediate/relative_scrolling/shot2_timeline.gif

Notice in the example above that each of the frames with labels (f1, f2, tc) also have the little 'a' which indicates that the frame has actions attached. If you double click that frame you will see it has the code:

current = sceneNumber
if (target == current) {
stop ();
}

As outlined on this page of the tutorial: http://www.actionscripts.org/tutorials/intermediate/relative_scrolling/rel_scrol_4.shtml

As for your other problem: Look again at your sample: in my .fla you select frame 1 - 4... not 1 thru. So remove that extra frame you added (Click it and Shift F5).

Cheers

Jesse

EirDyNamic
01-03-2001, 04:28 AM
I fixed mah second problem...thanx you!! thanx you!!

**problem** I am too dumb...
As for the actionscript problem, Do I actully have to assign the ""CURRENT"" action...If so, how do I do that?
Do I just double click frame I just named and assign action from the drop downs..IF so, where can I find the Action "CURRENT" in the drop down list??I couldn't see to find it..Can i give me detailed instruction since I am so dumb

to see what i mean...click on this link:
http://www.geocities.com/smooth_operater_1999/help2.htm


THANX!!!! UR THE BEST!!

Jesse
01-03-2001, 05:32 AM
Current is a variable not a function. It stores the number of the current content scene. ie. 1, 2, 3, 4, etc. It is used to work out if we are going forwards or backwards in our scrolling menu...

Take another look at the graphic I put in above. Notice that all the frames with red arrows (labels) also have a littl 'a'. This idicates that they have actions assigned to them. When I look at the graphic you provided, you have not assigned the actions I tell you to in the tutorial... Please carefully read this page:
http://www.actionscripts.org/tutorials/intermediate/relative_scrolling/rel_scrol_4.shtml

You can copy and paste the code if you go to Expert Mode. (in the actionscript inspector, press Ctrl Enter).

Cheers

Jesse