Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Joelasticot

#1
General / AS3 Help
June 15, 2009 08:06 PM
Quote from: Rob HalfordI have it...

Well... read it?
#2
General / AS3 Help
June 14, 2009 04:39 PM
If you want to learn AS3 seriously, I recommend that you read this book
http://oreilly.com/catalog/9780596526948/
Seriously, a few hours reading it will probably teach you more than everything you've seen in class so far...
Plus, you can easily find it for free
#3
General / AS3 Help
April 8, 2009 02:13 AM
When are you going to cover the fundamentals of AS3 coding such as display lists, OOP and garbage collection? AS3 isn't just about sticking all your code onto a frame
#4
General / Help with advanced Flash buttons!
April 7, 2009 07:50 PM
As you guessed, the problem with the buttons not working was that the actions were "sent" to the nearest timeline, which is the timeline of the movie clip in which they are nested. To resolve this issue, we add the prefix "_root." to actions we want to be executed on the main timeline. However, this causes scene actions not to work because using _root. makes flash treat the timeline as a movie clip, and movie clips don't have scenes. I've created a simple function that will do the scene control in your movie, so here's the fla. All the code is explained. I haven't tested it much though, so if you encounter any problems, let me know

[attachment=2773:Movie_Control_2.fla]
#5
General / Help with advanced Flash buttons!
April 4, 2009 05:47 PM
Using a many buttons in Flash is bound to go wrong at some point, so, to resolve your issue I suggest you use some Movie Clips & use a bit of code

Here's how :

For your two menus, subtitles and movie control, you will have 2 separate movie clips. These movie clips will hold, on one layer, the animations, and on another layer, an invisible movie clip that will be used to test if the mouse is in the "over" region. I'll walk you through making the subs movie clip but it's pretty much the same for the movie control one

First, make a new movie clip. On layer 1, frame 1, put the "out" animation of the subs menu, and on frame 2, the "in" animation. They both must be within their own movie clips with a stop(); on the final frame. Now, make a new layer, and draw a box over your menu (and within the flash stage) that will be the area that triggers the menu. Convert it to a movie clip and give it the instance name of "hit". MCs don't register mouse clicks by default so it won't interfere with your buttons, even if it's on top of them.

Now, make a third and final layer for AS, and put this code on frame 1 :

hit._visible = false;

onEnterFrame = function():Void
{
if(hit.hitTest(_root._xmouse, _root._ymouse))
//note : if you want to use a non-rectangular hit zone, add ", true" after" _root._ymouse", within the parentheses
{
nextFrame();
}
else
{
prevFrame();
}
}

What this does is make the hit zone invisible (obviously), then, each frame, it'll check if it touches the mouse using a hitTest, and will go forward (show menu) if that is the case, or backward (hide menu) if it doesn't. After this, your control buttons should cause no problems. Let me know if you encounter any issues
#6
General / We, on TheBackAlleys, are dicks
April 4, 2009 12:39 AM