Understanding Actionscript, (beginner)
I have a web site where the navigation buttons are on the main page at level 0, and all other pages load into level 2. I have been able to make the menu buttons work as shown below:
on(release) { _parent["item" + _root.item_number].gotoAndPlay("s2"); _root.item_number=7; _level0.link=_root.url + "_contacts" _level2.main.gotoAndPlay("disappear"); }
The contacts page is the seventh button in the menu.
But if i add a button elsewhere on the main page, I have been unable to make the button play the exit effect on the existing clip then play the new clip. Is this enough information for a suggestion?
Thanks
ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 11-05-2004, 08:00 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Beginner Questions For Understanding
Hello!
I'm new to AS. Just a small base coding knowledge in timeline code with AS2.
50% of my daily work is PHP...
A few questions:
Is it able to create a SWF with for example 800x650px and to define some
'containers' within it for other SWF-files? I want to create a container for
navigation at the right and when clicking on a navi element, changing the
content of anorher container availalble, perhaps like 'headAnimation'.
Is it able to change attributes of an included 'container' with a SWF when
clicking an element within another SWF placed in a 'container'? Perhaps I
have an 'container' with 'navigation.swf' within. When clicking on an elemnt
I want to start a function that fades in/out another 'container'. Am I able
to create a function that works for all 'containers'? E.g. like that fader
so I can submit the name of a 'container' to let it fade out and I can use
that function within all elements in any 'container'.
Sorry about my bad english. It's a couple of year ago since I learned it at
school :)
Thanks a lot... Malo
Understanding The Need For Package/class Import -beginner
Hi all,
first time here. -really glad I found the site, it looks like a wealth of useful information.
OK, here goes: I'm very new to Flash, still learning. I started learning AS2, but I figured it would be less confusing if I tried to focus on AS3 as future versions will be based on this.
I'm a little confused about the need to import packages and classes. I'm starting to understand the concept, but let me give you a for-instance:
Here's some AS3 that will load a PDF file when a button is pressed (code from the Adobe Help files):
function loadPDF(event:MouseEvent):void
{
var resumeURL:URLRequest = new URLRequest("MBeckman_Resume.pdf");
navigateToURL(resumeURL);
}
button_mc.addEventListener(MouseEvent.CLICK, loadPDF);
-works great. The question is: if this works fine as-is, what is the need to follow the "creating and importing of packages/classes and such"...method of coding?
thanks for any help in understanding these fundamentals. I'm trying to wrap my head around OOP, and I can see it will be a long journey.
-mike
Understanding Actionscript
where rin this action script does it exp0lain how to program each country to take you to a new move or page
im a noob where action script is concerned and with me , if i dont just do it i cant learn it.
heres the link to the fla
http://www.flashkit.com/movies/Scrip...7480/index.php
Understanding Actionscript
ive looked at soooo many actionscript tutorials but they all seem like some foreign language.....is there any tutorial that explains the aspects of actionscript?
like...
what is a "string"?
or a "variable"?
etc etc too much stuff every time i look at a tutorial i dont understand it because i dont know what all of the terms mean. someone please help! lol
Help Understanding This Actionscript...
I found the attached .fla on a website, and I was trying to figure out how it all works... and I figured out a good portion of it, but I was wondering what line of script in frame 1 of the movie tells it line up the circles horizontally...
I am trying to create something of a similar effect, however I want them to line up vertically... How would the actionscript change to make the circle vertical?
If you have the time to look at this I would greatly appreciate it
Thanks
- Mikey
Understanding Actionscript
I am New to flash, have recently began exploring its uses with flash8
Am struggling to understand the concepts surrounding actionscript.
Inparticular: how do i borrow script from other movies?
where do i view the script?
Help Understanding Actionscript [F8]
Hey guys,
could any one help me understand what the following actionscripts mean;
for(var n=0; n!=numRows; n++)
Also I don't understand what the "n" means and the double ++.
Thanks guys
Help In Understanding Some ActionScript
I use flare to decompile a swf file to get the action script.
Here is the result of frame1. My question is what is the meaning of 'player.movie'? I have search thru the whole file, I can't find anywhere the 'player.movie' is set.
frame 1 {
movie = player.movie;
movie.base_url = '/';
movie.tracker_cls = logic.PlayerTracker;
movie.setMovie(video_id, undefined, undefined, l, t);
movie.playMovie();
Stage.scaleMode = 'noScale';
Stage.addListener(this);
onResize = function () {
player.resize(Stage.width, Stage.height);
};
}
Arg Understanding Actionscript...
So, okay, Im trying to teach myself flash and actionscript through tutorials and what not, and now I am working on an audio player... I follow the tutorial exactly, but I wind up getting this error... Can anyone please help understand what this means?
**Error** Scene=Scene 1, layer=stop, frame=1:Line 1: Mouse events are permitted only for button instances
on (press) {stop();
Total ActionScript Errors: 1 Reported Errors: 1
It's a simple buttion, but i just don't understand what it means... Thanks.
Help Understanding Actionscript Scope
In my Flash movie, I have two keyframes named kf1 and kf2. In the kf1 frame there is a movie clip named myWorld. When you get to the kf1 frame, a function is called that dynamically generates movie clips inside of myWorld (note that the movie clips are only created the first time the myWorld movie clip is loaded becuase I was hoping that you wouldn't have to do this every time and I use a variable to remember that it had been loaded).
When you click on one of the dynamically generated movie clips, it goes to the frame called kf2. When in kf2, you can go back to the kf1 frame.
My problem is that when you go back to the kf1 frame, the movie clips that were dynamically generated the first time are no longer there.
I tried an experiment where I placed the movie clips during design time directly from the library into myWorld that had previously been created dynamically via actionscript. Then when you go to kf2 and then back to kf1 the movie clips are not "gone".
I don't think I understand how the timelime affects items that are placed using actionscript.
Why do the dynamically placed movieclips disappear when returning from kf2?
How can I dynamically place the movieclips (one time) and then be able to return to kf1 from kf2 without them disappearing?
I would appreciate any links that relate to your answers or keywords I can use to search for the answers to my questions.
Thanks in advance.
Understanding Actionscript Language - Help Needed
As a relative novice to Flash I was hoping that some more experienced users could help me to solve an issue that is frustrating me (due to my inability to understand basic Actionscript language)
I have tried posting to the Macromedia Usenet group for Flash but the answers I received (for which I was grateful) were couched in terms that I could not follow or did not seem to work even when I tried to implement the suggestions made (probably because I did not really understand what was being explained to me)
Here then is a description of the project I am trying to complete
I am attempting to construct a clickable map - nothing too difficult with that and I have succeeded in understanding the idea of buttons and attaching behaviours to specific events (like a rollover for example).
Now I wish to attach a movie clip (pop up style) to the same (rollover) event and I cannot understand how to do this.
Imagine a map of the USA (my map is not actually the USA but the example will suffice for this explanation) with each state as a section of the map. As the mouse rolls over each state that section of the map changes colour
I have completed the creation of this first stage of the project already so I have my basic map – this (map) movie consists of just one frame on one layer. The map contains 104 separate sections and each section has been converted into a button with a colour change assigned to the rollover event.
Now in addition (tied to the same rollover/rollout events) I wish to have a panel of information relating to the highlighted section of the map appear at a designated point on the map (so that the pop-up panel does not interfere with viewing the map itself) and then disappear when the mouse rolls out. Of course this means that a new panel of information will immediately appear relating to the adjacent section (state) on the map and so on and so forth for each section (state) on the map.
I have the 104 panels of information already created in a separate Movie – called Regionaldata – this movie consists of one layer with 104 separate frames, one for each section of the map
Please also see the following URL, which is a similar map showing the kind of pop up panel effect I am trying to achieve:
http://eng.bundesregierung.de/frameset/index.jsp - click on the small map image
Here are some basic questions illustrating my poor knowledge of Flash
1.What is the difference between a Movie Clip and a Movie?
2.If you attempt to play a Movie Clip within the Main Movie, does that Movie Clip have to be a part of the Main Movie – i.e. sitting on another layer – or not? If the answer is no what form of syntax is required to call the Movie Clip into the Main Movie – I understand the concept of a pathway, i.e. C:/Main_Folder/Sub_Folder/Movie_Clip – but is this how you identify the target Movie Clip in Flash or is another form of syntax used in Action Script language?
3.Each section of the map is already a button but can these sections also be (simultaneously) a Movie Clip?
Thank you in advance for any help or advice suggested by other members of this forum
Understanding Actionscript 2 Simple Expressions
please can someone help me here please. two little parts!
1.)
why does "_y <_root._y" equal less than 0?
where _y is a just a simple movie clip y coords??
To me the _root._y would be position of the main movie!!
2.)
onClipEvent(enterFrame){
if(_x< 0){
direction ="right"
}else if (_x > 550){
direction="left";
}
if (direction == "right"){
_x =_x +3;
}else{
_x =_x -3;
}
}
I can understand why and how the movieclip can move from side to side when it reaches the side of the screen BUT how does it start moving in the first place? As it has two statements if _x is less than 0 and if _x is more than 550!! But since the movie clip is in the centre of the screen why does it start moving???
If someone could answer these questions i would be very grateful.
Understanding Actionscript Procedure As Opposed To C
hello ppl!
Despite of venturing into actionsctipting w/ prior C-programming eXperience, I am still in the dark w/ regards the manner in which statements in actionscript get executed...I illustrate my point w/ the following code:
on (release) { //LINE 1
count = 1;
y = 0;
z = 0;
while (count<20) {
_root.clip0.duplicateMovieClip("boxx"+count, count);
_root["boxx"+count]._x = 425-y; //_X INCREASING
_root["boxx"+count]._y = 97;
_root["boxx"+count]._alpha = 100 - z;
y = y + 25;
z = z + 10;
count += 1;
}
counts = 1; //LINE 14
a = 0;
b = 0;
while (counts<20) {
_root.clip0.duplicateMovieClip("boxxx"+counts, counts);
_root["boxxx"+counts]._x = 425;
_root["boxxx"+counts]._y = 97+a; //_Y INCREASING
_root["boxxx"+counts]._alpha = 100 - b;
a = a + 25;
b = b + 10;
counts += 1;
}
} //END OF CODE
Why is it that only the code starting from line 14 gets executed and not the one before that? In other words, I only see "clip0" duplicating w/ the _y increasing (_root["boxxx"+counts]._y = 97+a and not the one before line 14 w/ the _x increasing (_root["boxx"+count]._x = 425-y??
Pls see the attached .fla for further understanding...
Wud appreciate some advise...thanx in advance!
P.S> What tags do I need to insert in my posts to ensure that the script doesn't get all scrambled?
Understanding Actionscript Language - Help Needed (part II)
To G Paris
First of all thank you for your response to my posting.
I have only just been able to read your posting and look at your suggestions.
I have read various documents related to Actionscript and I have to admit to being very confused by the terminology used by these manuals.
Is there a tutorial included on this site that is relevant to my query?
Now I have further questions to ask flowing from your suggestions:
1. If I convert the existing buttons to movieclips and place these MC's on another layer can all 104 MC's exist on the same layer - yes/no ?
2. What form of commands do you suggest I use to make the panels of information appear and disappear? - I was thinking of using something like:
on (rollOver) {
}
gotoAndPlay();
on (rollOut) {
}
gotoAndStop();
with the relevant layers and frame numbers identified to target the panel of information required
Is this syntax suitable or not?
__________________________________________________ ____________
I'm first tempted to suggest you should read the actionscript manual. It will help clarify the basics of actionscript and lso how Flash works.
Now your questions:
1. What is the difference between a Movie Clip and a Movie?
When we say Movie , usually it's a reference to the whole .fla
A MovieClip is an object in that "Movie/.fla"
2. If you attempt to play a Movie Clip within the Main Movie, does that Movie Clip have to be a part of the Main Movie – i.e. sitting on another layer – or not? If the answer is no what form of syntax is required to call the Movie Clip into the Main Movie – I understand the concept of a pathway, i.e. C:/Main_Folder/Sub_Folder/Movie_Clip – but is this how you identify the target Movie Clip in Flash or is another form of syntax used in Action Script language?
Yes. You will "target" a movieclip, ie "talk" to it. So: "it" has to be present on the timeline at the moment when you "talk" to it. And for targetting it you have to give it a "name" also known as "instance name"
example: a clip is stting on the main timeline, its instance name is "myClip" you want that clip "visible property" to be set to false, so that it disappears:
_level0.myClip._visible=false;
would be the syntax.
3. Each section of the map is already a button but can these sections also be (simultaneously) a Movie Clip?
yes. press F8 and convert to movieclip. You now have a button inside a movieclip.
gparis
Beginner Actionscript 3.0 Help
I'm just trying to get a dynamic text field to be populated by "Hello World" using actionscript 3.0.
My flash file has a dynamic text field named "randomtext" on frame 10 of a layer also named "randomtext". My understanding is adding this name to a dynamic text field automatically turns it into an object that can be manipulated with actionscript. In a separate layer called "actions" I have added some actionscript at frame 1 that says:
import flash.text.TextField;
randomtext.text = "Hello World";
However, when I test the movie (using control>Text Movie), I get the following error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at cookie_fla::MainTimeline/cookie_fla::frame1()
When I remove that actionscript code, the error goes away. Am I missing some other step?
Beginner ActionScript
I'm trying to create an interactive movie where the user presses a key and a certain action occurs. It works great when I use the space bar or arrow keys as the hot key but I need the movie to react when the letter A is pressed. Simple solution?
ActionScript Help For A Beginner
Hi all,
I'm taking a Digital Media Assembly class online (which is basically ActionScript with a fancy name) and I'm REALLY struggling. I have only used Flash once in my whole life and was put into this class online. It was supposed to be an on campus course but got moved at the last minute. There were no pre-reqs. I'm also taking a regular Flash class at the same time.
Anyway, the project for the entire course is to build a simulation and each week, we add on to the project. I have created my story board and have my topic, which is a cartoony octopus sitting in a bath tub holding bath bombs in each arm. When you click on one of the bombs, the bomb will go into the tub, changing the color of the bubbles. (I know, I'm such a girl!) The story board was the first part of the project.
The second part is:
Now that you have created your storyboard, and planned your final project in great detail, the next step is to write the first classes (or blueprints) for the project. In your classes you want to declare the objects you will use, such as variables, functions, and methods.
Write the first objects for your ActionScript Simulation Project using Flash. Your object must consist of at least one class and one function. Remember to create the package and give the first class the same name as your movie clip (if you plan on using one). Then, encapsulate your primary function with an introduction frame and a game over frame. Save the file as a .fla.
Okay, I don't even know what this means. I feel so silly but I have never used Flash up until two weeks ago. I'm currently using the Classroom in a Book for the basic Flash class and then get thrown into a much more advanced class.
Can anyone help me out with the information I have posted about my simulation? I'm thinking that I basically need to create an intro frame and the credits (ending) frame.
Please help me. If it's easier to email, crepe_suzette@hotmail.com. THANK YOU, I'm desperate and so frustrated.
Jill
Actionscript Beginner
hi,
im using flash 8, i would like to learn actionscript. i know nothing at all about it and would be pleased if anyone can point me to a good place to start.
thanks
Actionscript Beginner
Hi, I have the following code attached to a movieclip in Flash MX.
onClipEvent (enterFrame)
{
xcenter=275;
speed=1/10;
var distance=_root._xmouse-xcenter;
_x+=(distance*speed);
}
This basically scrolls a panoramic picture when you move the mouse either left or right of the move center... or that's what I'm hoping!
Anyway, how can I make the scrolling stop so the image doesn't keep scrolling on and on and right of of view. ?
thanks!
Nik
Beginner Actionscript Questions
I'm on my way to some tutorials, but I figured maybe I'd get a more direct response here.
I'm writing a Flash-based presentation with three different "levels" to it (beginner, medium, advanced). The higher the level, the more info the user sees about the topic. The presentation itself progresses vaguely like a Powerpoint presentation. It's made up of "slides".
Anyway, the first "slide" has three buttons, asking the user what level he wants to proceed at. What I want is to set some kind of variable depending on which button the user pushes, so later on I know what info to show him.
For instance, if the user is at "beginner", then after scene 2, scene 3 gets skipped and goes right to scene 4. I want to write something like this:
if(beginner) then goto("scene 4",1)
else if(med | advance) then goto("scene 3",1)
Something like that, but I don't know the Actionscript to do it.
Can anyone help me out on how I would do this??
I'm Beginner In Actionscript. I Have Questions.
1. Can somebody here tell me a actionscript that tells the object that i give the actionscript to, to follow the mouse?
2. Can somebody here tell me a actionscript that tells the object that i give the actiopnscript to, to turn to the direction that the mouse is? (doesent move forward but rotate in place)
3. Can somebody here tell me a actionscript that tells the object that i give the actionscript to, to disappear off the screen after it have exploded?
4. Can somebody here tell me how to tell Flash MX to send random things from the same direction, lets say, from the right to left?
5. Can somebody here tell me how to make a preloader for my movie?
If somebody here could answer one or more of these questions i would be really happy
Beginner Getting Into OOP With Actionscript,big Roadblock
Hey all,
like the title says, Im starting to try and get into Object-Oriented Programing with Flash, but I've run into a bit of a hindrance. Rather then re-write the entire issue, heres the link to the gotoAndLearn forums where I've already asked the question.
I have no idea whats going on! Help is most appreciated!
Beginner/ Actionscript Problem
I am following this tutorial
http://www.tutorialized.com/tutorial/Blue-Flash-Button/20836
Stuck on step 23, have redone it several times and just can't seem to get it to work.
Here is my project file
http://www.filefactory.com/file/c2f41d/
Main problem seems to be connecting the invisible button with the actionscript, I get a error when "run it / debug"
Thanks,
JR
Actionscript Beginner's Question...
I have a "movie clip" on the stage, am on Frame #1, and have added the following actionscript into the Actions - Frame panel. Nothing happens when I publish the flash?!!? I know that I am missing something very simple, but NONE of my actionscripts work---I have 15 students trying to get theirs to execute also?!
ANY help would be appreciated!!
this.onEnterFrame = function()
{
if (Key.isDown(Key.RIGHT))
{
Ship._x += 10;
} else if (Key.isDown(Key.LEFT))
{
Ship._x -= 10;
} else if (Key.isDown(Key.UP))
{
Ship._y -= 10;
} else if (Key.isDown(Key.DOWN))
{
Ship._y += 10;
}
}
[F5]Arg For Actionscript Guru Beginner Needs Help
Hi,
I need open external application in MAC OS9 flash projector.
video.mpg --> call quicktime
music.mp3 --> call itunes
Adobeacrobatreader.dmg .
I try fscommand, but not work...
I try use applescript to call the file, but don´t work.
Thanks anyway..
[F5]Arg For Actionscript Guru Beginner Needs Help
hi...
I developed a project where the user click with the left button of mouse and advances a frame (nextFrame)end to click with the right button comes back a frame (prevFrame).
The problem is that if your button is pressured by much time, the film advances many frames of a time.
I would like that somebody I could help to me indicating me some code or tutorial where I can control this button´s sensitivity.
[F5]Arg For Actionscript Guru Beginner Needs Help
So, I hate when people just randomly jump on a forum and ask for help, and then never come back after their problem has been solved. But, I'm begging for help. I have a website that I'm working on, and my brain is done! Can someone help me code this so that the photos are scaled down to the size of "big image holder" (instance name "imagesHolder_mc")
I would attach the fla. But, it is too large.
ActionScript Beginner Book
Hi,
Is there any book for action script beginner book like project type and a CD with book. Such book helps me to understand concepts a lot.
Thanks for your help in advance
ActionScript Thoughts - Beginner
After I decided to grab myself a piece of the huge "Flash Cake", I now sit down here with my newly arrived Flash Anthology. As a beginner in Flash and AS, I'm making my way slowly through chapter 2 (navigation) thinking and thinking about how I'm going to do when creating my own applications. But then I stumbled over the new OOP features in AS 2.0, and since I do some PHP coding, in wich I'm just beginning to code OO, my thought was instantly to catch the OOP-train from the start. But does it work this way in flash? Is AS divided in OOP-, Functional oriented- and Procedural coding as PHP is? Do you "choose" one way (i.e you don't have to choose, but you are recomended to stick to one way of coding)?
And; Do you have some recommended links on the subject?
Thanks a lot guys.
Urgent Help For Beginner Need Actionscript
Hi I'm a beginner in flash and am looking for some help in finding actionscript to make a game like noughts and crosses (tic-tac-toe).
Its kinda urgent so any help would be most appreiciated.
Advice For An Actionscript Beginner
I'm currently learning Actionscript. I have a working script for a navbar using movie clips with button properties, but I'm sure the code could be much leaner than this. Do I really need to repeat all this for each button? Any tips?
Here's the code:
var desVar = 0;
_global.desTxt = "This is a set of buttons";
// button 1
_global.btnCol1 = new Color("navbarMov_mc.btn1_mc.btnColor_mc");
_global.btnCol1.setRGB(0xFFAA77);
navbarMov_mc.btn1_mc.onRollOver = function() {
with (_root.navbarMov_mc.btn1_mc) {
gotoAndPlay(2);
}
with (_root.navbarMov_mc.description_mc) {
gotoAndPlay(1);
}
_global.desTxt = "section1";
};
// button 2
_global.btnCol2 = new Color("navbarMov_mc.btn2_mc.btnColor_mc");
_global.btnCol2.setRGB(0xFF9966);
navbarMov_mc.btn2_mc.onRollOver = function() {
with (_root.navbarMov_mc.btn2_mc) {
gotoAndPlay(2);
}
with (_root.navbarMov_mc.description_mc) {
gotoAndPlay(1);
}
_global.desTxt = "section2";
};
// button 3
_global.btnCol3 = new Color("navbarMov_mc.btn3_mc.btnColor_mc");
_global.btnCol3.setRGB(0xFF8855);
navbarMov_mc.btn3_mc.onRollOver = function() {
with (_root.navbarMov_mc.btn3_mc) {
gotoAndPlay(2);
}
with (_root.navbarMov_mc.description_mc) {
gotoAndPlay(1);
}
_global.desTxt = "section3";
};
// button 4
_global.btnCol4 = new Color("navbarMov_mc.btn4_mc.btnColor_mc");
_global.btnCol4.setRGB(0xFF7744);
navbarMov_mc.btn4_mc.onRollOver = function() {
with (_root.navbarMov_mc.btn4_mc) {
gotoAndPlay(2);
}
with (_root.navbarMov_mc.description_mc) {
gotoAndPlay(1);
}
_global.desTxt = "section4";
};
// button 5
_global.btnCol5 = new Color("navbarMov_mc.btn5_mc.btnColor_mc");
_global.btnCol5.setRGB(0xFF6633);
navbarMov_mc.btn5_mc.onRollOver = function() {
with (_root.navbarMov_mc.btn5_mc) {
gotoAndPlay(2);
}
with (_root.navbarMov_mc.description_mc) {
gotoAndPlay(1);
}
_global.desTxt = "section5";
};
// button 6
_global.btnCol6 = new Color("navbarMov_mc.btn6_mc.btnColor_mc");
_global.btnCol6.setRGB(0xFF5522);
navbarMov_mc.btn6_mc.onRollOver = function() {
with (_root.navbarMov_mc.btn6_mc) {
gotoAndPlay(2);
}
with (_root.navbarMov_mc.description_mc) {
gotoAndPlay(1);
}
_global.desTxt = "section6";
};
// button 7
_global.btnCol7 = new Color("navbarMov_mc.btn7_mc.btnColor_mc");
_global.btnCol7.setRGB(0xFF4411);
navbarMov_mc.btn7_mc.onRollOver = function() {
with (_root.navbarMov_mc.btn7_mc) {
gotoAndPlay(2);
}
with (_root.navbarMov_mc.description_mc) {
gotoAndPlay(1);
}
_global.desTxt = "section7";
};
Beginner Getting Into OOP With Actionscript,big Roadblock
So after some time just writing code via timeline, I decided that, with still a month before school, it might be time to start learning more about the OOP side of things with flash. So for my first self-test, I decided to start simple and create an imaginary book, with just one property, the number of pages, which I have referenced as "numberOf". The object is just to pass in more pages, add it to "numberOf" and trace the result.
Here is the book class
------------------------------------------------
package
{
import flash.display.MovieClip;
public class Book extends MovieClip
{
public var numberOf:Number;
public function Book(pages:Number)
{
numberOf+=pages;
trace(numberOf);
}
}
}
------------------------------------------------------
That being done, I start to create a book in the Flash IDE. Now I did just finish a Java course, so I can't help but wonder if what I learned there is getting in the way since trying the exact same exercise in netbeans yields the results I want, but moving on ......I make my book object
var myBook:Book=new Book(100);
unfortunately, I keep getting this error:
ArgumentError: Error #1063: Argument count mismatch on Book(). Expected 1, got 0.
Surely Im passing arguments in correctly?
I then try having a separate function to set the number of pages.
this is the function I add:
---------------------------------------------------
public function setPages(pages:Number){
numberOf+=pages;
trace(numberOf);
}
-----------------------------------------------------
but when I try to access the function using "myBook.setPages(100);"
I get
Error: Error #2136: The SWF file file:///Jo%20Chow/Users/JoChow/Desktop/Code%20samples/src/CodeViewer%5FScene%201.swf contains invalid data.
at Book/frame1()
At the very least, Im 90% certain that everything is setup correctly in connecting my class to the .fla file, so there must be something wrong with my code.
needless to say I'm stumped. If anyone can help that would be most appreciated.
EDIT:
something interesting to note, don't know if anyone has the book "Learning Actionscript 3.0" by Rich Shupe; Zevan Rosser, but I tried out the 6.2 exercise just now, which introduces the reader to OOP programming and still got error #2136, but the code still works. I had done the exact same exercise just a few days ago and did not get the error.
Great BEGINNER Actionscript Tutorials
I need some GREAT beginner websites for learning Actionscript. Not like Actionscript.org.. I mean learn exactly what every functions means ( I know flash mx has a definer, but i need it online ) and how to assemble it. Also good sites with tutorials would help alot. Thanks ahead of time
Mike
Beginner Doesn't Get This Actionscript Concept
Hi Folks,
I am attempting to learn the basics(very basic!) of flash programming and global variables.
Here's the scenario:
*********************************************
Frame one contains this actionscript:
var length=0;
Frame two contains this actionscript:
length=length+1;
trace("length in second frame is");
trace(length);
bar._xscale=length;
Frame three contains this actionscript:
length=length+1;
trace("length in third frame is");
trace(length);
bar._xscale=length;
if (length == 100) {
stop()
}
gotoAndPlay(2);
**********************************
Irrelevant of what I am trying to do, in frame three I expected the movie to stop once the global variable "length" reached 100 but this is not the case, the movie continues on.
Now if I make the following in frame 3:
***************************
if (length == 100) {
stop()
}
else{
gotoAndPlay(2);
}
***************************
instead of:
***********************
if (length == 100) {
stop()
}
gotoAndPlay(2);
***********************
all works properly.
Can someone explain to me what I am not understanding in regards to how actionscripting works? Obviously I am missing what seems to be a VERY IMPORTANT concept in actionscripting.
Thanks,
Greg
gpl@maine.rr.com
ActionScript Beginner, Starting Out, Lessons, Ect... Plz Help :)
Ok, basically i havent touched actionscript befor, and im using Flash MX.
Basicly im looking to get websites with good beginner.. quests if you will lol. Simple ways to make Actionscript make text apear, ect..
Im looking to begin a .. well a coding expansion for me lol, i wanna create MuD's (Mostly Text based, im not an artist at all lol), Simple quiz that uses ini files, ect.. And im just looking to be able to do it in flash. So basicly i just wanna know some help sites that kinda guide me through some simple things, lessions ect.
I know i sound like a complete nub. Believe it or not im transfering from mIRC (if you can even call that coding) and wanna go with something more complicated (i know, big jump LoL), so im not looking to get into intensive graphics, but at the same time i do wanna tie graphics into junk.
Also, and i know this is leagues beyond me, is there any .. (hell UI components would rock! rofl!) way to send text between multiple flash applications? like a chatroom of basics, through IRC or anythin really. Though i would much prefer IRC cuz i dont wanna be the server lol. Im just curious, iv seen it done but not that much so im figuring its not that practical.
Anyway thanks a ton for putting up with my COMPLETE LACK OF KNOWLAGE. Keep in mind im not seeking help in creating something, more of help on where to find the type of help im looking for lol.. if that makes anysense. Thanks!!
How To Get Beginner Actionscript Window In Flash Mx?
Hello,
I am using flash mx and in the actions window I only get the advanced action script window.
Because of this I get many errors while trying tell target or other actions.
I remember in flash 5 , it was easier and it would give options on top to select target and other properties.
Can anyone tell me how to get that basic beginner actionscript panel in flash mx instead of using advanced actionscript panel?
Regards,
Asad
Good Beginner ActionScript 2.0 Books?
I am a graphic designer who mostly works in the print environment, occasionally working in web. I am probably at an intermediate level with Dreamweaver and Fireworks, but a beginner in Flash. I know about the stage, the library, the timeline, tweening....etc. However, I would like to begin to learn more ActionScript. There are so many books offered to learn ActionScript that I don't know where to begin.... Can anyone recommend a good text for learning ActionScript at the beginner level? Any help would be greatly appreciated! Thanks!
Beginner Doesn't Get This Actionscript Concept
Hi Folks,
I am attempting to learn the basics(very basic!) of flash programming and global variables.
Here's the scenario:
*********************************************
Frame one contains this actionscript:
var length=0;
Frame two contains this actionscript:
length=length+1;
trace("length in second frame is");
trace(length);
bar._xscale=length;
Frame three contains this actionscript:
length=length+1;
trace("length in third frame is");
trace(length);
bar._xscale=length;
if (length == 100) {
stop()
}
gotoAndPlay(2);
**********************************
Irrelevant of what I am trying to do, in frame three I expected the movie to stop once the global variable "length" reached 100 but this is not the case, the movie continues on.
Now if I make the following in frame 3:
***************************
if (length == 100) {
stop()
}
else{
gotoAndPlay(2);
}
***************************
instead of:
***********************
if (length == 100) {
stop()
}
gotoAndPlay(2);
***********************
all works properly.
Can someone explain to me what I am not understanding in regards to how actionscripting works? Obviously I am missing what seems to be a VERY IMPORTANT concept in actionscripting.
Thanks,
Greg
gpl@maine.rr.com
[FLASH 8] For Actionscript Guru Beginner Needs Help
I am working with softVNS (Max/MSP plug in) tracking software and would like to upload my dynamic x and y array cordinates of the tracked objects onto flash and use flash to generate dynamic voronoi diagrams around those cordinates.
I have got a flash script for generating the diagrams and also have a FLASHSEVER patch to link flash and Max. My problem is how do I upload this dynamic data onto flash and actually use it to affect the diagrams I am drawing..? At the moment adding points is controlled by:
function addDotAtMouse() {
addDot(_xmouse, _ymouse);
I have been thourgh the loadVars tutorials but I can't seem to figure out how it would work in this case.(I am a Flash_New_bee)
I will be really happy for any suggestions or tutorials that deals with such issues.
Thank you
Killion
Beginner Doesn't Get This Actionscript Concept
Hi Folks,
I am attempting to learn the basics(very basic!) of flash programming and global variables.
Here's the scenario:
*********************************************
Frame one contains this actionscript:
var length=0;
Frame two contains this actionscript:
length=length+1;
trace("length in second frame is");
trace(length);
bar._xscale=length;
Frame three contains this actionscript:
length=length+1;
trace("length in third frame is");
trace(length);
bar._xscale=length;
if (length == 100) {
stop()
}
gotoAndPlay(2);
**********************************
Irrelevant of what I am trying to do, in frame three I expected the movie to stop once the global variable "length" reached 100 but this is not the case, the movie continues on.
Now if I make the following in frame 3:
***************************
if (length == 100) {
stop()
}
else{
gotoAndPlay(2);
}
***************************
instead of:
***********************
if (length == 100) {
stop()
}
gotoAndPlay(2);
***********************
all works properly.
Can someone explain to me what I am not understanding in regards to how actionscripting works? Obviously I am missing what seems to be a VERY IMPORTANT concept in actionscripting.
Thanks,
Greg
gpl@maine.rr.com
Can Anyone Recommend A Good Actionscript Book For Beginner?
I started learning flash 8 not too long ago but I cant seem to learn well enough off of tutorials
I'm wondering if anyone knows of a good ActionScript 2.0+ book that is well explained for beginners
there's also the option to learn from sites which include someone I can ask questions 24/7 for 60-100$
I have about 8hours per day to spend on this
I'm really eager to learn and hope I can become good at this
Actionscript Beginner- Play From Frame 1 On Re-entry
Hi
I am putting together a Flash 8 Slide Presentation. As the user proceeds through slides, the slide will play all the way through. I have a stop() code at the end so the user will not see the slide play again. Right now, if they go back to a previous slide, the presentation is stopped at the end. If they go back, I want the slides to start playing from frame 1 again. How would i do this?
Thanks!
Actionscript 2 Of Lingo For Beginner Programing Theory?
I teach on a BTEC ND Interactive Media course and, having delivered basic programming principles to Access level students (aged 19 and above) using Director and Lingo, would like to do the same with a cohort of student aged 16+ aged students who have little mathematical competence and predominantly just want to produce visual designs on screen.
Shall I stick with a verbose language such as Lingo or use Actionscript, which I suspect is too close to Java and may put them off because of its precise syntax.
Complete Beginner To Actionscript - Expert Programmer Though - Wants To Do Project :)
Ok, here it goes.
I am a complete beginner to action script, and a novice at Flash in general, however, I'd like to develop a small project within the next few months. Basically, I want to learn actionscript to the point where I can make a clone of the Mac OS X dock (the little thing at the bottom of the screen) where, on mouse over, things grow, on click they bounce and a link is taken out, etc.
What is your advice as to implement that, learn flash/actionscript and go at it?
Actionscript Beginner, Loadmovie Loads PNG, Cant Change Properties - Filez Included
Thank you very much in advance, I have only been using actionscripting in flash
for about two months, I am still in the learning phase but i've encountered a problem.
http://www.atelierfrancois.com/index...Submission.zip
above is the link to my files, and the actionscript is on the first layer of the root timeline, in the actions window you will find the following chunk of code halfway down in the middle.
it uses loadMovie to load an external PNG from an Array (four images are included) but it wont let me change an of its properties, such as _x, _ height, and so forth.
this should be a simple challenge for an adept programmer but I know that something is worng with my syntax.
Please help.
//
// ****
// ******************
// Trouble Spot : the loadMovie command successfully loads png file, but properties such as _height, and _x position below it have no effect on the loaded image file.
// ******************
// ****
//
_root.windowHolder.loadMovie(imagePlaceHolder[this.id], imagePlaceHolder[this.id], this.id);
//above the the Array imagePlaceHolder takes the values from the Array PortfolioArray (declared at the top) and imports those respective PNG's
//But, below it wont change the properties of these image files such as their height or x position. - here is my question how do i get the following code to work?
_root.windowHolder.imagePlaceHolder[this.id]._height = _root.windowHolder.window._height*1.1;
_root.windowHolder.imagePlaceHolder[this.id]._width = _root.windowHolder.window._width*1.1;
_root.windowHolder.imagePlaceHolder[this.id]._x = 0;
_root.windowHolder.imagePlaceHolder[this.id]._y = 0;
_root.windowHolder.imagePlaceHolder[this.id]._alpha = 20;
_root.windowHolder.imagePlaceHolder[this.id].setMask(_root.windowHolder.window);
//
// ****
// ******************
// Trouble Spot
// ******************
// ****
//
please ask additional questions if needed.
- Malik Francois
Flash MX ActionScript: Beginner Needs Help With "movement Follow Mouse"
Hi, I am new to the forum. I was asked to create something similar to what's on http://www.schech.net/de/start.html. (Skip the intro and click on #1 Slide). This nice flash has a highlighted bar that moves horizontally with the mouse movement, while the background image move vertically too. Does anyone have any idea how they did this? I have limited knowledge on ActionScipt. I have searched everywhere and only found several tutorials like moving a circle mask with mouse movement. I am desperate.
If anyone can share his expertise, I'd appreciate it!
Yiren
BTW, any recommendation on a good, easy book on ActionScript for beginners?
Not Sure If Im Understanding This..
I have a webpage made in flash MX and I have a "map.swf" file that im trying to open in my webpage useing the action script (loadMovieNum("http://nortel.cbrands.com/map.swf", 1);
but the problem is I want the map.swf to be in the center of the page .. right now is starting the map.swf in the top left cornner .. is there a way to specify where it will load the SWF file?..
Thanks Alot,
Terrified
|