Flash Movie In Cs4 - Keep Getting Syntax Errors
Oct 27, 2010i'm trying to make a simple flash movie in cs4. scene 1 > click a button > gotoandplay scene 3 thats all.
[Code]...
i'm trying to make a simple flash movie in cs4. scene 1 > click a button > gotoandplay scene 3 thats all.
[Code]...
using action script...
stop();btn001_btn.addEventListener(MouseEvent.CLICK,showimage1);function showimage1(event:MouseEvent):void { gotoAndPlay(10);}btn002_btn.addEventListener(MouseEvent.CLICK,showimage2);function showimage2(event:MouseEvent):void { gotoAndPlay(20);}
however movie is playing without stopping to "Listen" for a Mouse CLICK. Images placed at frame 10 and 20 should appear only when CLICK'd.
This code is straight out of Classroom in a Book CS4.
I'm a junior developer and I'm having some problems with my flex builder 3. Every time I make a new project, flex builder detects syntax errors like:
1084: Syntax error: expecting rightbracket before leftbrace. FotoBeheer line 23
1084: Syntax error: expecting rightbracket before public. FotoBeheer line 22
1084: Syntax error: expecting rightparen before s. DomoticaSystem line 16
1093: Syntax error. DomoticaSystem line 16
Nevertheless, Fotobeheer will run, but any other program just won't even start. Does anybody have any ideas how to solve this problem?
I'm starting to write an app, using localized strings. But I'm getting errors in a properties file, 5 errors, in lines 8 to 12, although there's only one single line in the property file. [URL].
View 2 RepliesI have an object named "Defer" that I need to access. That object only exists in frame 2 of a movie clip named: B2_mc. The other 4 frames of the movie clip B2_mc do not contain the "Defer" object. When I try to access "Defer" with the following code:
Defer.addEventListener(MouseEvent.CLICK, B2Redd);
function B2Redd(event:MouseEvent):void{
B2_mc.gotoAndStop(4);
}
The .swf doesn't run and the error message says I'm attempting to access an undefined property. I've never tried to access an object that wasn't on the stage, so I know my syntax is wrong for trying to access "Defer" since it's not on the stage. What's the correct syntax for drilling down to an object that may be buried deep somewhere?
I have 2 errors after test movie from a mx 2004 file with Flash Pro 8. Errors : as follows :
"Error" :Symbol=PuzzlePiece, layer=Layer 1; frame=1, Line 1: The class or interface 'PuzzlePiece' could not be loaded.
"Error": Symbol=DropZone,layer=Layer 1:The class or interface 'DropZone' could not be loaded.What cause the errors ?
Why I am getting errors when I export this flash file as a swf movie. It seems that the actionscript has "duplicate function definition" I do not understand where OI am going wrong.
View 2 RepliesI want to move an movie clip according to the size of the entire flash movie, rather than just the movie clip. Anyone know the correct way to do this?
View 6 RepliesI have a movie clip that exists only in the library linked to a scrollpane component using its linkage identifier (the name of this MC is content_mc). It scrolls perfectly. However, in the movie clip there are additional movie clips I would like to control (green_mc), but for that I need to be able to access them using DOT syntax. How can this be done? I'm assuming that since the movie clip in the library has "export in first frame" checked that I would be able to access it somehow like this[code]...
View 1 RepliesFor my final project we have to make a flash video player with a custom skin to upload to our websites. We did something similar to this with our first project but this is supposed to be a youtube like flash player.We kind of got pressed for time and were not able to go into detail with this project so the teacher gave us the code and I put it in exactly how it should be but im pretty sure i have something misplaced or I am missing a step. I get about 9 different errors when I go to test the movie. and nothing works.I am doing wrong or can you point me in the direction of a tutorial on this as I have been searching for tutorials on this with no luck.
ActionScript Code:
import fl.video.FLVPlayback;
import fl.controls.List;
[code].....
play ();ifFrameLoaded ("content", "loader") { gotoAndPlay ("content", 1);}downloaded = math.floor((_root.getbytesLoaded()/_root.getbytestotal())*100) add "%";_root.bar.download_bar.gotoandstop(downloaded);bytesloaded = math.floor(_root.getbytesloaded()/1000);bytestotal = math.floor(_root.getbytestotal()/1000);_root.bar.message = bytesloaded add "Kb";_root.bar.message2 = bytestotal add "Kb";
this is for a loader on an already created flash. Which I am updating. All I am doing is changing a picture that has no coding with it, and changing the publish settings. The publish setting for the original was set for flash player 5, however I need it set to flash player 8. After I change these settings and export the movie to a .swf, I get the errors.Has the action script changed that much from flash 5 to flash 8?
I'm pretty new to Flash and my first project is my own on-line portfolio. I found (what I think is a Flash 5) code on this board to create an infinite menu. I'm trying to tweak it so that it works in AS 2.0 for CS3 and I keep getting a syntax error. [code]...
View 2 RepliesI am looking for examples on typing the criteria for if /then statements, for loops, etc. Things such as the way to type "or" (|) and the way to say "not equal to", etc.
View 3 Replieshave anyone can tell me what syntax error on this actionscript (actionscript3.0)?
var rotY: Number = (mouseY - (stage.stageHeight / 2)) / (stage.height / 2) * 400;
I don't know if this is the right place but I have a simple question about Flash Builder.
In the following example, how can I change the color of the "MovieClip"? I want my variable types highlighted.
private var myMc:MovieClip;
I've done most of my code in as3, working from either document class or classes. I've never done action script from within the actions panel (within Flash cs4). My question is do I need to follow the as2 manual in order for majority of code to work ? for example. If I want to do a loop. I can't do a
addEventListener(Event.EnterFrame,loop);
I have to do
varible = onEnterFrame()
[code].....
I want to put shortest int in shortest:
shortest = 500;
for(i = 1; i <= _global.var_process_count; i++) {
if(_root["process" + i].process_time_original.text < shortest)
shortest = _root["process" + i].process_time_original.text ;
}
What's wrong with above lines of code?
I used syntax I found here AS3: add event listener to loaded swf
[Code]...
MySWF loads without problem. It doesn't really returns the class mySWF so I wonder if this is really the right syntax. And actually I don't receive anything. I am of course dispatching custom event from mySWF. Flash seems really a nightmare to cope with custom events in practice compared to other platforms.
I've got an array that looks like this, iterating through:
(languageArray[i].languageName); //e.g. "French"
(languageArray[i].languageCode); //e.g. "fre"
I'm trying to populate a fl.controls.ComboBox dataProvider with this array. What I want to do is set the labelfield, as shown in the documentation:
[Code]...
In other words I want the name to be displayed, and the 'data' to be the code, which will be called when I click on the item. But the labelField is not the same as "French". How do I create the two fields in the array such that I can designate the first as labelField and the second as data?
I wrote a singleton class to keep track of some variables across my application. I am getting a syntax error that I can't figure out, I am sure that I am missing something simple but it's been one of those days. Anyone see something wrong with my code?
The error is 1084: Syntax error: expecting rightparen before resultNumber.
public static function setResult(int resultNumber, int value): void {
switch(resultNumber) {
case 2: { this.result2 = value; break; }
case 3: { this.result3 = value; break; }
case 4: { this.result4 = value; break; }
case 5: { this.result5 = value; break; }
[Code] .....
Trying to add syntax highliting to Flash Builder withoutn having to do it from scratch.Does anyone know of a eclipse plugin that supports custom syntax highliting 'presets'?Trying to achieve something similar to solarized.URL...
View 2 RepliesI have downloaded a component using the duplicate symbol function, it works fine when published with Flash Player 7 but when I try to update it to Flash Player 8 and publish it produces this error message:[code]
View 3 RepliesIve been working on a pong game, and its coming alond well, but i have a problem with that if your score is 5, or the AI's score 5, it goes to the 'you lose/win' screen.Well, ive been working with this:
if(bluesco==5) {
gotoAndStop(6);
}
bluesco is the enemys score
6 is the lose frame
Ive tried everything i can, ive added _root.'s, changed the equals (to things like '=', '==', '>=4'), and tried things like 'nextFrame' instead of '(6)', ive changed the instances thousands of times, and if it helps:
score = 0;
bluesco = 0;
Ive also put the top code on frames, movieclips, even buttons, but i either get these errors: Nothing happens when the score gets to 5.It goes to frame 6 as soon as the frame is loaded
I am very new to Flash. I am currently putting together a flash based advent calendar but coming stuck on a code which keeps throwing back a syntax error. The code I have input is
on(release){this.play();}
Which runs a movie clip when you click on a box.
See the tutorial here to see where I'm coming from: [URL]
Is there a way to import / export Syntax Coloring in Flash Builder? If not how hard would it be to build?
View 1 RepliesI am getting 2 syntax errors out of this. I am new to Flash. How can I fix this?
var paddlepos:int = paddle.x.position
if; (paddlepos > 253)
{
paddle.x.postition = 253;
}
Syntax errors:
Scene 1, Layer 'Actions', Frame 1, Line 28 1084: Syntax error: expecting rightparen before leftbrace.
Scene 1, Layer 'Actions', Frame 1, Line 27 1084: Syntax error: expecting leftparen before semicolon.
Trying to get error clip to play if email is not good, trying
if (trace(emailExpression.test(email.text)))
{
error_email.play();
}
but it's playing even if email is right.
Having a hard time trying to resolve this issue, done a bit a of digging but can't find what i'm after. I'm pretty new to AS3 but know that Eval() has gone and been replaced with [] syntax. However, i'm trying to access a dynamic path to a clip and it seems that the array syntax will not allow more than one variable in a path.
[Code]...
Im getting error on Line 61 here is the line
[Code]...
[code]...
**I got these errors, and probably more after those:
1046: Type was not found or was not a compile-time constant: ProgressBar.
1180: Call to a possibly undefined method ProgressBar.