Short Question
Hate to sound ridiculous on my first post but..
I've been working with flash off and on for about 3 years now making short cartoons and such. I just recently decided to get into designing websites and making games with it. I've never messed around with the actionscripting much other than for preloaders and zooming in and out and was wondering if someone could suggest some good books on creating games and has good explanations of actionscript.
Thanks
FlashKit > Flash Help > Flash MX
Posted on: 02-11-2004, 08:15 AM
View Complete Forum Thread with Replies
Sponsored Links:
Put Me On The Short Bus
I am having a problem with a drop down menu that I am trying to make. I want 6 or so buttons across the mc, that are set at _alpha=40. On rollover, i have a script that sets the alpha to +1 until it gets to 80, and then on rollout, back to 40 in -1 intervals. Fade in, fade out basically. Anyways, the alpha also effects the children of these buttons, which are set to _alpha=0 initially, and when the parent is rolled over, they set themselves to alpha=60 gradually. If you rollover the children, the alpha increases to 80. There is a dynamic text field over each button as well, which need to be all targeted seperately.
The problem is, Flash does not deal with an onRollover inside of another. It will just ignore it. The parent MC will fade in and show the children, but the children will not respond. I tried yelling at them and everything. How do I do this without having to make 800 different MC's?
View Replies !
View Related
Short Job
Would any professional out there be interested in a small 8 -10 second job?
I would like to make an introduction that will play before every cd that I make; the introduction to include my company name and details as well as the logo. This can be just visual and I could add the audio myself.
I'm just beginning to make cd's to be played back on a projector. So far I've just made short presentations for schools. I feel a small intro would add professionalism to my work and perhaps attract more clients.
Waiting to hear.
My email is mail@artistic-desk.co.uk
View Replies !
View Related
A Short Question About CGI
Ok, I am in the progress of making a complete Flash Site and I was wondering if it were possible to make a newspro style script run into flash. BTW im running Flash MX!
Newspro is a CGI script which allows you to post news into a series of boxes eg: Title, Username, Etc.
Basically a Message Board but for Admins Only, to allow them to display the web news without having to upload anything!
A link to a newspro Zip is here:
http://members.optusnet.com.au/maste...newspronew.zip
Hope you can help me:
Thanx in advance
View Replies !
View Related
Long, But Short
I can't get this to work.
Here's what I'm trying to do:
I have a clip on the stage called can. I need to duplicate this clip 99 times so that there are 100 on the stage. There needs to be 4 rows with 25 clips in each. Like the layout below, with the clips in place of the asterix's.
* * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * *
So I start with one clip on the stage at the top left of the layout. It's co-ord's are (x20, y20). Each new clip needs to be placed 20 pixels to the right of the previous. So the first clip to be duplicated needs to have co-ord's of (x40, y20) and so on. When the first row is full (24 duplicates + the original) the 25th duplicate needs to have co-ord's of (x20, y40) and then continue in the same fashion as the top row. When there are 100 clips (99 duplicates) on the stage the _root playhead needs to move on.
I could do this easily enough without scripting, but I need to increase my skills in this area.
I have these two variable initiated in the first frame of the _root timeline:
howMany = 0;
whereX = 20;
In the next frame of the _root timeline I have a stop (); command. This is where I have my can clip placed on the stage. The code I have on this clip is:
onClipEvent (enterFrame) {
this.duplicateMovieClip ("can", "can" + howMany, howMany + 50);
_root["can" + howMany]._x = whereX;
whereX += 20;
howMany += 1;
}
I know that this won't help with moving the 25th duplicate to the second row but I thought at least it would be a start - however nothing happens.
Can anyone offer any assistance please.
Thanks for your time,
Stephen.
View Replies !
View Related
::: Short Question :::
A button that when is clicked, the whole page close!
I need this becaue my site is on Fullscreen mode and you cant see the
close button!
I need a script to do that button from Flash or...how to make it in Dreamweaver.
View Replies !
View Related
Short Pause
i made a movie clip, and put a small sound loop in it, but when i run the movie, theres a short pause before the clip loops over... how do i make it loop smoothly?
View Replies !
View Related
Two Short Questions
Hello, ive got flash mx and ive got to short questions:
1. I read the tutorial about "manipulating" projector files, but there wasnt said how to make a projector start in 100% and full screen, can you help me?
2. I want to code for different solutions, but I cant change the document size at the different scenes, help?
Thx,
BaSchni
View Replies !
View Related
A Short Function...
hello,
basically i have a button located in a movieClip that is called/at _root.one
On the release of the button, (and after the _root.one movieClip is not being dragged anymore) i want to call a function that will return the _root.one movieclip to its original location.
the button says--
on (release) {
stopDrag();
_root.returnIt(this._name);
this._alpha = 100;
_root.drag1 = "false";
}
the function located at the _root timeline says--
function returnIt(theMC) {
_root.theMC._x=50;
_root.theMC._y=50;
trace("trying to return");
trace(theMC);
}
-----
The trace("trying to return") does output in the 'output window', and trace(theMC) outputs "one" with no quotes.
thanks much.
View Replies !
View Related
Short AS Not Working?
I have used this script many times and now in this new fla. it is not working.
It allows you to click on an "object" turning red, if its red and you click on it again,the object turns blue(basically togglees between the two colors). The "labels" in each MC are correct as is the "instance" names.
Can you see anything?
thanks
code:
on (press) {
count = (count+1)%2;
count ? _root.MC_P_FoglampSW.gotoAndStop("Off") : _root.MC_P_FoglampSW.gotoAndStop("On");
count ? _root.MC_FoglampCircuit.gotoAndStop("Off") : _root.MC_FoglampCircuit.gotoAndStop("On");
}
View Replies !
View Related
Short 3D Animation
Does anyone have the time and the program, such as Swift 3d, that can help me create a short animation for my site, It won't take long at all and I have used a 3D editor before and what I am wanting to accomplish is very simple.
What I need is a an animation that plays like the jpeg shown, the text is just there to show that the box is 3D I do not want the text in there, just the outline of a rounded corner box like the one displayed in the picture. Thanks for your time!
View Replies !
View Related
Following Short-info
Hi,
does anybody know, in this example, how to let disappear the shortInfo again?
It appears on rollover (over the wave drawing) and disappears again on the next rollover, but it should disappear on rollout instead. (you can find the code implemented so far under actions and the wave button).
Many thanks in advance, best,
flo
View Replies !
View Related
So... I Ride The Short Bus :(
Alright so.. I'm going along working on a project, things are going as well as can be expected... and then boom! it breaks! I have spent a couple hours looking at this. I know its simple. But I cant find the breakage.
The previous state which works is found at http://www.embyrs.com/~rosspnt
I couldnt go back to the last good save point...
So the .fla file that is now broken can be found at
[Agent Karl]Edit: I took the file down... now that it works....[/Agent Karl]
Most of the content I am refering to occurs at frame 61 for reference-
Notice how as soon as the site finishes fading in/animating... content appears from the movie clip myContent found on the content layer. This is because on the "other actions" layer I have a line that says _root.myContent.gotoAndStop(2);
the object refered to as myContent is found in the library as ContentArea
Also, the side menu sends the movieClip myContent to the right menu based on....
on (press) {
_root.myContent.gotoAndStop(3);
_root.myContent._y = 491;
}
In the now version- the myContent movie is getting stuck at frame 1 (which is an almost blank frame other than a really opaque background) and not obeying!
None of the external commands for telling myContent where to go are working. Including the side menu buttons found on the side menu layer (click on one of the buttons then go to actions)
Also, at the same time, those up and down scroller buttons which scroll myContent under the mask stopped scrolling. The script for those can be found on the layer Scroller Actions.
I am sure this is some obvious something somewhere... ahh.. but I cannot find it. Please help, I'm tearing out my hair here! You folks have been so good to me in the past, thanks for the effort!
View Replies !
View Related
Short Delay
Hi. How can I cause a delay between two events happening?
For example, in Frame 1 I have:
loadMovie("movie1.swf", "_root.movieplace");
loadMovie("movie2.swf", "_root.movieplace");
As you can see, the second movie will instantly load, so the first one won't even get a chance to show.
Does anyone know how to add a delay, so that I can have movie1.swf play, and the movie2.swf play right after it's done?
[Assume movie1.swf is about 5 seconds long (therefore a 5 second delay is needed)]
Thanks a lot!
View Replies !
View Related
Need Short Code Fix
Im tryind to make flash wait a certain random amount of time at the end of a mc, here's what i wrote:
PHP Code:
i = math.Random()*20+10;
while (true) {
if (i >= 1000) {
break;
}
i++;
}
i dont know what i've done wrong, but im not an AS god so any help will be welcomed (and if there is a nother way with time in seconds i would appreciate, although i havent found anything)
View Replies !
View Related
AS Short Syntax Help
New Member here, hey guys.
Need a lil help with ActionScript here.
Example:
if (monkeyBone == "good")
{
var toy = "videogames";
} else {
var toy = "rocks";
}
can be written as
(monkeyBone=="good") ? "videogames" : "rocks";
I find this useful,
I had seen a forum post where I found many such short cuts, sadly lost the link.
Another Example:
if (monkey_behavior == "good")
{
var toy = "videogames";
}
can be written as
if (monkey_behavior == "good") var toy = "videogames";
Does anyone have a link to any such page which lists it all?
Do we have this here?
Can any one of you contribute to this and add more?
Luke
View Replies !
View Related
Short Preloader
HI all! I'm new to the forum. I decided to join this Flash forum because of the assume tourtorial Kirupa has (http://www.kirupa.com/developer/mx/p...epreloader.htm). The only thing that I can't seem to figure out about this toutorial is why my bar seems to be shorter when it plays then it is on the stage. MY stage is 320 X 300 and my bar is 230 X 25. I've checked my registration point and it is in the right place I think. Does anyone have any ideas what may cause this? I'm attaching a smaller version of my swf so you can take a look at it if you want. Thanks in advance!
View Replies !
View Related
Rotate The Short Way
I'm making a Pacman game, and I'm not so good with my first code. I want the Pacman to rotate to the direction to go. Here is my code for that. The hittest is to stop moving if bumping a wall and the curRect variable is the value of the direction to rotate to.
Code:
var rotSpeed:Number = 10;
function dirListening(){
var paNose = returnGlobal(this.packin.nose);
if(this.dirEcto=="Up"){
if(!this.wall.hitTest(paNose.x, paNose.y, true)) this.packin._y--;
this.curRect = -90;
}
if(this.dirEcto=="Down"){
this.curRect = 90;
if(!this.wall.hitTest(paNose.x, paNose.y, true)) this.packin._y++;
}
if(this.dirEcto=="Left"){
this.curRect = -180;
if(!this.wall.hitTest(paNose.x, paNose.y, true)) this.packin._x--;
}
if(this.dirEcto=="Right"){
this.curRect = 0;
if(!this.wall.hitTest(paNose.x, paNose.y, true)) this.packin._x++;
}
//turn to rotate
if(this.curRect != this.packin._rotation)
this.packin._rotation = this.packin._rotation - rotSpeed;
}
It works just fine, but it only works if I subtract the rotate speed from the rotation. If I try to add the speed to rotation it gets stuck in an infinite spin. So the problem is it will only turn counter clockwise, therefore it will go the long way around like from facing up to facing right. How can I modify the code to go both clockwise directions (the short way) and not get stuck in a spin?
View Replies !
View Related
AS Short Syntax Help
New Member here, hey guys.
Need a lil help with ActionScript here.
Example:
if (monkeyBone == "good")
{
var toy = "videogames";
} else {
var toy = "rocks";
}
can be written as
(monkeyBone=="good") ? "videogames" : "rocks";
I find this useful,
I had seen a forum post where I found many such short cuts, sadly lost the link.
Another Example:
if (monkey_behavior == "good")
{
var toy = "videogames";
}
can be written as
if (monkey_behavior == "good") var toy = "videogames";
Does anyone have a link to any such page which lists it all?
Do we have this here?
Can any one of you contribute to this and add more?
Luke
View Replies !
View Related
Long, But Short
Last edited by Pen : 2003-01-21 at 21:02.
I can't get this to work.
Here's what I'm trying to do:
I have a clip on the stage called can. I need to duplicate this clip 99 times so that there are 100 on the stage. There needs to be 4 rows with 25 clips in each. Like the layout below, with the clips in place of the asterix's.
* * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * *
So I start with one clip on the stage at the top left of the layout. It's co-ord's are (x20, y20). Each new clip needs to be placed 20 pixels to the right of the previous. So the first clip to be duplicated needs to have co-ord's of (x40, y20) and so on. When the first row is full (24 duplicates + the original) the 25th duplicate needs to have co-ord's of (x20, y40) and then continue in the same fashion as the top row. When there are 100 clips (99 duplicates) on the stage the _root playhead needs to move on.
I could do this easily enough without scripting, but I need to increase my skills in this area.
I have these two variable initiated in the first frame of the _root timeline:
howMany = 0;
whereX = 20;
In the next frame of the _root timeline I have a stop (); command. This is where I have my can clip placed on the stage. The code I have on this clip is:
onClipEvent (enterFrame) {
this.duplicateMovieClip ("can", "can" + howMany, howMany + 50);
_root["can" + howMany]._x = whereX;
whereX += 20;
howMany += 1;
}
I know that this won't help with moving the 25th duplicate to the second row but I thought at least it would be a start - however nothing happens.
Can anyone offer any assistance please.
Thanks for your time,
Stephen.
View Replies !
View Related
Please Help Me Write This Short Code...
I want the code to work like this...
------------------------------
Create a random number, 1 or 2
If 1 then play frame 1
If 2 then play frame 2
Repeat
------------------------------
I want this code to randomly play either frame one or two and repeat this process. I know how I want it to work, but I just don't know the correct actions or code to use.
Thanks
View Replies !
View Related
A Few Short Questions. Answer If U Can Plz
1) is there an actionscript that you can place in the timeline to make all sound loops fade out? like a volume control of some sort?
2) is there a way to make a dynamic textbox scroll continuously while on mouseover?(mouseover on a scrollbar button)
3) is there a way of checking how cpu-heavy a flash movie is?
View Replies !
View Related
Short Validate Question......
Hi!
I need to know if ActionScript will let me validate a flash form using the same syntax as Javascript..i just need to know for one part, to check if my textfield 'E-mail' does NOT contain an '@'...
i am running an intranet, so everyone has the same last part of the e-mail, so there would be no reason to type an '@' in the field...
Basically, if anyone can show me how ActionScript can be used to check for a certain character(s) in any position within the textfield, i'd greatly appreciate it!
thanks!!!
View Replies !
View Related
Short Script Problem
I have a movieclip name 'theband.swf' with a stop action in it's first frame. It's second frame is labeled "begin". I'm using this code in another movie to load 'theband.swf' into it:
Code:
loadMovie("flash/theband.swf", "_root.holder1_mc.cover_mc");
_parent._parent.cover_mc.gotoAndPlay("begin");
When I call this code 'theband.swf' doesn't play.
Now I've checked the paths and all and they are correct (when I remove the stop action from 'theband.swf' first frame it plays right away).
I really need the stop action in the first frame for preloading reasons. Any other way I can get this movie to play somehow?
Thanks!
PS - Working on Saturday sucks.
-Foochuck
View Replies !
View Related
Short Xmas Animation
I have been asked to do a short movie for a christmas thing. I thought I would be able to put something basic together, but it looks crap. I have searched for some other christmas movies and tried modify them to make it, but I cant get it to look any good.
The movie should go like this -
1. You see houses in snow, then you see santa and reindeers fly above them a couple of times.
2. Camera goes close up on a house and you see santa land.
3. Santa hops out and then climbs down the chimny
So if anyone feels like helping me out by making something basic, it would be greatly apprecitated, and if its good I might even pay a little something for it.
View Replies !
View Related
Help MP3 Sound Cuts Out Short
See www.vewdo.com, side panels with the rollovers... Clicking on each button plays sound clip(mp3)... On some, 3 of the 4 on the right, the sound cuts short on the published movie... it just cuts out the last 5-10 seconds of each... Any reason why? The left side panel was created identically, yet no clipping. I'm a newbie, so this is just simple flash. Any help would be great!
View Replies !
View Related
Scrollbar Stopping Short
Hi,
I have a working scrollable text area with scrollbar, including the abiltiy to drag the bar to scroll the text in addition to the up and down buttons. I'm having trouble with the positioning of the bar when using the up and down buttons. When using the up button to scroll all the way back up, the bar stops short. I've attributed this to .scroll never being 0. Of course if I try to counter this by subtracting 1 from .scroll, the bar falls short on it's way to the bottom using the down button. Any suggestions?
scrollPos_btn is the 'bar'.
code:
scrollBar_mc.scrollUp_btn.onPress = function(){
scrolling = true;
scrollInc = -1;
}
scrollBar_mc.scrollUp_btn.onRelease = function(){
scrolling = false;
}
scrollBar_mc.scrollUp_btn.onReleaseOutside = function(){
scrolling = false;
}
scrollBar_mc.scrollDn_btn.onPress = function(){
scrolling = true;
scrollInc = 1;
}
scrollBar_mc.scrollDn_btn.onRelease = function(){
scrolling = false;
}
scrollBar_mc.scrollDn_btn.onReleaseOutside = function(){
scrolling = false;
}
scrollBar_mc.scrollPos_btn.onPress = function(){
startDrag(this, false, this._x, 0, this._x, 225);
dragging = true;
}
scrollBar_mc.scrollPos_btn.onRelease = function(){
stopDrag();
dragging = false;
}
scrollBar_mc.scrollPos_btn.onReleaseOutside = function(){
stopDrag();
dragging = false;
}
contRegion_mc.onEnterFrame = function(){
if(scrolling == true){
region_txt.scroll = region_txt.scroll + scrollInc;
scrollBar_mc.scrollPos_btn._y = ((region_txt.scroll-1)/(region_txt.maxscroll))*225;
}
if(dragging == true){
region_txt.scroll = (scrollBar_mc.scrollPos_btn._y/225)*region_txt.maxscroll;
}
}
View Replies !
View Related
Cutting Short A For Loop ...
Here is my code:
Code:
for (var k = 2; k<feedArray.length; k++) {
trace(feedArray.length);
display.htmlText += "I am a line of text";
}
So my problem is that sometimes the feedArray.length is huge, over 250, and this creates other problems in my code. What I want to do to combat this problem is to only run this for loop on the first 40 items of any given feedArray.length (which varies greatly and over which I have no control).
So can anyone suggest a solution - perhaps using while and do (or something else maybe ???);
Thanks for any help,
Stephen.
View Replies !
View Related
Making A Short Quiz
I am trying to make a short quiz with four questions, depending on which button they click on they get a total score, each question is either given 100 or 0, then i want a total score of x/100 to output. I can't seem to change the variables with buttons, here is the script:
-------------------------
q1 = 0;
q2 = 0;
q3 = 0;
q4 = 0;
stop();
b1_1.onPress = function() {
q1 = 100;
};
b1_2.onPress = function() {
q1 = 0;
};
b2_1.onPress = function() {
q2 = 100;
};
b2_3.onPress = function() {
q2 = 0;
};
b3_1.onPress = function() {
q3 = 100;
};
b3_2.onPress = function() {
q3 = 0;
};
b4_1.onPress = function() {
q4 = 100;
};
b4_2.onPress = function() {
q1 = 0;
};
totalscore = (q1+q2+q3+q4);
answerbtn.onPress = function() {
trace(totalscore+"/400");
};
------------------------
I know the answer is easy, thanks in advance-
kidix
View Replies !
View Related
Imported Videos Short
Hey,
I had some RealMedia videos that I wanted to use in a flash file, so I converted them to mpg format and imported into flash. Now my problem is, when each file plays say in Windows Media Player, the track bar shows a shortened duration than the original, but when played it will play the whole movie (it gets to the end and continues playing, even though the track has elapsed).
The issue with Flash is that when I import, the clip is automatically shortened to that length I get in Windows Media player, when there still is more movie left in the file. Any suggestions?
View Replies !
View Related
Short Animation Gets Out Of Sync
I'm looking for someone who would seriously like to help me. I created a simple animation with all imported wavs that I set to stream. Halfway through this animation (where the foot smashes the bread), the audio stops going with the animation. I've tried so many things. I'd really appreciate if someone would download my .fla file: http://home.comcast.net/~a.aragon10/bread.fla (its over 5mb) and tell me what I'm doing wrong, if anything. You'd make my day. Seriously.
View Replies !
View Related
[CS3] Variable String Being Cut Short
I've got an ASP file that is passing a variable from a database into my flash project and displays it in a text box.
This works fine until the is an apostrophe in the string. If there is one the string gets cut short. For example:
"here's my example string"
would become
"here"
I've also tried passing it like this "here's my example string" but that still doesn't seem to work.
Any ideas?
Thanks
View Replies !
View Related
Short Pause Within A Function?
I have a function that looks like this:
Code:
// define the "funcQuizScore" function;
function funcQuizScore() {
loadMovie(sMediaPath+"quizscore.swf", mcQuizScore);//load QuizScore movie;
nQuizScore=(nQuizScore/4*100);//calculate score percentage;
if (nQuizScore >= 75) {
mcQuizScore.gotoAndStop("pass");//play QuizScore PASS;
} else {
mcQuizScore.gotoAndStop("fail");//play QuizScore FAIL;
}
}
I think need a slight delay between the loadMovie statement and the if/else statement in order to load the movie and have it ready when the if/else statement executes.
I have looked at setInterval but that always seems to be a separate function. Is there another way to do a brief pause or can I somehow call a setInterval function from inside the above function?
Thanks!
PS: I'm new at AS coding so no laughing at my clunky code.
View Replies !
View Related
What's Wrong With This (really Short) Code?
I have two (more to be added) buttons: When either is pressed, an mc appears (different mc for each button). If the first button is pressed when the second button's mc is visible, the second button's mc gets set to _visible=false (so the clips don't appear 'on top' of each other). And vice-versa.
Here's the code:
q1_btn.onPress = function() {
_root.q1_mc._visible = true;
_root.q1_mc.gotoAndPlay("start");
_root.q2_mc._visible = false;
};
q2_btn.onPress = function() {
_root.q2_mc._visible = true;
_root.q2_mc.gotoAndPlay("start");
_root.q1_mc._visible = false;
};
And this works! What happens, and what I cannot figure out, is:
If I press the first button (first mc appears), then the second button (first mc dissappears; second mc appears), then the first button again—I have to press it twice to get the mc visible.
All subsequent presses require two presses for the mc of each to appear.
I intend to have a number of buttons acting like this so the user can go back and forth, and in any order. I just cannot understand what is causing two presses to be needed!
I have looked at this code for so long I'm not even seeing it anymore! My head hurts...
View Replies !
View Related
Convert Short Code To AS3
Can someone convert this short code to AS3?
Code:
on(press){
dragging = true;
orig_mouse_angle = Math.atan2(_parent._ymouse-_y, _parent._xmouse-_x) * 180/Math.PI;
orig_rotation = _rotation;
orig_x = _parent._xmouse;
}
onClipEvent(mouseMove){
if(dragging){
curr_mouse_angle = Math.atan2(_parent._ymouse-_y, _parent._xmouse-_x) * 180/Math.PI;
_rotation = orig_rotation + curr_mouse_angle - orig_mouse_angle;
updateAfterEvent();
}
}
on(release,releaseOutside){
dragging = false;
}
View Replies !
View Related
Short Comment On Randomness...
Hi:
This isn't a question, but it's something I think it's worthy of say; I'm working with FlashMX, and had a few random() scripts in my code. But in the constant testing I noticed that everything was turning very sluggy in the movie, and even in the computer itself.
Consulting the dictionary, I saw that random() is deprecated since Flash 5, and that the use of math.random() is recommended instead.
I had to look here and there before learning how to use the .math object correctly, but it's worth the shot. A lot of performance issues with my movie were gone, and I'm a very flash user now and blah blah blah...
Here at actionscript.org is a nice tutorial about this subject, go to
http://www.actionscripts.org/tutoria...ns/index.shtml
Greetings to all
Sir Patroclo
View Replies !
View Related
AS3 Short Program Problems
Ok so i am trying to make a simple drag and drop program. I've done it alot in as2, but cant seem to do it in as3. I've uploaded the file for anyone who cares to look, but i think i'm just completely doing this wrong. For one thing, the swf wont play right in internet explorer 7.0, but it will play right in firefox. Also when the user finishes dragging all the draggable movie clips, they are supposed to dissapear, but do not. And the code for my buttons is all over the place and i dont think thats right either, but i'm used to as2 where you can place it anywhere. Its a total mess. Can anyone tell me what i'm doing wrong.
View Replies !
View Related
As3 Short Program Not Working
Hey everyone... i'm trying to learn as3 and am doing a quick drag and drop program. I have done dozens of these in as2 but am lost with the new structure of as3 and where to place the code. In as2, i could just place the code on each frame that i need it on, however with as3, its not working right when i do this. As you can see from the file, i have tried to do this like i would with as2, but it seems greatly inefficient and i know this is not the proper way. Where do i place my code with as3 and how come this doesnt work with the way i have it? Any help would be greatly appreciated.
View Replies !
View Related
As 2 To As 3 Help With One Part Of Very Short Code
Hello,
I need help converting this from as2 to as3. here is code
attachMovie should be addchild()
_x should be just x
I cant figure out what t.dx should convert to.
for(i=0;i<25;i++) {//number of instances
var t = this.attachMovie("dstream","dstream"+i,i);
t._x = Math.random()*1000;
t._y = Math.random()*1000;
t.dx = Math.round(Math.random()*1000);//destination coordinates
t.dy = Math.round(Math.random()*1000);
t._xscale = Math.random()*150+40;//scale of object
t._yscale = t._xscale;
t.onEnterFrame = mover;
}
function mover() {
this._x += (this.dx-this._x)/100;//easing of motion
this._y += (this.dy-this._y)/10;//easing of motion
if(Math.round(this._x) == this.dx) {
this.dx = Math.round(Math.random()*775);
this.dy = Math.round(Math.random()*600);
}
}
any help would be much appreciated!
thanks,
View Replies !
View Related
Cutting Short A For Loop ...
Here is my code:
Code:
for (var k = 2; k<feedArray.length; k++) {
trace(feedArray.length);
display.htmlText += "I am a line of text";
}
So my problem is that sometimes the feedArray.length is huge, over 250, and this creates other problems in my code. What I want to do to combat this problem is to only run this for loop on the first 40 items of any given feedArray.length (which varies greatly and over which I have no control).
So can anyone suggest a solution - perhaps using while and do (or something else maybe ???);
Thanks for any help,
Stephen.
View Replies !
View Related
Tall And Short Layers
hi, i've a question
I recently downloaded a fla from the internet in which the layers in the timeline are "shorter" than the original files I can make in flash. Ok, anybody can tell me what does it means and how can I make some of my taller layers the other size?
WHY?
because they not only change the size but also when using a php form (in my case) they are some small but important differences.
the image will be a better explanation...
View Replies !
View Related
Short Video Question
hi.
do you guys know anything as simple for external video loading (without embedding it to swf) like the same with mp3s?
samzin = new Sound();
samzin.loadSound("samzin.mp3",true);
never tried it and cant find a tutorial on this.
thankyouverymuchifyouknowandhelpme
View Replies !
View Related
Short Simple Problem Please Help
Ok i've got this code:
j = this.itemLabel.text;
trace(j); //returns 1
desc.caption.text = my_xml.childNodes[project2].attributes.caption[j];
the text field ' desc.caption' displays "undefined", which is not what I want. but when I change the third line to this it works, even though j == 1!!
desc.caption.text = my_xml.childNodes[project2].attributes.caption1;
what am i doing wrong?!
View Replies !
View Related
|