Some Simple Questions
(first post, sorry if I've got something wrong here)
hi there
first off, I want to have buttons that would go to the different scenes of the flash. How can I do that?
also, I want to flip a picture horizontally when I press a button. The picture moves when I use the arrow keys. Here's the script
Code: onClipEvent (enterFrame) { if (Key.isDown(Key.UP)) { this._y -= 8; } else if (Key.isDown(Key.DOWN)) { this._y += 8; } if (Key.isDown(Key.LEFT)) { this._x -= 8;
} else if (Key.isDown(Key.RIGHT)) { this._x += 8; } } when left is down I want the picture flipped horizontally etc.
any ideas? thanks
FlashKit > Flash Help > Flash Newbies
Posted on: 06-28-2008, 04:57 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Simple Questions...mean Simple Answers....right?
I just have a question about the various ways to loop in Flash.
now I know the for, and the while, and the do while,etc. My question is I can never get any of these loops to work unless they are on the main timeline. If I put a for loop inside a movie clip, i get nothing, or errors of the script continually running.
Just wondered if and how to use a loop script inside a movieclip without generating errors, and not having to revert to making the movieclip continually play two frames to get what I want.
curious.........
dduck1934
Simple Questions From A Simple Person
Hi all...
I am new to flash... The only actionscript I have actionally used is "stop ();" Anyway... I'm using flash cs3... It seems a fantastic tool to a newcomer like me!! Firstly, I'll show you what I've managed to do so far...
This is my first movie...
http://www.allnationschessleague.com...tpagewhite.swf
An this is the header I would like to put at the top of the website pages:
http://www.allnationschessleague.com...ANCLHeader.swf
Well, my first question (for I am sure to return to this site for more advice, is how do I link the flags at the top, to the relevant pages. Please check out the following page to see how it should work:
http://www.allnationschessleague.com
So as you can see, the flash needs to link to php pages... for example the British flag needs to link to 'setlanguage.php?lang=en' etc... so how do I set those links for the flags?
Thank you for answering my post )
Jeff
Few Simple Questions
I'm going to start a flash site and I have a few easy questions!
1. If you have a movieclip that is 400x600 and you load a swf the same size, will it match the mc perfectly?
2. Ok, Lets say I have an index.swf, and I load an intro on frame 1, and frame 1 has a stop action.
The intro will play through and stop!
Now how do I make it skip to frame 2 on the main timeline of the index.swf after the intro is done?
And only after the intro is done no matter how many or few frames it is!
Oh I almost forgot, last question.
If i load top.swf into layer one of index.swf
and I load bottom.swf into layer2 of index.swf
Will top.swf overlay bottom.swf?
2 Simple Questions
i'm not the best at scripting, and i'm stuck.
1. i'm trying to target a graphic in a movieclip on the main stage, to display an input text. that is entered earlier.
what is the code and where should it be placed?
2. i want to an input text to close down the swf window can this be done?
cheers rat
2 Simple Questions?
1. I imported a quicktime movie into a flash movie and previewed it, I saw nothing!! what do I have to do in order to activate or launch it?
2. I have a link in the flash movie, by click it should open a new window that has no menu bar and turns off the window scaler. Anyone has a simple Java code for it?
I have beeeen trying to implement other codes to mine, but it doesn't work, please help!!
Thanks guys!!
Simple Questions
1. Is it possible to change the properties (height in my case) of a button with actionscript?
2. Having textfields inside a movieclip, and then scaling the movieclip with aciontscript, is it possible *NOT* to scale the text, but only the MC?
regards,
James
Simple Questions.
Not so much a how to question but seeking advice.
1. I have Dreamweaver 4 and I just got Flash 5. All I really want to do is make interesting flash movies, moving logos etc.
Is there a good tutorial site or 3rd party book anyone can reccomend?
Also, what are some good flash sites to take a look at for ideas on what Flash can do. I don't have a ton of money so I can't afford a lot of other programs.
I'm already very artistic and computer literate but I'm branching out. Here is a site I would like to aspire to
http://www.cmart.design.ru
I like the interaction etc. Is this mostly (or all) flash related material?
Thanks
I won't always be this vague.
Help Simple Questions...
question 1:
i want to know to click on a link and it will send u to the same page. example pages are like http://www.craigdavid.com or http://www.realsongs.com. when u click on a link, it stays in the same window. how do i link it that way?
question 2:
just like on those 2 websites, how do i make the music options they have, where u can choose which song u want and it loops.
i think i also played with my flash mx settings, and saved the defaults on the page settings. what is the real size of the page? isn't is osmething like 590X350? i forgot and i need it because i think its messing up what i'm doing.
if you know any other tricks and effects for flash, please please please tell me because i am building a personal organization website and they are depending on me to make it look good, but i've only used this equipment for a week and i had to learn it all on my own.
explain step by step and slowly because if u tell me to make something alpha, i won't know how to do that. u'll have to tell me how to get to that point.
if u would like...... i have Aol instant messenger. IM me anytime at "dio you rule"
thank you
Just 2 Simple Questions
I'm interested in making really cool-looking intros. I have 2 questions....
1. I'm not really all that concerned with the size of my .swf files, what is a really good fps setting so that the size of the files are not absolutely HUGE, but it looks incredibly smooth?
2. If you know of any very cool intros, post the URL down below for me to look at, thanks!
Simple Questions
Hey all, thanks in advance for any help you can provide.
My first question is about symbols. What is the main purpose of them? I assume the Movie symbol is kind of a Flash movie inside of a Flash movie? How do you keep a Movie symbol from playing right when the Flash loads?
My second question refers to PHP, MySQL, and Flash integration. Most of my site is dynamic content, loaded from a MySQL database using PHP. I am going to *attempt* to redo the entire site in Flash. How do I pass the information loaded from the database to the screen through Flash? Is there a way to pass them all at once? We are talking about 50 values here sometimes, and passing them all separately would be a pesk.
Thanks for the help,
Tom
Some Simple Questions
I have created my flash intro but by DEFAULT I do NOT want it to loop.
How do I disable looping?
Also I created a "ENTER" button for the site and the cursor has to be on the T for it to work, how do I make that where they can click on enter anywhere and the action is performed?
Thanks in advanced.
Prophecy
A Few Simple Questions...
http://www.katrinamodel.com/
How do I make this effect? Like when you mouse over the navigation button, a few more sub-buttons floats up. And when I get the cursor away from the navigation button, the few sub-buttons disappears. How do I do it? Does it require actionscript?
Look into http://www.katrinamodel.com/ to see what I mean. I want to do an effect exactly like the one there.
Thanks for you help.
2 Simple Questions
1. does the number of symbols/number of frames/length of a movie affect the overall speed of the movie?
2. HOW COME WHEN I PUBLISH MY MOVIE TO HTML AND VIEW IT IN A BROWSER ITS SLOWER THAN WHEN I PREVIEW IT IN FLASH?!!
A Few Simple Questions
Firstly want to say this is one cool board. I'm new into Flash and love it I've never had so much fun.
Anyway my questions, I've did a quick search on the forum here and found no answers to my following questions.
1. I've created a flash file (700x342) but want it to open at a size of 800x420. I don't want to recreate the whole fla file again, so my questions is; is a way to do this?
2. Is there a way that the swf file opens in the middle of the screen?
BTW I'm not placing this inside a html document.
Thanks for any help you guys can give.
Simon
2 Simple Questions?
Hi,
1. I have a question,
i imported a flash intro into the dreamweaver,
should i save it as the index.htm file?
so that when ppl go online, they see the flash intro immed.
2. how may i link it?
so that when the flash intro is over, it automatically goes
to the main page.
thanks.
Two Simple (I Think) Questions
1) i wonder what does - syncronise frames - do?
2) and might as well ask, is there anyway to spread frames? say i want 5 keyframes, all have a fram between them?
ta
3 Simple Questions...
How do I do a simple animation? *blushes*
How do I make a link to another site? *blushes again*
HOw do i make a loading bar? *blushes one more time*
Now these are stupid questions but dammit I need to know
Thanks guys
[estatika.]
3 VERY Simple Questions
Hows it going this is my first post on flash kit so gimme a break if I sound like a n00b.
anyways.
I have three basic questions about Flash MX 2004
1. I want to use a preloader in my page but I have no Idea how to use it and I haven't found much info on how to use it.
what I did was I inserted it before the actual movie begins and after that I have no idea what to do.
2. How do you get the browser to stay to the size of the video
like my vid is 650x400 and the browser stays just like you were going to any other site.
3. ummm well I forgot what number 3 was so I guess it's just 2 simple questions
2 Simple Questions...
ok yea im a newbie
basically i got 2 problems
1, I want to loop 20 frames, 5 times....whats the script i use to do this?....and to i put it in the begining of the 20 frames or the last frame?
2, i want to stall on a frame for 5 seconds...how do you do this?... I had a go at this this is what i wrote in the frame i wanted to stall on.
stop();
restart = function(){
clearInterval(myInt);
play();
}
var secondsToPause = 5;
myInt = setInterval(this,"restart",secondsToPause * 1000);
but it just seems to pause for a few thenths of a second.?? whats wrong with the script?
thanks in advance !!
A Few SIMPLE Questions...
Hi, I'm new to this site as well as new to using Flash. I'm creating my portfolio site and so far I've got most of it down thanks to the many useful tutorials and open source files.
A few things I'm stuck on and can't seem to figure out using tutorials and Flash's help files:
1. How do I make my movie go though all scenes without having to use a button with actionscript to make it proceed?
2. How can I make a button stay in it's over state once it has been clicked?
3. How do I prevent my animations from looping after it has been loaded? I'm using actionscript "stop" but just double-checking if there is another way.
I realize these questions are probably SO simple it's ridiculous to ask, but I'm just STUCK! Any help would be greatly appreciated.
Thanks,
Stevie
2 Simple Questions
I've been doing great up until this point, and I'm sorry if this has all been answered a million times before, I'm having trouble wording it so I could search for a tutorial via google or in here. I'm always insanely tired. Anyway...
For context, I'm making a short animation.
1) How do you set what's shown? Each time I preview what I've made, a portion of the character is shown. Is that something to do with setting the stage size, or is there something else?
2) When my animation is completed, I'd like for there to be a still of the first frame, maybe a "click here" text, and when someone clicks on it, the animation starts. All simple stuff, I just, like I said, can't figure out how to word it to find a tutorial. Big thanks to anyone who can help.
Two Simple Questions
I have two problems that I know I am over thinking.
First, I want to know how to alternate between two images at random, but I only want one image to show up per movie play. basically like a alternating background.
Second, I have a main swf file, I want to load another swf on top of that in a specific location, because the second movie is smaller than the other I still want to see the first level but no matter what I try I cannot get the second file to load in that specific location.
Two Simple Questions (hopefully) Please Help
Hi everyone,
I am cleaning up the code from a game I made a few months ago and I am trying to place all my code into one external file as opposed to code residing on individual movie clips.
All is well but a number of questions have arisen. They are not complicated so can someone set me straight please.
First of all. In Actionscript good practice should all the code reside in one .as file or is it common practice to seperate ellements of the game by using seperate .as files? ie one for the main time line and another for the main character and so on?
The second question is a bit more complex. In my original game Code for the enemy characters resided in on the movie clip. This clip was then duplicated taking the code with it. Now that have movied the script to the main timeline I am finding it difficult to reference the duplicated objects.
The original scrpit works alone the lines of:
On the main time line
_root.enemy_mc.duplicateMovieClip("enemy_mc"+_root .enemyCount,_root.level);
Then on the movie clip is the onEnterFrame function:
OnClipEvent (EnterFrame){
this._x +=2;
}
How can this be translated to the main time line. I have tried using
_root["enemy_mc"+_root.EnemyCount].onEnterFrame =function(){
}
But this doesn't seem to work. Can anyone help? Maybe you cannot use onEnterFrame this way but I am not sure please shed some light on this for me.
Thanks
Some Simple Questions
Hi, I am fresh to Flash and have the following questions:
1. I have a frame that display some text and I want it to hold for 30 seconds and then go to the next frame. Is it possible to use ActionScript to do that?
2. I saw some Flash website which have a loading bar or counter. How to do that?
3. My Flash file contain 7 scences, can each scene has an individual loading bar?
Thanks!
2 Simple Questions
I have 2 simple questions. I may look back an laugh at how stupid these questions are later but here they are. Firstly, how do I make an object "solid", how do I make it so that if you drive into it you stop or bounce off?..
Secondly, how do I make it so that when I drive off the screen the screen kinda follows the object?..
If they make sence..
Some Simple Questions -Regarding XML
I'm following the adobe demonstration of loading xml, i.e. Load the xml file into a XMLConnector component --> into a dataSet component --> into a dataGrid component.
I have the following questions:
1) If i have multiple scenes in my flash document and I have the XMLConnector and dataSet components in scene1 only, will i be able to access them in any other scene (i.e have my dataGrid in a seperate scene). Or do I have to re-instance them each scene and reload the xml data?
2) I plan on having my dataGrid editable by the user, I have tested this and to me it appears the data loaded in the XMLConnector does not get changed when the dataGrid is edited (i did this useing XMLConnector.results after the dataGrid was edited). Is there a method of refreshing the dataGrid with the original data without having to reload it (using XMLConnector.trigger() ) ?
3) I want to have my user be able to edit the original XML file, i know flash can't write directly too files. What would be the most reliable method for writing to the xml file via flash - i.e. flash to php to xmlfile ? Or is there no good way of doing this from flash?
Thanks for any help you guys can offer. (Using MX 2004)
Simple ? Questions
at least for me not that simple...that's why I come back
1- how do I position my flash web site to be sure that it will appear in the middle of my viewers screens ? I checked the publish settings, but whatever I try, does not work...
2- I am in the finalization of all the site, and so , I am putting all the swfs in my button menu. Everything is ok in the html preview, but when I try to navigate the menu, I can not navigate, because each first swf that appear on button command does not diappear..
I hope you'll get what I mean, considering my high english level.
Thanks
Four Simple Questions...
Hi,
I have been working on a simple family website for me and my girlfriend (not something I got a lot of time for) --> www.kraghkrogh.dk, but I have run into a couple of problems that I can't seem to solve googling
1. No matter what settings I use to publish the document, my flashsite is in the left upper corner. Any idea on how to change that? I wan't it to be centered in the top.
2. I have found this site that explains how to remove the active x control, by including a javascript in the html document. It semi works, but IE keeps saying "(1 item remaining) Opening page......". Any other way to do this properly?
3. On the "nyheder" page, I got a scrolling area consisting of a dynamic textfield and two buttons for scrolling. How can I format the text inside the dynamic textarea or is there a smarter way to do this? (i think the kirupa tutorial is to complex)
4. On the scrolling buttons, I have the following code:
Code:
on (release) {
scrollbar.scroll -= 4;
}
Is there anyway to make it scroll continuously while the button is pressed?
Help is appreciated!!
Regards
Kragh
**** 2 Simple Questions ****
Question 1
on (press, release) {
button1.onRelease = function() {
_root.gotoAndPlay("scene 2", 1);
};
}
I have the _root with a sliding menu. In the sliding menu I have buttons. I want the buttons to change scenes, however the buttons only seem to function as long as my request is in within the same scene.
ex:
gotoAndPlay("frame 10");
Some Simple Questions
Hi, I am fresh to Flash and have the following questions:
1. I have a frame that display some text and I want it to hold for 30 seconds and then go to the next frame. Is it possible to use ActionScript to do that?
2. I saw some Flash website which have a loading bar or counter. How to do that?
3. My Flash file contain 7 scences, can each scene has an individual loading bar?
Thanks!
Two Simple(?) Questions...
I'm rather new to AS... and I'm having a bit of trouble with two things.
01. I have a series of movieClips. Ideally, when I click and drag one of the clips I get a duplicate clip that I can drop anywhere I like. The original clip stays put. This action could happen an unlimited number of times.
02. I want to streamline my function calls (please see code sample - specifically the 'topping clips')
Thanks in advance.
cK.
Code:
// general drag and duplicate function
function addTopping(topping) {
topping.onPress = function() {
// this is the trouble spot
i = i + 1;
this.duplicateMovieClip(_root.topping, "topping" + i, i);
this.startDrag();
this.onMouseMove = function() {
updateAfterEvent();
};
};
topping.onRelease = topping.onReleaseOutside=function () {
this.stopDrag();
this.onMouseMove = undefined;
};
}
// list of topping clips
addTopping(red_mc);
addTopping(grn_mc);
addTopping(blu_mc);
addTopping(ylw_mc);
addTopping(blk_mc);
addTopping(org_mc);
addTopping(prp_mc);
Simple Questions
HELLO.
i have a button with actionscript like;
on (release) {
_root.gotoAndPlay(11);
}
you click on that button it will go to fame 11 and play. however when you click on the button again it just replay it again from frame 11. i want it to do nothing when click again. how would i solve this problem?
cheers
A Few Simple Questions
I'm just starting out on flash and I'm running into a few problems. I have a picture that is used as the background. I want to have it fade from color to a greyscale photo and then fade into another photo. I tried a few things but have not been able to figure it out. It may be because I don't even know what the technique is called but, that is besides the point. Anyways, any help would be very appreciated. Thanks.
Couple Of Simple Questions
1. Where would I put the fas.win.title command so that the title is controlled throughout the movie? It would be the same title, not changing during scenes or or anything.
2. Where would I put the commands to lock the screen at a certain resolution?
3. Anyone know a good way to make a sparkler-like effect, and if so, how would you loop that into a movie? I'd like to add an effect like that to the text at the top of the page and leave it running, while the rest of the movie does other things. Would it be a nested sort of thing, or something else?
A Few, Simple, N00by Questions
I'm working on my first project on Flash using ActionScript. I wanted to know a few simple things. The game is more or less a Pac-Man clone. I wanted to know how, via ActionScript, to restrict my character's movement to single vertical and horizontal lines all across the screen. Anyone who's every played Pac-Man and can remember the way he moves should know what I'm talking about. I just made 4 different Pac-Man MC's, one for up, one for down, etc. And I'm gonna use the basic onKeyPress commands. I just want to know how to restrict where he can move to. Or in other words, set the paths my character can use. Thanks for any and all help.
-Evil AP
2 Simple Combo Box Questions
1) Using MX, and i have 3 combo boxes on different layers that all are just url links. the bottom combo box works but the top 2 won't.....WHY!?!?!?!?!
2) and what should i input in the data for the title of each combo box? i have it set to defaultValue but when i select it(the title), it opens up an error web page. and of course when i return to my hompage, the name of the last link is still highlighted in the combo box and not the title of it, as i would like it to be.
hmmm. perhaps this is a 3 part question!
THANKS
Simple Questions (supose)
im starting a site with many movies inside .
Can i tell from a button in a movie so when clicked to run (something (play) (nextframe)) in the other movie
2:
where can i find the source for flashchat as is on valvegroup.com
or something similar.
A Few Simple Flash MX Questions
My objective is to have all these 5 files to appear the Flash way very attractively on my page.
question 1: I want to import 5 jpg files in sequence file name from 1 to 5 into Flash, I start a new blank page and then I import those files. then all 5 files stacks together in the middle of the new page, how do I crop the page or trim the canvas to fit them nicely, or is there another way to do it? Please help me.
question 2: How to stop them from looping endlessly, I try and try but it still loops?
A Simple Questions About Link
i want to make a button,when i click the button,
it will link to other scene(in the same file),how can i do?
thanks^_^
Simple Questions For Flash MX 7
i'm just getting started in flash and i have a couple questions:
#1. how do i add SoundFX from FlashKit to my flash page?
and
#2. i am trying to create a Menu button which is animated, and when you click it, more buttons appear scattered all over the page. how do i do this? i already did the menu button animation, but don't know how to make it a working button, and also don't know how to make the others appear once it is clicked.
THANK YOU!!
Couple SImple Questions?
Ok, I have slides one for every letter of the alphabet, well on some of these I want thumbnails of images that when hovered on are much larger, I tred using buttons about when you would hover in the area that it would be big it would popup, so help with that and I want to have a video play, like an actualy wmv that ive already loaded into another flash file, but i want it to kinda sit there, with the screen until clicked on, then I want it to play, if you get what I mean please let me know how to do it, if you dont understand ask what oyu need clarifying on, thanks people.
A Couple (hopefully) Simple Questions
EDIT: hurray, i think i got everything i had issues with in this thread fixed, thanks for the help
First, is it possible to use a variable when setting a goto on a button?
EDIT:Amazing what happens when you try something before you ask about it, but it does seem to work
And secondly, is there a way to set a default value for a text field variable? right now, until the user selects something that will set that variable, it's showing up as _level0.varname
2 Simple Game Questions PLEASE HELP
O.k so im making a game and i need to know the action script for these 2 things:
~How to detect if NO KEY is being pressed
~How to spawn a movieclip i.e. bullet
PLEASE HELP!
GetChildByName Questions - Simple
I'm creating text fields dynamically using:
// FOR LOOP
var newResult:TextField = new TextField();
addChild(newResult);
newResult.name = 'result'+resultNum;
The newResult text field has a bunch of default properties defined, like:
newResult.multiline = true;
etc...
The problem is, I'm trying to reposition each new result and it's not working. I'm using:
getChildByName('result'+resultNum).x = // MY MOVING EQUATION
What happens is the first result is moved to the last x-pos determined by the equation (+= inside a loop)
What am I doing wrong?
New To AS 2.0 - Simple But Good Questions - Help.
I am pretty new to AS 2.0, I used to program in 1.0 then I took a hiatus from Flash for about 3-4 years. I like AS 3.0 but not many jobs around my area want AS 3.0 yet.
Question 1:
I have been looking at some of the Friends Of Ed Books and in most of the examples they author is not using "this." in the constructor function. It works, and I understand the scope issues. But wouldn't it read more consistently to use "this."? Hi other functions use "this." when appropriate. In addition, the constructor function has no strong:Case used... no :Void at the end. Is this good syntax as well? Again, it seems inconsistent with the other functions.
Question 2:
Are there other good programming books that help explain the Flash syntax? I have enjoyed this book "Object Oriented ActionScript for Flash 8", but sometimes things aren't well explained. The standard Flash documentation is rather good, but slow way for me to learn.
Question 3:
I am looking for a crash course in XML with Flash. Especially one that doesn't use the internal XML of Flash. Something with really good performance and good documentation. Again, I am looking for a reference not a product. I am wary of online tutorials as they can sometime teach bad habits not good OOP coding.
Any help would be greatly appreciated.
Thanks.
Simple Syntax Questions
Hello
I need to setup a loop that does this 44 times:
if (this.c1.selected == true) {
var featurecomm1 = Fcomm[0];
var featurecomm = Number(featurecomm)+Number(featurecomm1);
theFeatures = theFeatures+"/ /"+Fdescription[0];
}
c1 will go from c1 to c44.
this is what i have but i think something is out of place:
for (i=0,i<=44,i++) {
if (this["c"+(i+1)]selected == true) {
var featurecomm1 = Fcomm[i];
var featurecomm = Number(featurecomm)+Number(featurecomm1);
theFeatures = theFeatures+"/ /"+Fdescription[i];
}
}
please help!
Simple Loop Questions
I created this loops just because I have many variables I want to set easily to true and false, but when i do allConditions = true, it wont work. How do i set condition1 to condition 43 to true and false in this case?
for (i=1; i<43; i++) {
allConditions = "condition"+i;
}
A Couple Of Simple Questions
i'm new to flash, and i can't figure out how to counteract "attachMovie" so that the movieclip only plays through once instead of repeating.
I have a similar second problem, and in fact it might be the same. I have a movie clip that i want to only play in one scene, but it continues playing in evey scene. It was also done with "attachMovie"
pleeaaasssee help. I'm not sure where else to turn.
|