PDA

View Full Version : AS3 Noob here…


basezero
04-03-2008, 11:43 PM
Hello everyone!

Yes, I'm a complete noob in AS generally speaking. I've been in the design industry for many years and am now getting my feet wet with FL and AS3. I've picked up a couple of books on AS3 and Flash but I'm still trying to get my head around some things that will probably take some time.

In the meantime, I've developed a product that is somewhat under wraps for the moment, (dang attorneys anyway!). The immediate difficulty is on a few subjects on this project I'm working on and they are as follows:

1. The project in question is run in projector once it's output. There is a "quit" or "exit" button and I can't seem to get the fscommand to work properly making it shut the projector down once clicked.

2. When I click the buttons on the navigation, sometimes the button(s) will advance me to the next page if I click on them to quickly in succession.

3. Video. The FLV player component has an "expand" to full screen button built in… how do we actually make the video expand to full screen using this button?

So… if you can stop laughing long enough to type out a line or two, if someone could let me know how to go about solving some of these problems, that would be great. In addition, if anyone knows of a VERY basic primer to help me get on my feet a little better, information on that would be appreciated as well.

Thanks for you time, have a great day!

evride
04-04-2008, 01:15 AM
first of all. no one is laughing at you. these aren't the most common noob questions.

Im guessing the nav buttons are just using the play() function and clicking that several times will make it go several frames ahead. can't think of a solution right off. post your code for the nav buttons.

are you testing the fscommand("quit") as a projector? the quit fscommand doesnt work in swf form, just exe, so export it once as a projector and see if the quit command works.

the other problem idk, hopefully someone else will answer.

basezero
04-05-2008, 08:25 PM
Alright, here's the code you requested. BTW, I did manage to get the "quit" button working. Seems I had it mis-labeled!

Another interesting development:

I can get the project go full screen when in projector mode, again, the "quit" button now works. The problem I have now, is that when I go to the video page, the screen goes black, no video and that's it. I can get back to the project by hitting escape, which takes me back to the projector, now not in full-screen mode, and then the video will play when I re-navigate back to the video page.

So, as I mentioned earlier, here is the code I'm using as it's programmed to frame 1 of the Actions layer:

stop();

fscommand("trapallkeys","true");
fscommand("allowscale","false");
fscommand("fullscreen","true");

this.home_btn.addEventListener(MouseEvent.CLICK,cl ickListener1);

function clickListener1(event:MouseEvent):void {
gotoAndPlay("home"); {demo_reel.stop();}

}

this.academic_btn.addEventListener(MouseEvent.CLIC K,clickListener2);

function clickListener2(event:MouseEvent):void {
gotoAndPlay("academic"); {demo_reel.stop();}
}

this.athletic_btn.addEventListener(MouseEvent.CLIC K,clickListener3);

function clickListener3(event:MouseEvent):void {
gotoAndPlay("athletic"); {demo_reel.stop();}
}

this.personal_btn.addEventListener(MouseEvent.CLIC K,clickListener4);

function clickListener4(event:MouseEvent):void {
gotoAndPlay("personal"); {demo_reel.stop();}

}

this.video_btn.addEventListener(MouseEvent.CLICK,c lickListener5);

function clickListener5(event:MouseEvent):void {
gotoAndPlay("video");

}

this.quit_btn.addEventListener(MouseEvent.CLICK,cl ickListener6);

function clickListener6(event:MouseEvent):void {
fscommand("quit");

}