ActionScript 3.0 :: 2 Buttons Produced Error

May 25, 2009

Here are two buttons (placed in a single frame script on the timeline) which produce an error:[code]The error is: 1071: Syntax error: expected a definition keyword (such as function) after attribute funtion, not btn1Funtion.

View 1 Replies


Similar Posts:


Professional :: Editing An Interactive CD Rom Which Was Produced For A Client?

Jun 2, 2010

i am completely new to the whole aspect of flash and dreamweaver etc. and have recently been given a project of editing an interactive CD rom which was produced for a client by an outside company.
 
I have managed to grab the basics of changing the text and the images and stuff, but when i export it as a .swf flash movie, when i view the cd, all of the slides come on in very quick succession,it is supposed to be the first slide and then you click on a "next" button for each other slide,i know i've messed with the interactive elements somehow but i don't know how, or how to fix them as i haven't got a clue about the interactive aspects to flash.

View 5 Replies

ActionScript 3.0 :: Converting Code-produced Shapes Into Symbols/clips/sprites?

Nov 24, 2010

I'm working on a project that involves making a globe in flash which will have many particular points (all the worlds major cities by using their longitudes and latitudes). It's all 2D made to look 3D.To make the "Sphere," I put together some code that stacks a bunch of ovals that creates the illusion of space, ala the code below...

//AS3
function magicTrigFunctionX (pointRatio){
return Math.cos(pointRatio*2*Math.PI);
}

[code]....

Now, my problem is that in order to assign the longitude and latitude information I need to be able to address each oval individually (not only which one, but also eventually the angle/radians of each oval for the latitude) and I've run into a snag...I don't know how or perhaps exactly what to do, because I know how to make it a symbol and class if the object was already made visually using the oval tool in the tool bar, but I can't figure out (after taking a bit of time looking up on how to use arrays and classes) how to do it in the AS3 code where I actually made the "sphere."

View 0 Replies

ActionScript 3.0 :: Flv Files Be Different And Kinda Awkward, If Their Produced In Older Or Newer Version Of Flash Video Encoder?

Jun 23, 2009

Can flv files be different and kinda awkward, if their produced in older or newer version of flash video encoder? Or anyoher software programs that can convert to the flv format? If so, have any of you folks come across an easy way to fix?

View 1 Replies

ActionScript 3.0 :: Error #1009 On Buttons

Jul 27, 2010

Ive been getting a 1009 error when i try to add an event listener to my buttons. no matter what im doing i keep getting this error.

heres my error:

Quote:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at bb_fla::MainTimeline/frame57()

heres my as3 code:

ActionScript Code:
stop();
_save.addEventListener(MouseEvent.CLICK, saveAll);
function saveAll(event:MouseEvent)

[Code].....

View 2 Replies

ActionScript 1/2 :: Error With Linking Flash Buttons

May 23, 2010

i m using flash  player 8 and when im trying to make a link button of my ready  tamplate im getting an error. i program the link action like this:
  
