ActionScript 3.0 :: Graph A Simple Function?

Nov 17, 2011

I have been searching the net for a tutorial how to graph functions. I found one from Barbara Kaskosz, very detailed, and too much scripting. Too much for me. Is there another way or place to learn, or I am doomed, and have to face the music and study her stuff. All I want, is to be able to graph a simple function.

View 4 Replies


Similar Posts:


ActionScript 3.0 :: Simple Bar Graph - Populating Popup Box?

Mar 22, 2010

I'm fairly new to Actionscript 3, I'm creating a simple bar graph. There are 5 movie clips relating to years {mcYear0, mcYear1, mcYear2, mcYear3, and mcYear4} then there are 6 bars in each year representing animal population (all the animal movieclips nested in the years are named the same from year to year, so mcFrogs in mcYear1 is also mcFrogs in mcYear2). When you roll over an animal, I want a box to pop up and populate that animal's population over the years. I'm not worried about populating the box but for some reason my code to make the box pop up on the animals is only working on the last year (mcYear4).

Here is my code:
mcYear0.addEventListener(Event.ENTER_FRAME, HOver);
mcYear1.addEventListener(Event.ENTER_FRAME, HOver);
mcYear2.addEventListener(Event.ENTER_FRAME, HOver);
mcYear3.addEventListener(Event.ENTER_FRAME, HOver);
mcYear4.addEventListener(Event.ENTER_FRAME, HOver);
function HOver(e:Event) {
[Code] .....

View 6 Replies

Flex :: Graph Data Provider Has Values But Graph Is Not Plotting

Aug 22, 2011

In the below code the traced values are correct its there in the chart data provder but the

input graph is not plotting.there is no error in this code.Can anyone solve it?

function fnctn(evt:Event)
{
var tp:int = bulb1 + bulb2 + bulb3 + bulb4;

[Code].....

View 1 Replies

ActionScript 2.0 :: Equation Generate To Graph \ Show A Slope Graph?

Jan 26, 2010

School Project with the following actionscript in Flash 8, I want to show a slope graph? What code to add to make slope graph work?

/*var orig_x:Number;
var orig_y:Number;
orig_x = (plane_mc._x)+(plane_mc._width/2);

[code].....

View 0 Replies

ActionScript 2.0 :: Create A Graph Of An Exponential Function For Interest In A Bank Account?

Sep 24, 2009

I'm trying to create a graph of an exponential function for interest in a bank account or something. Here's the code I have so far:

Code:
var i:Number=0;
var j:Number=0;
this.createEmptyMovieClip(graph, 1);

[code]....

View 2 Replies

ActionScript 3.0 :: Mathematical Function That Will Return A Number Based On A Graph That Starts At 0?

Sep 23, 2009

I'm completely useless at maths due to paying no attention whatsoever to it in school when I was a kid so forgive my lack of knowledge of basic terminology.I need a mathematical function that will return a number based on a graph that starts at 0, curves to (eg.) 100 and then curves back down to 0. I have a feeling it has something to do with Math.sin or somesuch wizardry but am not sure.Basically, I want to feed it a number between (eg.) 0 - 60 and for it to return a number on aforementioned curve. The purpose of this is to be applied as a lateral force on some basic ball physics. The idea of the 'curve' is that (depending on timing of the shot) there will be a 'sweetspot' in the timing.

View 5 Replies

ActionScript 2.0 :: Simple Fade In And Out Function?

Oct 18, 2007

function that I can re-use and pass movie clips to and cause mc's to fade in and out?...such as

Code:
function fadeMeIn(fadewhat,fadespeed) {
if (fadewhat < 100) {

[code]......

View 6 Replies

ActionScript 3.0 :: Simple Pad String Function?

May 29, 2011

I thought I would share a simple pad string function I created briefly... I know that there may be other similar functions already out there but I decided to make it anyway. It's basically a ripped off as3 version of the str_pad() php function.

Examples:
trace(stringUtils.stringPadLeft('7',4,'0','left')) ; // Traces 0007
trace(utils.stringPadLeft('whatever',2,'~','left') ); // Traces whatever
trace(utils.stringPadLeft('hi',20,'-','left')); //Trace ------------------hi

[code]....

View 2 Replies

ActionScript 3.0 :: Simple Error #1006: Value Is Not A Function

Nov 18, 2011

Well I'm so close to understanding why this doesn't work. First here is the code:

Code:
import flash.display.MovieClip;
stage.addEventListener(Event.ENTER_FRAME,updateGame);
var gameZoneContainer:MovieClip = new MovieClip();
stage.addChild(gameZoneContainer);

[Code]......

If I place "fish_mc" in place of "Items[createItemCounter]", the fish animates but the cookie doesn't. If I put "cookie_mc" instead of "Items[createItemCounter]", the cookie animates but the fish doesn't.

View 2 Replies

ActionScript 3.0 :: Simple While Loop Doesnt Function?

Oct 29, 2009

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]...

View 4 Replies

ActionScript 3.0 :: Function Only Works In Simple App But Not In Complex One

Mar 11, 2010

I made a simple app with 2 movieclip symbols containing photos of a butterfly with this actionscript:

import fl.transitions.Tween;
import fl.transitions.easing.*;
butterfly_mc.addEventListener(MouseEvent.CLICK, bigPic);
butterflyHand_mc.addEventListener(MouseEvent.CLICK, bigPic);
function bigPic(e:MouseEvent):void{ new Tween(e.currentTarget,"scaleX",Strong.easeOut, e.currentTarget.scaleX, (e.currentTarget.scaleX * 1.4), 4, false);
[Code] .....

I don't get any error messages but when I click on case1_mc.c1_mc.case1a_mc or case1_mc.c1_mc.case1b_mc nothing happens.

View 11 Replies

ActionScript 2.0 :: Simple GetURL Function Not Working

Sep 8, 2009

I'm modifying an mp3 player by flabell, and try to get some buttons to work. However, I can't seem to get the getURL to work, even though it works in other parts of the script. This is my code:
mc.rate1.onRelease = function() {
trace(this.ID);
getURL("[URL]","_blank");
};

The trace goes through fine. Here is the code that works:
Code:
private function downloadRelease(mc : MovieClip) : Void {
var title : String = mc._name;
var index : Number = Number(title.substring(title.lastIndexOf("n")+1,title.length));
getURL(songsSource[index], Main.getInstance().mcAlbums.linksTarget);
}
I'm on a mac with firefox.

View 3 Replies

ActionScript 2.0 :: Simple Function And SetInterval Not Working?

Mar 21, 2006

i've tried searching the forums and fighting with this way of fading the movie clip in and out. The movie clip has an instance name of "box", my brother also can't figure it out.

Code:
var fadeChecker:Boolean = true;
function flicker():Void{
if(box._alpha >= 100){[code].....

View 5 Replies

ActionScript 2.0 :: Creating A Simple Mc Rollover Function?

Aug 28, 2006

basically i have a mc that i want to use as a button.

frame 1 is the initial state with a stop() action on it. frame 10 is the full rolled over state, also with a stop() action on it, and frame 20 matches frame 1.

so basically i want the button to animate frame 1-10 if they rollover, and animate frame 11-20 when they roll off. i would also like it to detect the current frame, so like if the user rolls off and rolls back on at frame 15, it will play backwards to the mouseover state (frame 10).

View 3 Replies

ActionScript 2.0 :: Using A Simple Function To Display A Button?

May 9, 2007

create a button, create a movie clip with two frames.

place a button instance in frame 2.

place a mc instance on the stage.

create another instance of the button to change the movie clip instance to frame two.

the button in the movie clip is pressed and executes a function.

here's the code

Code:
// create the button to show the button!
_root.button_instance_2.onPress = function() {
buttonClick1();

[Code].....

if, however, i use the same code on a movie clip that has only one frame it will work fine. do i need to tell the function to target the button instance any more specifically than that?

View 2 Replies

ActionScript 2.0 :: Simple Call Function With MouseDown?

Oct 18, 2004

basically I have an MC menu that I want to move to the left when you click and hold on another MC called leftButton, here's what I have.In main timeline:

Code:
menu.moveLeft = function() {
this._x -= 4;

[code]......

View 10 Replies

ActionScript 3.0 :: Creating A Simple Running Index Within This Function?

Jul 6, 2010

I am trying to index a series of movie clips with their own unique index number for accessing through AS3. The example below is what I would like to achieve, when a user clicks on Topic1, I can trace back the index of 1, when a user clicks on Topic2, I can trace back an index of 6:

Topic1 (Index = 1)
|
|-subtopic1 (Index = 2)

[code].....

View 1 Replies

ActionScript 2.0 :: Simple NetStream Put The Exact Same Code Within A Function

Jul 17, 2009

This seems like a simple problem but I can't seem to figure it out. If I use this standard code from the reference:

ActionScript Code:
var nc:NetConnection = new NetConnection();
nc.connect("rtmp://myserver/");
var stream_ns:NetStream = new NetStream(nc);
my_video.attachVideo(stream_ns);
stream_ns.play("myflv");

the video streams fine, but if I put the exact same code within a function like this:

[Code]....

View 9 Replies

ActionScript 3.0 :: Clear Function In Simple Paint Program?

Mar 26, 2009

i have been messing around with a script found for a simple paint program. After adapting the code a bit for my own needs and getting an understanding of how it works I had a couple questions.first of all I need to create a button that will clear the stage (or more specifically lvg1)second what does e reference in lines similar to

Code:
e.target.graphics.lineTo(e.localX,e.localY);

Code:
import flash.events.MouseEvent;
import flash.geom.Matrix;[code].........

View 2 Replies

ActionScript 3.0 :: Toggle Simple Buttons, Call Same Function?

Nov 23, 2010

I made 5 buttons on the stage. When these buttons are clicked I want to show AND hide items related to the buttons. Is there a way to "toggle" a simple button so that when it is cliked the first time it shows the object, clicked a second time it hides the object using the same function? In other words, is there a property of a simple button that changes state?

[Code]...

View 1 Replies

ActionScript 2.0 :: Simple TweenLite OnComplete - Function Not Called?

Apr 4, 2012

I am trying to combine TweenLite with some of my own functions. Now for testing I have this:
Code:
function playGeb(indG):Void {
if (indG < 8) {
clearInterval(restartG);
gebArr[indG].play();
[Code] .....
but after the arrow is in place the function hello() isn't been called.
I already tried adding, onCompleteScope:this
TweenLite.to(arrow_mc, 0.3 , {_x:118,_y:30,onComplete:hello , onCompleteScope:this});

View 1 Replies

ActionScript 1/2 :: Buttons Function - Put A Simple Picture Show An A Webpage

Jun 25, 2009

i am new to this and i need to put a simple picture show an a web page, i need it to work like a powerpoint presentation but also needs buttons that you can roll your mouse over and have the slide that is associated with it come back up and also need to be able to click it to bring it back and stay on the screen for a longer period of time.

View 5 Replies

Javascript :: Call A Simple Function(); When Click On A Button In A .swf File?

Feb 23, 2012

I click on a button (or any object where I can write Action Script) and It should call a javascript function which I wrote in my functions.js

View 1 Replies

ActionScript 2.0 :: Simple Function - Menu Will Move Right Across The Screen If The Variable Is True?

Jun 25, 2005

just wondering why this isn't working :

Code:
var nav:Boolean = true;
var element:String = "home"; [code]....

Its so that a menu will move right across the screen if the variable is true, and if its false, it'll move left back to its original position.... i achieved this using a motion tween and telling the mc to go to the frame and play, but that didn't work in the end because if the menu bar was on the left side, and it was told to move to the left, then it would disappear,and appear on the other side.... so in other words it screwed up

View 10 Replies

Actionscript 3.0 :: Get An "if Statement" To Run A Simple Function?

Jul 8, 2009

I am trying to get an "if statement" to run a simple function.

View 5 Replies

Flash :: Post A Swf Via Graph Api Using PHP SDK?

Aug 29, 2011

Flash - How do I post a swf via graph api using PHP SDK

View 1 Replies

IDE :: How To Loop Drawing Sin Graph

Apr 23, 2009

I create a movieClip is "sin_mc".In this MovieClip,I drawing a sin graph in a period.I want to loop sin Graph 4 times but i don't know actionscrip.

View 1 Replies

ActionScript 3.0 :: Using Facebook Flash Graph Api?

Oct 9, 2010

I have som porblem with Facebook Flash graph API I am receiving request, but realy when I check my wall in facebook FacebookDesktop.api not adds Like or unLike

private function likeClickHandler(event:MouseEvent):void{                              handleLikeClick()          }                                        protected function populateLikeCount():void {               if (intData.user_likes) {                    likeBtn.label = 'Unlike';               } else {                    likeBtn.label = 'Like';               }               likesCount.text =

[code]....

View 1 Replies

Professional :: Making An Interactive Bar Graph?

Apr 4, 2012

I want to make an interactive gizmo to explore 20%. so I want a little slider and a red (20%) and a green (80%) bar so that when I slide the slider to different numbers - lets say between 1 and 100 I get a graphical representation of 20% of the number selected as well as the actual numbers? so at 50  red column is 10 green is 40. at 100 red is 20 and green is 80?
 
I could just have a MC with different frames and select a few numbers to highlight and fake it.

View 3 Replies

Flash - Tag Photo Graph API / REST API?

Feb 3, 2011

I'm doing a FB app with the Graph API in Flash. I've got everything working which consists in uploading some images created by the user in the app. The only part that I'm missing is how to tag these photos as with the Graph API it is not possible.

So I was wondering if it's possible to call a method of the REST API even though I'm using the Graph API.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved