News:

If you need instructions on how to get through the hotels, check out the enclosed instruction book.

Main Menu

magazine. done, must know how to do AS, (buttons.)

Farted by BilliardBall10, October 31, 2011, 09:03:58 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

BilliardBall10

so, clock-crew, i'm almost done with TIEM, though, i have some issues with it. (no pun!)
i am viewing everything in it, from contents, to the intro message, of the epic-ZL..
....but i CAN'T view the last two articles,

-absinthe's last pages-editor's note/story

and

-strange-clocks last-pages story.

so, i have flash 8, and if you guys can read ALL the pages, can you e-mail me the pages i'm missing, in a .JPEG, or a .PNG form?
and the cover.

look here:
http://files.myfrogbag.com/jcjo3z8d4...0issue%209.fla

ALSO! i need some help WITH ACTIONSCRIPT (AS). tell me:
HOW CAN i turn the ''pages'' by pressing arrow keys, like left-or-right -arrow-keys, man!
AND. i want -TO KNOW:
HOW CAN I TURN PAGES, WITH BUTTONS.. like a ''next''-''previous'' button.
how can i do it?

so, help me now, and i will give you epics.
-also, whoever wants to design a cover, feel free to do so.

k -i raise dragons. here we go -click HERE- i mean click the eggs -and the dragons, until they become  adults.

BilliardBall10


k -i raise dragons. here we go -click HERE- i mean click the eggs -and the dragons, until they become  adults.

SpongeClock SquarePants

What you want to do is add a global event listener for a keyboard event and add a corseponding function to call, like this:

stage.addEventListener(KeyboardEvent.KEY_DOWN, myFunction);

function myFunction(e:KeyboardEvent):void{
trace("SCSP is a cool dude");
}

then of course change myFunction into the actual function that is used to change a page.
I you want this function called when clicking a button just use :

button.addEventListener(MouseEvent.MOUSE_DOWN,  myFunction);
and then of course myfunction is no longer called by a keyboard event but mouseevent and must look like

function myFunction(e:MouseEvent):void{
trace("SCSP is a cool dude");
}

BilliardBall10

Quote from: SpongeClock SquarePants;1872886What you want to do is add a global event listener for a keyboard event and add a corseponding function to call, like this:

stage.addEventListener(KeyboardEvent.KEY_DOWN, myFunction);

function myFunction(e:KeyboardEvent):void{
trace("SCSP is a cool dude");
}


then of course change myFunction into the actual function that is used to change a page.
I you want this function called when clicking a button just use :

button.addEventListener(MouseEvent.MOUSE_DOWN,  myFunction);

and then of course myfunction is no longer called by a keyboard event but mouseevent and must look like

function myFunction(e:MouseEvent):void{
trace("SCSP is a cool dude");
}

ok, so i will use the MOUSE_DOWN for the ''mouse click on button.
but HOW can i make the pages turn(i mean move from page 1, to page 1, and vice-versa) by using only arrow-keys?
and in flash?

also, what function should i use in the spot/area  of ''myfunction''?
and what trace should i add, in the place of ''SCSP is an awesome dude''? the number of the pages? or of the frames?
sorry, but im new at this.

k -i raise dragons. here we go -click HERE- i mean click the eggs -and the dragons, until they become  adults.

SpongeClock SquarePants

Do you want to make the pages actually turn as in the original TIEM issues? Because there should still be a source for that.
If you just want to make a function that skips to the next frame to show the new page, then make two buttons with the instance and add eventlisteners to them (listening to mousevent of course) and make them call the following functions

the fucntions also contain a check if this is the final frame of the first frame so you cant skip past that, instead you go to the first or last frame again.


function forward(event:MouseEvent) {
    if (this.currentFrame == this.totalFrames) {
        gotoAndStop(1);
    }
    else {
        nextFrame();
    }
}


function backward(event:MouseEvent) {
    if (this.currentFrame == 1) {
        gotoAndStop(this.totalFrames);
    }
    else
    {
        prevFrame();
    }
}

BilliardBall10

ok, one more thing, spongebob, square-clock, and thanks for all the help/patience, i want to know also how i can turn the pages(without the special effects), but by using the arrow-keys (and not the mouse, at all!).
and left arrow, is page back, and right is go a page forward.

can i do that, and how.

k -i raise dragons. here we go -click HERE- i mean click the eggs -and the dragons, until they become  adults.

SpongeClock SquarePants

#6
Do exactly the same thing as with the function the mouseevent calls, but use a KeyBoardEvent as stated in an earlier post. The eventlistener should listen to a keyboard event


stage.addEventListener(KeyboardEvent.KEY_RIGHT, forward);

and

function forward(event:KeyboardEvent) {
    if (this.currentFrame == this.totalFrames) {
        gotoAndStop(1);
    }
    else {
        nextFrame();
    }
}



http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/KeyboardEvent.html

SpongeClock SquarePants

O yeah I read your pm.
I didn't know your flash version was so ancient and not AS3 compatible. You don't have access to a newer version of flash?

BilliardBall10

its quite old, flash MX age-2002.
the year.

uhhh, could i mail it 2 you, so that you add the actionscript for now, and i learn from that after i get - that?

k -i raise dragons. here we go -click HERE- i mean click the eggs -and the dragons, until they become  adults.

TelephoneClock

Quote from: BilliardBall10;1877926its quite old, flash MX age-2002.
the year.

uhhh, could i mail it 2 you, so that you add the actionscript for now, and i learn from that after i get - that?

I think he wants to physically mail this to you. Like, with stamps and everything.

BilliardBall10

whats your email, sponge clock?(tell me in a PM)

k -i raise dragons. here we go -click HERE- i mean click the eggs -and the dragons, until they become  adults.

SpongeClock SquarePants

seriously i think you should check out this pageflip actionscript 2 stuff this guy made.
http://www.pixelwit.com/blog/page-flip/
Also tons of tutorial on his site about adding pages and stuff.