Where do I put my actions?
Since changing over to AS3 I'm totally confused over the placement of Actions on the timeline?
My confusion is with the placement of the Event Listener and Function for each button.
It appears to me that the button must be on the stage BEFORE the actions are defined, does this mean that the actions must always be defined in a frame after the button is first seen?
This seems to be pretty messy and not as sensible as previous versions where event listeners etc where just palced in frame No.1 and I have no idea how this could work with dynamic run-time buttons.
Or.... am I missing something very obvious (which is much more likely)??
Regards
Dave
Ok, try this ...
Button layer ..............................X__________________________stop
Option 1....................................Y_____________stop
Option 2................................................................Z___________stop
X is the frame containing the button and its actions
Y is the start of option one
Z is the start of options two
If the program jumps to Y it sees the actions but if it jumps to Z it does not see them but it does see the button
Does that make any sense?
Regards
Dave
Similar Messages
-
Where do I put my Action Script?
So, I created a small Flash site with no loading of external
swfs. I am strictly using the timeline using labels. I have a layer
for my main buttons (home, portfolio and timeline). I have selected
AS3 for the file and I have those buttons working fine.
I have a button for my portfolio where thumbnails will pop up
after being pressed. I want to link those thumbnails to the URL's
of the actual websites. Where do I put the action script?
I also want to have my email at the bottom of the screen so
you can click on it to email me. I am used to using AS2 whwere you
simply put the code on the button.
Thanks,
GabeHey, so thank you for the fast reponse. I totally agree with
you on learning AS3, I don't want to go back to AS2.
I already have the code you supplied so I understand what it
is doing but my question is where do I put it in this case? I
always create an action layer as you mention. In my action layer, I
have frame 1 with my preloader code and then frame 2 with my code
for my main buttons. They call to the labels. So, when I press
portfolio for example, it goes to that label.......a shape tween
starts and my portfolio thumbs appear. I then want those thumbs to
link to the URL of those sites.
So, where do I stick your code?
Thanks again for all your help. I am NEW to AS3 and this is
great learning.
Thanks,
Gabe -
Where should I put my code?
Where should I put my code, on the buttons and other items in question, or in a separate Layer, referencing the items I need...?
Background :
I'm REALLY new to Flash with Adobe. I've used SwishMax a little in the past, but nothing of recent.
At work there's a project where I'm getting to use FlashPro CS6 and I've run into an odd issue with code to move forwards, backwards, and back to the beggining on 3 different buttons.
It's in a layer called Actions, and on frame 1 - And remember... uber newbie here folks, so forgive any glaring issues in my code that most people would see quickly...
//NEXT BUTTON
NEXT_BUT.addEventListener(MouseEvent.MOUSE_DOWN, nb_mouseDownHandler);
function nb_mouseDownHandler(event:MouseEvent):void
this.nextFrame();
//MAIN MENU BUTTON
MAINMEN.addEventListener(MouseEvent.MOUSE_DOWN, mm_mouseDownHandler);
function mm_mouseDownHandler(event:MouseEvent):void
gotoAndStop(1, "Scene 1");
//BACK BUTTON
BACK_BUT.addEventListener(MouseEvent.MOUSE_DOWN, bb_mouseDownHandler);
function bb_mouseDownHandler(event:MouseEvent):void
this.prevFrame();
The code for the first two work's exactly as I need, the code for the back button, initially it only appeared on from the second frame onwards, but during debugging I've popped it on all pages. On the first frame, it takes you back to a black page with nothing on it, on all others it does absolutely nothing...
Another question as I've written above, should my code be in a separate layer regerencing the items it needs to affect, or... as a colleague told me in a ridiculously over the top brimming with distaste, create layers for each item, or groups of items and place the code in there... which to me, see's odd...
Thanks once again in advance, and I'm sorry to post such a newbie question, but the internet gives mixed anwers, not specific to my situation.
Tim.In AS3 you cannot put code on buttons and other items like you could with AS1 and AS2. Beyond that, your choices are to place code in the timeline frame(s) or in separate actionscript files. While there are a number of recommended best practices, what usually works best is whatever you are able to understand and work with at the time. While there are benefits to having all code located in one place (a frame or a file) since it makes finding it much easier, when you are creating a timeline-based design, that is not always a possible/practical approach.
Over time you will gain experience with the different approaches and can make the choice based on that experience. -
Where do we put Validations in Internet Sales Application
Where do we put validation on user input data in ISA.
like in Actions,BO,BE.Please tell where exactly we do it.
I need to compare Sold to Party with Ship to Party and Bill to Party.Any idea how i can do it.There was some problem from crm side....It working now
-
Where to deploy custom XSQL action handlers?
I need to write some custom XSQL action handlers in Java. I am using JDeveloper 3.2 with the Oracle HTTP Server (= Apache + JServ) on Windows NT 4.0.
When I complete my action handler(s) and package them into a JAR file, where do I put them so they are picked up by the server? If I run a test XSQL page from JDeveloper, Web-to-Go finds it if I put the JAR file under Apache\Web-inf\lib, but not when I try it from a browser.
The Muench book (p. 602-603): "...make sure this .jar is included in the server CLASSPATH...". Is that different from the system-level classpath? Would that be in jserv.properties or where?
Is there a document that walks you through this particular jungle?
Best regards,
Jere
nullThanks Eric,
it helped. The JAR file just needs to be in the JServ path. I'm still at loss though how to configure JServ so that the JAR gets reloaded if (when) it changes. It is a pain to restart Oracle HTTP server every time I change the JAR file, which is often during development. I thought of playing around with servlet zones, but decided not to waste time since action handlers are not really servlets.
--Jere
null -
i have an issues everytime i put my apple id and password to face time and imessage he said verifying and he goes back to where u should put ur password and wont check mark the mail and i create a new apple id the same what should i do ?
i have an issues everytime i put my apple id and password to face time and imessage he said verifying and he goes back to where u should put ur password and wont check mark the mail and i create a new apple id the same what should i do ?
-
When I receive appointments by email and accept them they go into the enourage "on my mac" ical calendar which is not synced with mobileme. How do I change where appointments are put ?
Or how can I choose where the appointment is put ?
I use the mobileme sync services so the ical calendars that are synced are those in the "[email protected]" group.
Please help !
NickActually you can't drag the appointment to ano calendar - its says "You can’t make changes to this invitation., Only the organiser can change this event"
Also if you double click on the received appointment and open the window the only calendars shown that you can select are the 'on my mac" ones, and not the sync'd ones.
Any ideas welcome !!
Nick -
I got a new laptop and I can't sync all my music onto iTunes without iTunes saying it will erase my songs on the phone, how do I fix this to where I can put all my music on my laptop?
If you do not have access to the iTunes Library on your Old computer... or its Backup...
See these 2 Links...
Syncing to a New Computer...
https://discussions.apple.com/docs/DOC-3141
Recovering your iTunes library from your iPod or iOS device
https://discussions.apple.com/docs/DOC-3991
If you do have access... See Here...
iTunes: How to move your music to a new computer -
Where do I put a workflow so that all users on the Mac can access?
Where do I put a workflow so that all users on the Mac can access it from Automator?
Also. why does the search pattern "users" AND "workflows" return results whitch math "and" (lowercase)? I thought "AND" (in caps) is for boolean searches.Hi, Mike.
1. You wrote: "Where do I put a workflow so that all users on the Mac can access it from Automator?"Either:
• Macintosh HD > Users > Shared
• Macintosh HD > Applications (if you're the Admin user).
All users (unless restricted by Parental Controls) have access to those folders.
2. You wrote: "Also. why does the search pattern "users" AND "workflows" return results whitch math "and" (lowercase)? I thought "AND" (in caps) is for boolean searches."It's unclear as to what search facility you are referring, and a bit hard to follow given the spelling errors in your question.
Do you mean Discussions search? If so, have you reviewed the Search Tips? They're also available from the search page, where one can click "Tips" under the Search Terms field.
Good luck!
Dr. Smoke
Author: Troubleshooting Mac® OS X -
I want to create a "Play All" chapter marker that will play the video from start to finish in addition to the standard chapters I have…I guess I can auto start the DVD but would prefer a button…how and where would I put this "play all" marker?? Thanks..
The start chapter button is a play the whole movie button regardless of how many other markers you have.
Once a DVD starts playing it continues to the end.
Chapters marker simply gives the viewer a place to start playback whether it be the start, middle or near the end.
Al -
my ipad was in recovery mode and it went back to the home screen and it found my info on itunes to the point where i can put music on it but it still says connect to itunes
sarahwood wrote:
.. it said my iPod was in recovery mode and I needed to restore it?
Once the Device is asking to be Restored with iTunes... it is too late to save anything...
See Here > http://support.apple.com/kb/HT1808
You may need to try this More than Once...
Be sure to Follow ALL the Steps...
To minimise loss... after the successful Recovery... Restore from the most recent Backup...
See Restore from Backup here
http://support.apple.com/kb/ht1766 -
Where can I find the Action Panel in Photoshop?
Where can I find the Action Panel in Photoshop?
Are you using photoshop or photoshop elements and which version?
(in photoshop it should be under Window>Actions or Window>Show Actions)
(only photoshop elements 11 has Window>Actions)
(no other version of photoshop elements has Window>Actions)
What operating system? -
Where do I put the "autoplay" code in my photo gallery?
I have a photo gallery on http://victorylcms.org/photos.html. I'm trying to add "autoplay" to it.
I got the gallery from http://galleria.aino.se/ and here is what it says to add http://galleria.aino.se/docs/1.2/options/autoplay/, but I can't seem to figure out where exactly to put it in my code to make it work properly. Thanks for any help!
autoplay
type: Boolean or Number
default: false
If true, this will start playing the slideshow with 5 seconds interval (default). If you set this to any number, f.ex 4000, it will start playing with that interval (in milliseconds)
Example:
$("#gallery").galleria({
autoplay: 7000 // will move forward every 7 secondsI got the gallery from http://galleria.aino.se/
There's a support forum for that gallery
http://getsatisfaction.com/galleria/
here is what it says to add http://galleria.aino.se/docs/1.2/options/autoplay/, but I can't seem to figure out where exactly to put it in my code to make it work properly. Thanks for any help!
autoplay
type: Boolean or Number
default: false
If true, this will start playing the slideshow with 5 seconds interval (default). If you set this to any number, f.ex 4000, it will start playing with that interval (in milliseconds)
Example:
$("#gallery").galleria({
autoplay: 7000 // will move forward every 7 seconds
Look for similar code in your page
e.g. line 182
<!--begin init code for the galleria pics slideshow-->
<script>
$('#gallery').galleria({
autoplay: 7000 // will move forward every 7 seconds
width:640,
height:480
swfobject.registerObject("FlashID");
</script>
<!--end init code for the galleria pics slideshow--> -
Where should I put trustedprincipal.conf in
Hi experts,
We have BOE XI 3.1 in our server.
We configured trusted authentication in CMC of our server machine, and created a trustedprincipal.conf in D:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86 of my client machine. I created a jsp file to access bo reports.
I can not approach http://bfphp:8080/OpenDocument/opendoc/openDocument.jsp, just get alert after running the jsp file.
However, we put trustedprincipal.conf in our server machine and remove the file from my client machine, I can approach openDocument.jsp after accessing the jsp file.
Official document says trustedprincipal.conf should be put in client, but we tried it, logon fails. When I put it in server, logon succeeds.
My question is, if trustedprincipal.conf is put in server, can anyone who knows a user of BO system access to bo system via the jsp file. So how can I control authentication of client who access to BO system, and where should I put trustedprincipal.conf in?HI,
this sounds like a general BusinessObjects Enterprise configuration topic. this forum here is for the Integration Kit for SAP.
Ingo -
Where do I put my SD card in MacBook Pro
Hi,
This may be a really stupid quesiton but I am stuck!
Where do I put my Scandisk memory card in the MacBook Pro?
I don't seem to have a slot anywhere. I am probably being very stupid!!!
Please help. ThanksYou might have one of the 'micro' cards that needs a standard SD adapter - I have a 4GB of one of those in my phone, but it came with an adapter. My camera SD cards are standard size and they fit right into the card reader and show up on my desktop.
Look for an adapter on Amazon.
Good luck,
Clinton
Maybe you are looking for
-
Unable to start OBIEE 11g Sevices on Windows 7
Hello, I have successfully installed OBIEE 11g server on windows machine 64 bit When I start BI services from all programs I get following error : SVR_GRP = JAVA Memory arguments: -Xms256m -Xmx1024m -XX:MaxPermSize=512m -XX:-UseSSE42Intr insics WLS S
-
some one help me
-
In Access you can have a drop down box on a form position in the file on a drop down list as you type. HTML DB does this as well but only with the first character. When you type a second charater it repositions to start at the second charater. Can I
-
ESS/MSS : analyse service code Abap/Java
Hi all, where I can analyse the code of WebDynpro Java and Abap for ESS/MSS services? Best regards. Miki
-
Copy express does not copying form settings
hi, i try to copy the form settings of a user settings from test database to live database. The addon works without error, but the result is bad. The form settings will not be arrived in the target database. I only check Display Settings --> UserDis