I've downloaded the OpenSWF source recently and having difficulty in doing something very simple using the HF*** classes.

I have three frames: - 1, 2, 3.
From frame 1, there are 2 buttons, each directing to goto frame 2 or 3. And from each of frames 2 and 3 there is 1 button to go back to frame 1.

Problem is clicking on button in 1 to goto 3 doesn't work. Any directions please?
Or better still, some code to correct me - I don't how to use Actions properly.

Also, I think there should be RemoveObjects() immediately before going to the next frame? How do those work?, as but3_1 or but2_1 haven't already been added on the initial display but will have from 2 to 1 or 3 to 1.

Thanks in advance,
James.


//psuedo stuff
HFActionGoToFrame goto1(1);
HFActionGoToFrame goto2(2);
HFActionGoToFrame goto3(3);
HFActionPlay play;

HFButton * but1_2;
but1_2->QueueEvent(&goto2, RELEASE);
but1_2->QueueEvent(&play, RELEASE);
HFButton but1_3;
but1_3->QueueEvent(&goto3, RELEASE);
but1_3->QueueEvent(&play, RELEASE);
HFButton but2_1;
but2_1->QueueEvent(&goto1, RELEASE);
but2_1->QueueEvent(&play, RELEASE);
HFButton but3_1;
but3_1->QueueEvent(&goto1, RELEASE);
but3_1->QueueEvent(&goto1, RELEASE);

HFMovie movie;
HFActionStop stop;

movie.Frame(1)->AddObject(but1_2);
movie.Frame(1)->AddObject(but1_3);
movie.Frame(1)->AddAction(&stop);

movie.Frame(2)->AddObject(but2_1);
movie.Frame(2)->AddAction(&stop);

movie.Frame(3)->AddObject(but3_1);
movie.Frame(3)->AddAction(&stop);

movie.WriteMovie("test.swf");