on(release) {
getURL("http://www.carmela-gallery.net");

 
but for some  reason i get this error when i press the check for errors button:
 
**Error** Symbol=About us, layer=Layer 1, frame=1:Line 1: Mouse events are  permitted only for button instances on(release) {Total  ActionScript Errors: 1      Reported Errors: 1
 
and of curse the link isnt  working when i test it. will be be happy if you help me to get forward  with this problem. let me know how we get forward with it.

View 8 Replies

ActionScript 3.0 :: Navigation Buttons Error On Website?

Aug 31, 2009

My three navigation buttons on my website ('but1', 'but2', 'but3') are programmed to go to each section on my timeline: 'home', 'pics' and 'contact'. However, whenever I click on my homepage button (but1), it doesn't do anything. The other ones are fine but it's just the home button that doesn't seem to link anywhere. My code is below,

[Code]...

View 0 Replies

ActionScript 3.0 :: Buttons - Use Later In Timeline Without Getting Error 1009?

Mar 14, 2012

I have a button symbol in the Library that I want to use *later* in the movie (i.e. not on frame 1!). When I get to frame 50 in my movie I want to stop the timeline and have the button appear at that point but not before. At the moment there is nothing else in my movie apart from an instance of the button named 'button01' placed at frame 50 on its own layer, a stop action on the timeline at frame 50 and the following code on frame 1[code]...

Is there something I must do to instantiate the button before I can use it later in the movie? I don't want to have to put it on the stage at frame 1 and make it alpha=0 as I saw suggested somewhere else I'd like the button to appear only when I need it.

View 14 Replies

ActionScript 3.0 :: Testing Buttons To Get To Other Scenes - 1021 Error

May 25, 2010

I'm testing buttons and making them navigate to different scenes for one of my teachers who wants to start building websites in one of his classes.
But anyways,

My problem is this; "1021: Duplicate function definition.

Is it because I used the same code (but different instance names) to navigate from scene to scene?

View 15 Replies

ActionScript 3.0 :: Getting Error Codes When Linking URLs To Buttons?

Sep 14, 2011

I am getting these error codes-
Call to a possibly undefined method addEventListener through a reference with static type Class.
Warning: 3594: exec is not a recognized method of the dynamic class RegExp.
I am getting these error codes. I inserted the link where my flash file is. [URL].

View 2 Replies

ActionScript 3.0 :: 1013 Error For Buttons Finding Cue Points

Jul 27, 2009

Using the code below I get an error message 1013: The private attribute may be used only on class property definitions.

View 4 Replies

Professional :: Duplicate Function Definition Error On Buttons?

Jan 23, 2011

What I'm looking to do is create a banner that transitions between different photos while there are small square buttons on the side that when the user clicks on them, it jumps to the corrosponding frame where a new photo begins showing. I've seen it a bunch of times on other websites.After following the advice found here: http:[url]....Everything was going well until I hit a snag. When trying to preview my movie I got the following error:1021: Duplicate function definition

Now, I know there is a very obvious error here in my button scripts, but as I said, I have no idea what I'm doing. Can someone look at my code and tell me what's wrong and what I should change? I'll post all five scripts.The instance names by the way are "sidebutton1" thru "sidebutton5" if that's any help.Here's my codes for each of the five buttons (one of these code bits per button)

sidebutton1.addEventListener(MouseEvent.CLICK,f);
function f(e:Event):void{
gotoAndPlay(1);[code].......

View 3 Replies

ActionScript 3.0 :: Error 1120 When Creating Buttons From Images?

Jun 23, 2011

I have 3 images that are displayed sequentially. Image 1: layer 1 (frame 1 to frame 24), Image 2: layer 2 (frame 25 to 49), Image 3: layer 3 (frame 50 to 74).  The opacity of each image changes in its frames and and each image has a classic tween associated with it.  Pretty basic stuff.
 
On frame 1 of the first image I created a symbol that is a button, lets call it image1_btn.  On frame 50 of the third image I created a second button, lets call it image3_btn.I created an Actions layer as the first layer and wrote the following code:
  
image1_btn.addEventListener(MouseEvent.CLICK,onimage1Click);var image1link:URLRequest = new URLRequest("http://purplerosehome.com/shopping/spartina_449/page_1.aspx")function onimage1Click(event:MouseEvent):void{    navigateToURL(image1link);}  
image2_btn.addEventListener(MouseEvent.CLICK,onimage2Click);var image2link:URLRequest = new URLRequest("http://purplerosehome.com/shopping/le_cadeaux/page_1.aspx")function onimage2Click(event:MouseEvent):void{    navigateToURL(image2link);}  

[code]....

View 3 Replies

ActionScript 3.0 :: Code Snippets Buttons - Syntax Error

Sep 19, 2011

Hi, whenever I click on my code snippets button in Flash Pro, the output panel gives me a message about a missing bracket at the end of an argument list. In addition, none of the code snippets work. How might I correct it?

View 1 Replies

Buttons To Load MP3 Files And Play Them - 2037 Error

Sep 12, 2011

I have 2 buttons in my AS3 project that load .mp3 files and then play them. I have 2 buttons that switch between those files that aren't working. I get an error saying:

Error: Error #2037: Functions called in incorrect sequence, or earlier call was unsuccessful.
at flash.media::Sound/_load()
at flash.media::Sound/load()
at player_fla::MainTimeline/playMusic1()

I'm thinking that means the file isn't loaded before it tries to play, is that right? How can I check to see if the file is loaded before playing?

Here is my code:
function playMusic1(evt:MouseEvent):void{
channel.stop();
channel2.stop();
songPosition = 0;
[Code] .....

View 1 Replies

ActionScript 2.0 :: MovieClip Buttons Inside Clip Error

Aug 25, 2010

My buttons work fine in the main time line, but I need to place them in frame 1 of a mc_pages, I get an error about it saying "the statement must appear within on/onClipEvent handler". And I just can't figure out how to do that to save my life. If pc's were cheap their would be a pile of them outside on the curb. I'm thinking I need to split up this action and place some on frame 1 of the main time line and keep some for for my button on frame 1 of pages, but what part? how?

My button loads a new swf in the mc placeholder.
btn01.onRelease = function () {
// let's first unload the current movie, to refresh the cache
(placeholder.unloadMovie());
// SETUP THE MAIN VIDEO PLAYER
autoPlay = "true"; //
autoLoop = "false"; //
[Code] .....

View 9 Replies

Actionscript 3.0 :: Error #1009 - Struggling To Get To Buttons Working

Mar 11, 2010

I 'm working on my site and I 'm struggling to get to buttons working. It is basically very simple:

[Code]...

View 7 Replies

ActionScript 3.0 :: Handle Sliding Menu Buttons Error?

May 29, 2009

i have a movie clip (mc_1) inside of this movieclip i made

-one button ("start") : by its event Roll_Over the animation (of mc_1) starts

-ten menu buttons (b_1,b_2,b_3,....,b_10) : at first they're not on the stage, but they appear one by one,frames by frames, after I rolled over "start".

-one invisible button (inv_btn): placed right under the area occupied by those previous buttons..by its RollOut event i make the menu rewind so the ten buttons disappera one after one other.

now i have to put the menu buttons inside an array (cause i made a script for dynamic loading images from XML) but i receive #1009: Cannot access a property or method of a null object reference. this is why i put in the array buttons that at first doesn't even exist...and when the menu closes disappear again..how can I handle the situation?

//this is the array code i put in the first frame of mc_1.
var bottone:Array = new Array(b_1,b_2,b_3,b_4,b_5,b_6,b_7,b_8,b_9);
for(var i=0;i<bottone.length; i++) {
var but_var:MovieClip = MovieClip(bottone[i])
but_var.buttonMode = true;
but_var.id = i;

View 3 Replies

ActionScript 3.0 :: Argument Error 2109 When Buttons Are Clicked?

Sep 19, 2009

I am working on a website and I have my buttons within a MC and they are revealed when you rollover the MC.All buttons are independent buttons from my library and they each have unique instance names. These very instance names for the buttons match frame labels that I have in the first scene/main timeline.Here is the argument error that I receive when I click on one of my four buttons:

ArgumentError: Error #2109: Frame label instance7 not found in scene Scene 1.
at flash.display::MovieClip/gotoAndPlay()
at secondsdwebsite2_fla::MainTimeline/btnClick()

[code]......

View 10 Replies

ActionScript 3.0 :: 1120 Error - Buttons Don't Appear When Publish The Site

May 3, 2011

I'm getting a 1120 Access of Undefined Property Error on Frame 1, Line 7. Also my buttons do not appear when I publish the site. Below is a link to my file. [URL]

View 14 Replies

ActionScript 3.0 :: Timers And Functions - Disable Buttons - Getting A Coercion Error

Aug 18, 2010

I've been having trouble in creating a game where I need to disable some buttons so that an animation can play. I've tried using a function to call a timer, but I keep getting a coercion error. Can someone steer me to where I need to go to be able to figure this out?

View 8 Replies

Flash :: Make Moving Images Buttons (getting Error 1009)

Apr 24, 2011

I'm trying to create a portfolio website, and I want my picture strip to move in and then become buttons. I have made them buttons, but once the strip stops moving I keep getting this message.

[Code]...

View 1 Replies

Actionscript 3 :: Getting Error #1009: But Buttons Loaded On Movie Load?

Dec 28, 2011

In my 1st frame I have the following action script and it works fine.

cal.addEventListener(MouseEvent.CLICK, function(){gotoAndStop( "cal" )});
trucks.addEventListener(MouseEvent.CLICK, function(){gotoAndStop( "truck" )});
raven.addEventListener(MouseEvent.CLICK, function(){gotoAndStop( "raven" )});
frank.addEventListener(MouseEvent.CLICK, function(){gotoAndStop( "fr" )});

[Code].....

I've posted a lot of code below. It still loads / traces fine on frame 1. On other frames only the last two come up in a trace (though they should all be the same). Then when returning to frame 1 they are all null.

View 1 Replies

ActionScript 3.0 :: Buttons To Call PDFs Of Menus - Error With URLRequest

Sep 9, 2010

Basically im building a site and using buttons to call up PDFs of menus. Found some code and adapted it to suit, but am getting some errors:
desc: 1137: Incorrect number of arguments. Expected no more than 1.

import flash.net.URLLoader;
cafe_btn.addEventListener(MouseEvent.MOUSE_DOWN, buttonclicka);
function buttonclicka(event:MouseEvent):void {
var homeLink:URLRequest=new URLRequest("menus/cafe.pdf","_blank");
navigateToURL(homeLink);
[Code] .....

View 2 Replies

ActionScript 3.0 :: Try To Do Actions To The Menu Buttons And Getting TypeError: Error #1009?

Mar 28, 2012

I keep getting this message in flash cs4 when I try to actions to the my menu buttons

"TypeError: Error #1009: Cannot access a property or method of a null object reference. at Enigma_fla::MainTimeline/frame1()"

[Code]...

Frame 1 on the timeline is empty, so I have no idea what I'm doing wrong.

View 6 Replies

IDE :: Deep Linking, No Error Messages, But Buttons Wont Work?

Jun 16, 2009

stop();
reel_btn.addEventListener.(MouseEvent.CLICK, onReelClick);
samples_btn.addEventListener.(MouseEvent.CLICK, onSamplesClick);

[code]....

View 2 Replies

ActionScript 3.0 :: Start 2 Motion Tween And End With Buttons Shown - Error 1009

Oct 27, 2009

I am making a webpage for class and i copied all the code from previous projects that i made that worked fine. I made a menu that once you go over the button it starts a 2 motion tweens that end with buttons appearing. i keep getting the message
TypeError: Error #1009: Cannot access a property or method of a null object reference.

The whole code is this
stop();
back.addEventListener(MouseEvent.MOUSE_OVER,back1);
function back1(event:MouseEvent):void {
gotoAndPlay("one");}
pump_link.addEventListener(MouseEvent.MOUSE_DOWN,pump_btn);
function pump_btn(event:MouseEvent):void {
MovieClip(parent).gotoAndPlay("pumpkin_frame", "pumpkin");}

View 1 Replies

ActionScript 3.0 :: Error "Error #2044: Unhandled IOErrorEvent:. Text=Error #2032: Stream Error

Oct 7, 2010

hey im trying to make a mp3 player and when u click on a play btn it plays that song. but i keep getting this output error "Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.
at slide_fla::MainTimeline/frame1()"
this is my code

ActionScript Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
var slidebind:Rectangle = new Rectangle(3, 3, 159, 0);
var loadsnd:URLRequest = new URLRequest ("s1.mp3");
var thissnd:Sound = new Sound();

[Code]...

View 1 Replies

ActionScript 3.0 :: Buttons Loading Sections - Error #2007 : Parameter Child Must Be Non-null?

Jul 5, 2010

I have a class that creates a navBar with some buttons. Each button loads an external .swf and everything is working just fine BUT the code is really awkward. I also wanted to use TweenLite to add transitions from section to section.I also wanted to handle the "section change" process from yet another Class (SectionChange) but whenever I try it I fail miserably. Here's what I have (including the vars), without the SectionChange Class, that's working.

private var _app:Sprite;
private var _navData:Array;
private var _loader:LoadDisplayObject;[code]....

I don't know what I'm doing wrong here but I get tons of errors with this code.

edit: Now that I'm adding the _sectionChange to the display list I only get the following error: TypeError: Error #2007: Parameter child must be non-null.

View 2 Replies

ActionScript 3.0 :: Loading Different XML Content With Buttons - Getting An Error #2007: Parameter Text Must Be Non-null?

May 5, 2009

I'm trying to load different XML content with buttons. Basically all i'm able to do right now is have the XML load when I test the movie. Outside of that I haven't been able to get my script correct to call up the XML when a button is clicked.Here's the code i've been trying:

var content_req: URLRequest = new URLRequest ("http://www.kirupa.com/net/files/sampleXML.xml");
var content_ldr: URLLoader = new URLLoader (content_req);
content_ldr.addEventListener(Event.COMPLETE, onComplete);[code]....

So this is wrong because when i export my movie and click on the button I get this message:

TypeError: Error #2007: Parameter text must be non-null. at flash.text::TextField/set text()
at dynamicText_fla::MainTimeline/getnewText()

Also, when the XML does load into the text field, I'm getting the entirety of the XML document, not just the bits of information that I want. It wasn't doing this before when I would just export the movie and the XML information would come up in the output panel.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved