Flash Not Recognising A Simple Loop?
Mar 1, 2010im having dramas making this flash loop back to frame 39 in the AS3 i have attached the zipped fla its cs4
View 1 Repliesim having dramas making this flash loop back to frame 39 in the AS3 i have attached the zipped fla its cs4
View 1 Repliesim a complete noob. how would i get this code into a simple 'for loop' to add 3 sprites named heart1, heart 2 and heart3. basically to simplify this mess
ActionScript Code:
var heart1:Sprite = new Sprite();
with (heart1.graphics) {
beginFill(0xFF0000);
drawRect(0,0,20,10);
[Code]...
For each product a label is created determing its category unless a label of that category has already been created before. My while loop is supposed to stop the same label being created twice but apparently it doesnt! My function consists of an array of categories (kategorie[]) and an array of labels that were previously created (previousLabels).
[Code]...
I'm an AS2 convert and struggling. I can't figure out how to get my function to see my array. I keep getting an error that "i" is an undefined property.
var thingsToShrink:Array = new Array(
b1,
b2,
b3,
b4,
b5
);
function shrinkBars(myArray:Array){
for (i=0; i < (myArray.length); i++){
myArray[i]._yscale = 0;
}};
shrinkBars(thingsToShrink);
I'm trying to make a simple for loop that makes a line move. But it won't work, and when i search for "for loop" it gives me all these dynamic things that are WAY over my head.[code]The way i see it, the i should increase by 1 each time the loop is run, and then the line will move up by 1 until it is at x = 0 (it starts at x = -77). But when i preview it in flash and html, nothing happens at all.
View 6 RepliesI have looked everywhere for an example or tutorial on a delta time game loop in AS3. I found many fixed time step examples but very little helpful information on delta time game loops and how it works. I have seen examples that do the calculations in a timer and also seen examples that do the calculations inside the enter_frame event. All the examples I have seen are also incomplete and only provided me with bits and pieces.
View 3 RepliesIm trying to make a simple Image loop for a home page of a website.
I have flash loading the images dynamically thru loadmovie
the Images load fine, but they go on top of everything else.
Is there a way to get them on a lower layer?
I've set up a simple enter frame loop to adjust the alpha on a grid of movie clips ("bubbles") using a distance formula from the mouse pointer.I've got a hunch that while this works fine, there's a more efficient or processor friendly way to do it.
grid of mc's created here....and pushed into an array
stage.addEventListener(Event.ENTER_FRAME, loop);
function loop(e:Event):void{ for each (var j in bubbArray)[code].....
Flash is not in my toolset, but I am an old Director jock and have spent some hours dipping my head into the Flash manual. I suppose that makes me a promising beginner-level poster. I'm working in CS5.
I need to make a simple Flash-based sound player for a website for a newly-released novel (http://www.bearriverbooks.com/index.html). I want the user to click on what appears to be an icon (or image), which kicks open a simple controller and starts playing a sound file (a radio interview, which I will probably export using Flash's voice compression). Nothing fancy. Just want the visitor to hear the sound and be able to apply simple controls (stop/start/rewind/volume).
I can learn ActionScript, I suppose, since I used to dream in Lingo, but my life would be a lot simpler if I could just publish a controller without having to roll my own. I'd like to think there's a magic button somewhere that can do this, but I haven't found it yet.
I am new to flash and trying to make a simple flash website video intro in Flash CS5 Pro.I have a flv viedo on the stage, under an image with a trasnparent center.I have the video on the bottom layer, the overlay image on the middle layer, and the top layer is my AS layer (AS3).
The video is currently autoplaying when i export.All i want is for it to open my website in the same window as the intro played when the video ends.I dont need a "skip intro button" or anything.I just want it to play the intro when you go to my site, and then bring up the index page of my site after it plays.
I wanted to create a simple flash contact form for my flash website. I went through Lee's tutorial on how to create the contact form and PHP file to go with it. I've uploaded everything to my server and tested the form. My flash form consists of Name, Subject, Message, and Email fields. When I receive the email all that comes through is this with none of the actual message that was written IN the contact form:
Name: Subject: Message: Email: The 'From' field is also blank. I don't know if my problem is with flash, my PHP code, or with my server. Can someone take a look at this and tell me what's wrong? I can't seem to find any errors from Lee's tutorial with my code or labeling.
[Code]...
I have a pretty simple flash banner(using flash cs4) that I want ot make clickable.I am assuming I have everything correct, because when I "test movie", everything works as expected.Now comes the odd part. When I export movie, the clickable portion no longer works. Along the same lines as soon as I save the .fla file, the "test movie" no longer works.I have recreated this about 10 times now and everytime the same result. now I have it open on my computer, because as soon as I save it will no longer work.
My actionscript(3.0) code is as follows:
link_btn1.addEventListener(MouseEvent.CLICK, sgurl);
function sgurl(Event:MouseEvent):void;
{[code].....
and yes I have a button with an instance name of link_btn1
I have Macromedia flash 8.0 and i want to create a simple ticker which contains Text that scrolls right to left,over and over.
View 3 RepliesI have a flash video on the first frame of my project. Once the video is finished, it is set to go to the 2nd frame and stop. That part works great.I'd like to set it up to send an email notification on that 2nd frame. Don't worry, this isn't a low-brow type of thing. (The presentation is going to one person and the email will go to him as well.) Anyway, I've created a .php file that will automatically fire the email off when the page is loaded, but I'd like to be able to execute that .php file from my flash presentation. I don't want to launch a pop-up window or anything if I don't have to.
View 4 RepliesSo I am trying to get better at putting all my code within one action layer and there is a bit of button code that seems to be confusing me.
Whenever I program a button I use the following code:
PHP Code:
on (press){
} on (release, releaseOutside ) {
}
Now I know programming the on(press) command is done like this:
PHP Code:
btnName.onPress = function() {
}
However I am having a hard time with the on (release, releaseOutside ) code. The only way I have been able to do it is like this:
PHP Code:
btnName.onRelease = function() {
} btnName.onReleaseOutside= function() {
}
My question is, is there any way to combine the two onRelease commands?
I'd like to make a simple button that pops out (nicely animated) on mouseover to about 300% it's original size. You can se the button I want to animate here - it's those little buttons some of which are shaded. I want to make them more visible...
View 1 Replieswith the FLVPlayback component i can get a nice looking basic player for .flv files easily..is there some way to set up the same functions to create a very simple mp3 player with flash?
View 1 RepliesIs it possibe to insert into GSP simple flash movie?
I tried this way:
<object type="application/x-shockwave-flash" data="${resource(dir:'flash',file:'movie.swf')}" width="400" height="400">
<param name="movie" value="${resource(dir:'flash',file:'movie.swf')}" />
[Code].....
So I'm trying to learn to create a public class, and this is what is in my class file:
class com.RCN.Menu.Menu{
public var title:String;
public var menuItems:Array;
[code]....
and in a seperate SWF I use the code:
import com.RCN.Menu.Menu;
var Accountability:Menu = createMenu("hello",[a,b,c,d]);
trace(Accountability);
yet Accountability traces as undefined?
there's a simple thing in papervision I can't do , I want to have a simple button on my swf like we have in flash , just a 2d square which is on screen and you can click on it and have some action
View 1 RepliesMy Flash animation using 100% CPU. I don't know why? It is a simple animation i.e. done in an ecard at: Valentine Ecard. I have not used any script in it nor it has too much animation in it. The frame rate is 12.
View 0 RepliesThis used to be so easy to do back in the day, but not any more. I'm trying to create a reeaaally simple button in Flash CS3 that on release goes to and plays the next frame.[code]All the button does is starts an mp3 that's embedded in the file. I've made tons of these in the past, but now with CS3 I'm finding this task very difficult. The code is in the button instance, but I'm getting the following error when I publish.
View 1 RepliesWhat I'm trying to do is keep track of responses to several questions. In other words what I have is sort of like a quiz. Each question has a yes or no button and what I'd like to do is update a number in, say, an xml file in order to keep track of how many people clicked "Yes" and "No" and "Total". Any idea if there are any relatively simple tutorials that might explain how to do this? After the Flash file has been up a while, we want to see how a large number of people answered the questions and put up a chart.
I have a good bit of experience accessing xml files to drive a Flash file, but I haven't yet gone the other way where the Flash file communicates with an xml file and updates the xml itself. As always I will be forever grateful for any suggestions on how to learn this. I'm not finding much "out there" just looking on my own.
I've been learning actionscript 3 for the past few days and really enjoying it. However I've spent hours trying to find out how to do something very simple in HTML. Say I have a form like this...
<form id="form1" name="form1" method="post" action="http://website.com/form">
<input type="text" name="your-name" id="your-name" />
<input type="text" name="email" id="email" />
<input type="submit" name="submit" id="submit" value="Submit" />
</form>
How do I make it in Actionscript 3?
I am trying to load simple html text from xml using AS3 in flash. Here is my sample xml tag.[code]...
View 7 RepliesI'm sort of new to Flash, have been using it for ages but just to animate, i haven't done any programming or interactive stuff for years, so i feel new to it again!Creating a very simple platform.Movie clip of the character (instance name z_1)- runs button - when pressed makes z_1 invisible and loads another movieclip of him firing a weapon (z_fire). (also makes ground stop moving- basically game is a static running animation, over a moving ground, if that makes sense)This all works fine, i even figured how to make the score increase!After the firing animation is finished (there is a stop on the movieclip) i want the original running animation to be visible again and for the ground etc to play again. The firing animation is only 12 frames long so i imagine i need to tell the button to resume normal service on the stage after that time period![code]It's probably completely wrong but it works, i just need to know the extra code to make the original animations start back again after z_fire has played.
View 2 RepliesI'm pretty new to Flash CS4 Professional and ActionScript 3.0.
1. A simple stopwatch (like this one: [URL]) that starts as soon as the swf Flash file opens.
2. TV static that fills the stage, with a shape (say a red star) on top of it. An example of TV static is here: [URL] - it's in AS2.0 though, using Flash 8.
I am fairly new to Flash and I am creating a simple Flash login programme in Flash. If I type in the correct password or even if I type in the wrong password it always goes to frame 3 which is "Login Failed! Username or password was wrong". I have attached .fla file. Note I created in Macromedia Flash 8.
View 8 RepliesI am trying to develop a simple product catalog using flash and xml. The xml file only has a list of catagories and under each a few products. I have a combobox wich list the catagories and another which
list the products in that catagory. Each works fine but the products don't change according to the catagory that is selected in the catagory combobox. How do I change this. I use xmlConnector to bind the data to both.
2. When I browse through the products using a loader component sometimes there is flicker and you can see the image before it is resized. This is realy annoying. Should I use a movieclip loader? The images are not all the same size.
I go to create a simple navigation with a set of buttons in Flash. For some reason when I go to type the name of the buttons my font is messed up and not smooth.... I am not sure if this is a setting or what, totally confused.[code]...
View 1 Replies