I need help with button coding to go to the next scene
Hi! I have been using flash cs5 for a few years now and I've never been great with coding since i usually just do swf animations. However I am in the process of writing a story/book and I wanted to make a little guide for all of the dragons species in the story.
Example: I had it so there is a title screen and a start button, you click the start button and you are taken to the next scene; which is a picture of a mist dragon I drew and then audio plays; describing mist dragons. in the corner there is a "next" button and when you click it, it takes you to the next species and the audio plays just like with the mist dragon.
my major problem is my code is muffed up( I know it is totally incomplete, but this code is what I am comfortable working with, anybody know whaat the full code is?). I typed in what I could remember from class... could anybody help me?
here is the code i remembered:
Stop();
btn1.addEventListener(MouseEvent.CLICK…
function btn1Listener(e:MouseEvent):void {
gotoAndStop(1, "mist dragon");
use:
Stop();
btn1.addEventListener(MouseEvent.CLICK,btn1Listener);
function btn1Listener(e:MouseEvent):void {
gotoAndStop(1, "mist dragon"); //<- you may want gotoAndPlay(1,"mist dragon")
Similar Messages
-
I need help with changing my verizon vm to the system voicemail
I need help with changing my verizon vm to the system voicemail
Deleting the iTunes account is not the solution as you will very likely lose any and all purchases ever made with the account.
If you cannot find the option on the site, contact iTunes support. -
NEED HELP WITH BUTTONS IN AS3!!
Hello, I am stumped with an action scripting problem. I'm
trying to create a really basic website in flash using buttons to
jump from scene to scene. Let's say I want to do something as
simple as make scene 1 jump to scene two right? I'll place in my
scene 2 button on my first page:
But instead of the scene changing to the next scene after I
press the button, these errors come up!!
1180: Call to a possibly undefined method on.
1120: Access of undefined property release.
1120: Access of undefined property _root.
I've tried asking in so many different forums, I usually do
pretty good with action scripting for buttons. But this is my first
time doing it with cs3. I'm utterly confused, someone please help!!
Thank you.
The code on this page is the code I was using to try to
change scenes...Oh! and whenever I try to put a code in the actual
button, it won't let me. I just get a message that says something
like "Can't have any actions applied to it".foxxpop,
> But instead of the scene changing to the next scene
> after I press the button, these errors come up!!
>
> 1180: Call to a possibly undefined method on.
> 1120: Access of undefined property release.
> 1120: Access of undefined property _root.
You're using three terms that aren't supported in
ActionScript 3.0: the
on() function, the release parameter to that function, and
_root. In
ActionScript 3.0, you'll have to give your button an instance
name and wire
it up like this:
http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3
In that blog entry, you'll see (with explanation) something
that looks
like this:
myButton.addEventListener(
MouseEvent.CLICK,
function(evt:MouseEvent):void {
trace("I've been clicked!");
Just bear in mind that you can also make that a named
function, like
this:
myButton.addEventListener(MouseEvent.CLICK, clickHandler);
function clickHandler(evt:MouseEvent):void {
trace("I've been clicked!");
> I've tried asking in so many different forums, I usually
do
> pretty good with action scripting for buttons. But this
is
> my first time doing it with cs3.
Your issue isn't Flash CS3, it's that your FLA file is
configured for
ActionScript 3.0. If you change that to AS2, you can go right
on using the
same approach you used to -- and you'll be able to attach
code directly to
objects. ;)
David Stiller
Co-author, The ActionScript 3.0 Quick Reference Guide
http://tinyurl.com/2s28a5
"Luck is the residue of good design." -
Need help with buttons in a phone simulation
Hello
I have built a telephone interface to be used for training in a Call Center.
I am attempting to allow the user to press on the numberpad to enter passwords and such.
It is only a simulation and will only work if the user presses the correct buttons.
I am able to create the simulation when the user presses different buttons such as 1234
but I need them to press 0000 (zero 4 times)
I am not sure how to do this...
I have been playing around with the advanced actions, which has allowed me to accomplish the hide and show actions when the user clicks a button, but wondering if there is a way I can
have them click the 0 on the dialpad so each time it brings up the next zero
once its gets to the 4th one, it will advance to the next slide...
Hope that makes sense
I appreciate any help or advice
thanks
MelissaHi there,
What I did, I took a variable 'counter123' and assign '0' value to this variable.
I then added a button with Advanced action, I am sharing the Screenshot of the advanced action panel.
Screen shot 1 :
Incrementing the Value on click :
The value of the variable should increase on every click, so lets add a true statement as a condition.
Screenshot no 2 :
As normally on buttons/click boxes, the project will continue as soon we click them.
lets compare the value of our variable and then pause the project.
Screen shot 3 :
last if our purpose is solved, here we have clicked the button 4 times, so that has updated the value of our counter to 4, so as soon as the counter exceeds the value, we want the project to continue.
please let me know if this helps you.
This will help you in pressing a button 4 times, and i think you can also add actions to show and hide 'zeros' in your project.
I find such scenarios very interesting and I always find help on Lilybiri's Blog : http://lilybiri.posterous.com/
Thanks -
Need help with buttons that react to rollover that create a scoll effect
hey everyone,
I'm new to flash and actionscript and am having trouble
creating what I need. I want to create a scroll area that scrolls
left and right when you rollover a left or right arrow. what I want
to scroll looks like a piece of film negative that has about 20
thumbnails in it. I only want it to show about 4 thumbs at once
though (thus the scroll is needed). so when the mouse rolls over
the arrows, it scrolls, and when it rolls out it stops in place.
eventually, i will add links to the thumbs for a better image.
I've checked out a couple tutorials on scrollbars and such
thinking that I can just go in and modify the code a bit, but the
two turorials i've tried to do have left some of the pieces out...
not very helpful when you don't know actionscript well. does
anybody have any tips or ideas?Hi there,
What I did, I took a variable 'counter123' and assign '0' value to this variable.
I then added a button with Advanced action, I am sharing the Screenshot of the advanced action panel.
Screen shot 1 :
Incrementing the Value on click :
The value of the variable should increase on every click, so lets add a true statement as a condition.
Screenshot no 2 :
As normally on buttons/click boxes, the project will continue as soon we click them.
lets compare the value of our variable and then pause the project.
Screen shot 3 :
last if our purpose is solved, here we have clicked the button 4 times, so that has updated the value of our counter to 4, so as soon as the counter exceeds the value, we want the project to continue.
please let me know if this helps you.
This will help you in pressing a button 4 times, and i think you can also add actions to show and hide 'zeros' in your project.
I find such scenarios very interesting and I always find help on Lilybiri's Blog : http://lilybiri.posterous.com/
Thanks -
Need HELP with BUTTONS (help! help!)
I am trying to create a "return to previous page" button, one that acts like the "Back" arrow on your web browser.
I want to add this on my Master page, so that every chapter will have the same button in the same place with the same result.
My manual says that "Return to Previous View" is a button option. But I can't get it to work.
Please help, I need to finish this thing TODAY (July 16)Hate to be the bearer of bad news, but I don't think what you want is going to be so easy. It isn't something you can set up in a snap. And buttons may not be what you want at all. Buttons serve rather simple functions. I think you are looking at Indexing, and some fairly complex indexing at that.
Now having said that, Return to Previous View does work (You do realize that these buttons only work in a PDF exported with Include Interactive Elements checked, right?), but you need something to get you to that next view in the first place. And I'm not sure how you can define that without indexing. Perhaps you could use anchored objects and Go to Anchor button, but I think the anchor would have to have something placed in it because it's found via the link in the object. Then a button in the appendix could be defined as Return to Previous View to get you back to the page you came from.
As you can see, this could get pretty messy. Indexing tends to move you around the book much more seamlessly. But it is also something that has to be meticulously set up after the book is completely laid out.
The InDesigner Podcast has a lesson on indexing as a request from one of his viewers. But in order to explain it he started with a lesson on Book Basics, then one on Table of Contents, Advanced TOC, Indexing, and finally Generating an Index. You can download the five podcasts from the InDesigner.com and watch them to get an idea of what's involved and how it may help in your situation.
Sorry, but even if someone here with more expertise than I in this matter comes to your aid, you still have quite a bit of learning ahead of you to pull this off. -
Need help with button and motion tween...
I'm trying to create a simple game. Right now I have one button that when clicked moves the character across the screen. My issue is trying to make the player stop looping after I click the button. If I just insert stop for the last frame it will only loop once and stop, but it will not play again after the button is clicked. I've tried using players_turn boolean but couldn't get that to work. Any help will be appreciated. Thanks!
[AS]
package
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;
import flash.events.Event;
import flash.ui.Mouse;
public class Main extends MovieClip
//Player variables
var players_turn:Boolean = true;
//Enemy variables
public function Main()
//Add event listeners
buttonAttack.addEventListener(MouseEvent.CLICK, onButtonAttackClick);
//Event handlers
function onButtonAttackClick(event:MouseEvent):void
if (players_turn == true)
//Player attacks enemy
player.gotoAndStop(2);
trace("attack");
trace(players_turn);
//trace(players_turn);
/*if (players_turn == false)
player.stop();
players_turn = true;
[/AS]player is a symbol that is classic tweened. It has to frames. The first is a still frame with a stop action. The second has been converted as a symbol to show the player move across the screen and back. When the attack button is clicked the player moves across the screen and back but it keeps on looping. If I add a stop action to the last frame it will move and comeback and stop but it will not move anymore when the button is clicked again.
-
Hi i have a problem with some coding on my assingment can some expert help me please. i have been trying to work on it for days. Thanks :-
public class AnnualHireRevenue
private static final int vehicleno = 12;
double[]numbers = new double[vehicleno];
public AnnualHireRevenue()
for(int i =0; i<vehicleno; i++)
numbers[i] = new double();
public void setRevenue()
for(int i=0; i<vehicleno; i++)
System.out.println("Please Enter Vehicle No"+(i+1));
numbers[i] = EasyIn.getDouble();
if (numbers <=12)
System.out.println("Please Enter Vehicle Yearly Revenue");
numbers[i] = EasyIn.getDouble();
else
System.out.println("InvalidNumberPleaseEnteragain");
numbers[i] = EasyIn.getDouble();
I am trying to create to arrays the first one works but this one don't the first on is a String array with int for loop.
This one is a double array and having problems for some reason.
I would be great full if some one can help me thanks
my email is [email protected]public class AnnualHireRevenue
private static final int vehicleno = 12;
double[]numbers = new double[vehicleno];
public AnnualHireRevenue()
for(int i =0; i<vehicleno; i++)
numbers[i] = new double();
public void setRevenue()
for(int i=0; i<vehicleno; i++)
System.out.println("Please Enter Vehicle
icle No"+(i+1));
numbers[i] = EasyIn.getDouble();
if (numbers <=12)
System.out.println("Please Enter Vehicle Yearly
arly Revenue");
numbers[i] = EasyIn.getDouble();
else
System.out.println("InvalidNumberPleaseEnteragain");
numbers[i] = EasyIn.getDouble();
I am trying to create to arrays the first one works
but this one don't the first on is a String array with
int for loop.
This one is a double array and having problems for
some reason.
I would be great full if some one can help me thanks
my email is [email protected]
Get rid of your constructor. That's the 1st problem.
public AnnualHireRevenue()
//for(int i =0; i<vehicleno; i++)
//double is a primitive type, so 'new' won't work.
// numbers[i] = new double(); -
Need help with Buttons with ActionScript
I am trying to create a button that will go to a different
scene in my flash project using
on (press) { gotoAndPlay(about,1);
I have done this several times before, however, for some
reason every time I try to put actions on my buttons it says that
actions can't be applied to it. I have even tried switching them to
movie clips. I can't figure out what is wrong.
Any help would be greatly appreciated!
ThanksThanks for you help!!!! That worked!
-
I need help to locate my pictures in the cloud
When my son updated my phone early this year it wiped out all my pictues on my I-phone 4S
How do I access the cloud to view my pictures??Do you have Photo Stream enabled with your iCloud account on your computer?
iCloud is temporary storage - limited to 1,000 photos and 30 days for each photo.
Photos/videos in your iPhone's Camera Roll can and should be imported by your computer as with any other digital camera especially before installing an iOS update. -
I need help with 'Documents & Data' taking up all the space on my iPhone
Hello, I have searched for days on the internet for a way to solve my problem but nothing and I really mean NOTHING seems to work at all.
I can't buy any software either.
When I go into Settings>iCloud Documents & Data are off and have been off all the time. Yet I STILL have Documents & Data taking up 5 GB of my phone and I don't have much space either.
I have hopelessly tried deleting most of my messages and NONE and I mean NONE of the space has been given to me, nothing changed but my messages completely disappeared. No I do not use iCloud and I have the latest software updates. My phone is not jailbroken. I even tried deleting most of my apps and installing them again but that didn't work either. Photos take a small amount of space on my iPhone.
I really hope someone can help me this is a really big issue for me and I do not fancy resetting the phone back to its Factory settings.
I am new to the apple forum so sorry if this isn't in the right category or something. Thank you in advance. I also do not really fancy going all the way to the centre of the city to go to a Genius Bar.
By the way, a few minutes ago I tried backing up my iPhone and syncing it again and a message popped out telling me that I need additional 4 GB of space in order to let it sync and I do not understand this, Documents & Data take more and more of my space every time I look. Also all the messages I delete come right back when I turn the phone on and off.Hi demolitonlovers,
If you have unaccounted for data taking up storage space on your iPhone, you may find the following articles helpful in identifying what is taking up the space and how to remove it:
iPhone, iPad, and iPod: Understanding capacity
http://support.apple.com/kb/ht1867
iOS: "Not enough free space" alert when trying to sync
http://support.apple.com/kb/TS1503
Regards,
- Brenden -
Need help with Adobe Premiere Elements 9 for the Windows XP PC
Just got it today, so I could make my own video and audio files from pre-existing ones. I first used a version of Adobe Premiere back in school in the '90s, and seemed to easily make them there, while not working on school work. There was a row for inserted video, and a row below that for inserted audio. I'm out of college currently, and just bought Elements 9, as said, but am struggling with it. Could someone please tutor me to get me started? Perhaps even talk over the phone? I'm trying to combine different video and audio tracks into a new singular video/audio file.
Thanks in advance.
>>
Welcome to the forum, but unfortunately, you have posted to the Premiere Pro, CS 4 and Earlier forum.
Instead, you should post to the PrElements Forum, as few here will know anything about PrE 9.
Now, the starting secret of PrE is your Source Files. Can you tell us the full details of those?
Next, matching those to the correct Project Preset, is the next step. Can you tell us what you chose at New Project?
For a list of some of the resources for learning PrE, see this ARTICLE.
Good luck,
Hunt
>>
What are Source Files? You mean the videos I'm using? The main one is here:
http://www.tfarchive.com/cartoons/videoclips/bones.php
Two to four additions to it will be used with video parts from here:
http://www.tfarchive.com/cartoons/videoclips/us_commercials.php
And my first project is a .prel file. Is that what you meant?
Is it possible I could get assistance over the phone?
Thanks.I created a more precise list of what I wish to combine to make one new video program:
Audio:
http://www.tfarchive.com/cartoons/videoclips/bones.php
Transformers_S2.mpg (0:00 - 0:33) (All)
Video:
http://www.tfarchive.com/cartoons/videoclips/bones.php
Transformers_S2.mpg (0:00 - 0:08)
Fade to
Transformers_S2.mpg (0:31 - 0:33)
Fade to
http://www.tfarchive.com/cartoons/videoclips/us_commercials.php
Rodimus.mpg (0:00- 0:08) (Note: Should start after grey jet passes by on top of screen (less than a second in), and stop after blue robot tramples over the other two robots, cutting off the part where he's shot at from the sky, and all that afterward.)
http://www.youtube.com/watch?v=5yd1OmZvU8w
(1:34 - 1:38) (Note: Should start as soon as video beings, and end when the four side robots are shooting their laser guns, and the one in the middle shoots his shoulder-cannons, cutting off the part with the bridge and missiles, and everything else afterward.)
http://www.tfarchive.com/cartoons/videoclips/us_commercials.php
trypt.mpg (0:15 - 0:16) (Note: Only shows the brief second or two where the five robots quickly transform to one big robot.)
http://www.youtube.com/watch?v=h23kRJ9i058
(5:22 - 5:25) (Note: Should start with all 5 robots appearing onscreen, and end with them, in a combined robot, firing at the screen, cutting off the white laser-shooting base/battle-station and everything else afterward.)
http://www.tfarchive.com/cartoons/videoclips/bones.php
Transformers_S2.mpg (0:23 - 0:33) (Note: Should start with lava-flowing ending, and lined-walkway appears, and goes to the end.)
Not sure if I can get all of these videos in, in the 33 second time limit. I'm willing to cut either the trypt.mpg clip, and/or the youtube link-clip below it.
I have a youtube downloader program, so no worries there. Also need to know how to cut video so I can make these clips that are from youtube and tfarchive.
I also want the video to contain the same quality as shown from each file here, and all fit the size of the largest file (the youtube one, I think it is).
Please LMK how to do this, and if any of this is unclear. Things like this are all I really want to use APE9 for, so I won't be asking much else here.
Thanks. -
Need help with SQL for selecting ID where the sequence does not match..
I have the following dilemma:
Database contains IDs as follows:
Incident#, Case#, & Part Sequence#
example
Record 1
Incident_Number = 123456
Case_Number = 1
Part_sequence = 1
Record 2
Incident_Number = 123456
Case_Number = 1
Part_sequence = 2
Sometimes the user will delete (let's say) Record 2 after creating a new Record 3
So now the sequencing goes as follows:
Record 1
Incident_Number = 123456
Case_Number = 1
Part_sequence = 1
Record 2
Incident_Number = 123456
Case_Number = 1
Part_sequence = 3
Now there will no longer be a Part_Sequence 2
Need a SQL to select all records where the maximum part sequence > than the count of Incident_number||'-'||Case_number
I tried the following:
select a.incident_number||'-'||a.case_number||'-'||a.part_sequence
from chsuser.a_compl_summary a
where a.entry_date >= '01-may-2011'
and max(a.part_sequence) > count(distinct a.incident_number||'-'||a.case_number)I end up getting a ORA-00934: group function is not allowed here (highlighting on the Max(a.part_sequence) portion.
Any suggestions/hints
Thanksselect incident_number || '-' || case_number || '-' || part_sequence
from (
select incident_number,
case_number,
part_sequence,
max(part_sequence) over(partition by incident_number,case_number) max_seq,
count(*) over(partition by incident_number,case_number) cnt
from chsuser.a_compl_summary
where entry_date >= DATE '2011-05-01'
where cnt != max_seq
/SY. -
Hi, I hope I can get some help with this form that I am desperately trying to finish.
I am unable to get an expandable text field to recognize both 1.) the positioned subforum underneath and 2.) the page break. I'll attach the file if it helps get an understanding of what I mean, and maybe someone can see what I did to royally screw it up. The area of the form in question is on page 4 of the attached document. I want the user to be able to write as much as they need in the summary section, and still fill out the last section afterwards.
If more info is needed, let me know and I will do my best to describe what I did. My last solution I tried, before giving up, was to wrap the previous section, as well as the next section of the expandable text field, into its own subforum. Then, I nested the subforums together in another subforum.
Thanks in advance.
-Joshua
Attachment Link:
https://docs.google.com/open?id=0B2iKKEocs4_gTTlwZEpHTWxZVkEIn case anyone sifting through forums, looking for the answer to this question, needs the answer: paulk07 was able to fix my document by unwrapping all of the subforms on the last page and then wrapping it in only 3 subforms (2 positioned/1 flowed) and then set the page to flow.
From there, I set the margins so when the sectioned wrapped to a new page, it didn't end/begin at the edge of the page.
Thanks again paulk07 -
stupid question maybe but i'm a beginner, and hey..there are no stupid questions, right? well, i may prove that wrong...anyway...
I can't relocate a button, or any other component for that matter. When I try to make a simple applet with just one button showing, then it works perfect...but when I make the applet a little bigger with some graphcis and text, the setLocation() and setSize() methods don't work. the wierd part is that I don't get an error message, the compiler just ignores those lines...so it seems anyway.
If anyone can help me I'd be very greatful
thanx a lotBoss,
there is something called Layout Management in Java,
see types of layouts in the Java API.
Applet default is FlowLayout,
so modify your layouts and try,
u need a basic understanding and reading of Layouts
in Java..take a tutorial...
gud luck!
Maybe you are looking for
-
Apple mobile device service, what is this?
Apple mobile device service, what is this?
-
AVI File Captured in Premiere Elements 8 Only Plays First Few Minutes
Hello folks, I'm totally new to this. My problem: I've recently installed Premiere Elements 8 and used it to capture some mini DV video tapes (via firewire), without any significant problems (other than a few freezes). Now I've tried to capture som
-
Launch application according to script/question result
Hello I would like to install an application via ZENworks, but I need to ask the user if he wants to install it or not? Can I ask this to the user in a script and then launch another application (or the same) only if the user selected 'Yes' for examp
-
BOM Report with Alternative Items
Hello Experts, I am trying to write a query of BOM Report with the first Alternative Item (from OALI) Your help please.. Thank You Meitalmo
-
Bridge with clients & multiple VLANs on 1242 AP
Hi, I am trying to set up a test as per the attached diagram. I am looking to use 2x 1242 access points to bridge to a remote part of the network. I currently have 2 VLANs on the network, all network devices are on VLAN 1 for management and client ac