ActionScript 3.0 :: Gravitational Pull And Shape Morphs
Jan 13, 2009
I am making an interactive diagram showing how the moon creates tides. Imagine a circle in the center (earth) and a smaller circle orbiting around it (moon). Currently, the user can click on the moon and drag it around the earth in a circular orbit. That part works great. How can I manipulate a circular shape (water on earth) depending on the position of the moon? Here's a link to the basics of how tides work, and what the shape of the water should roughly be. [URL].
View 4 Replies
Similar Posts:
Aug 9, 2010
Code:
package {
import flash.display.MovieClip;
import flash.events.TimerEvent;
import flash.utils.Timer;
public class Player extends MovieClip {
spawn();
[Code] .....
I'm trying to simulate gravitational acceleration by constructing a function that will subtract from the Player object's yVelocity every half a second. For now, I'm getting 1180: Call to a possibly undefined function spawn but I'm sure there are other things wrong with the code.
View 2 Replies
Nov 30, 2009
ActionScript Code:
package {
import flash.display.MovieClip;
public class Base extends MovieClip {
public var baseHP:int = 50;
var newRect:Shape = new Shape();
1046: Type was not found or was not a compile-time constant: Shape. 1180: Call to a possibly undefined method Shape. What does it mean by "undefined method"? I am somewhat of a newby, so sorry if there are any stupid errors
View 1 Replies
Jun 22, 2010
Whenever I add shape hints to a shape tween the shape disappears in the between frames. I am using CS5 on Vista. I using files from [URL]to practice.
View 2 Replies
Oct 11, 2011
need to draw the shape of a existing movieclip which is irregular shape.
View 2 Replies
Oct 11, 2011
need to draw the shape of a existing movieclip which is irregular shape.
View 1 Replies
Jul 9, 2009
Id like to know if there is a way to do a shape hitTest.Not as the normal hitTest would do, but shape colliding another shape, not the rectangleof a movieclip.It can be in a movieclip.
View 23 Replies
Oct 19, 2010
using the shape tool you can draw basic shapesthen using the subselection tool you can re-shape them by relocating certain points
What i want to do is create a tween whereby one of the points is movedthe problem is you have to convert to a symbol first and after you have done that you cant change the shapes shape.so how do i go about using a motion tween to change the shape of a shape?
View 1 Replies
Oct 18, 2009
I have listbox which load the names from the xml file now i want that when i select the name or item in the list and click on get button it opens the corresponding url (which is in the xml file)...
however it doesnt load the page instead shows textbox and problem loading page error.
View 6 Replies
Sep 14, 2009
I'm trying to pull a URL from an xml file, but have come up against a problem that I cannot solve.
The XML looks like this:
Code:
<photos>
−
<photo>
[Code].....
View 1 Replies
Apr 6, 2010
I need to pull the XML below into flash.
I need the <name> , and the <coupon><title> and<link> </coupon>
Example display in flash would be.... Apple Bees Trivia Tuesday & BARGO Wednesday Coupon link here
Here is the sample XML...
<merchant>
<logo>Logo link</logo>
<name>Apple Bees</name>
[Code]....
View 6 Replies
Apr 22, 2010
I'm trying to create a pull down menu. Not one that drops down when rolled over but one that drops down when clicked and stays down until an item is selected. Once an item is selected or the menu is clicked out of it retracks again.
My strategy is to create a movie clip for the initial menu that when clicked jumps to another movie clip where ther menu is extracted and houses movie clip buttons that hightlight when rolled over and when clicked redirect to another movie clip related to the button that was selected.
is this the proper way to do this? And second: can you offer some direction for the action script?
View 1 Replies
Jan 7, 2011
EDIT: New problem, post #5 Say I have a flash website made, and to allow for minor information changes to be easily made by someone without flash, they can simply open, edit, and reupload to the webserver a text file that contains that page's info.So, how can I have flash pull text from a file, and always do that every time it's ran (ie, not have to republish a new swf)?
View 4 Replies
May 27, 2009
I think that you can do this using html but if you have a PDF in your root directory will Flash be able to link to bookmarked pages in that document?
View 2 Replies
May 18, 2011
I have a script that always returns iframe HTML back to flash. I was looking to get help on how to build some RegEx code to only find the URL. I would only like this substring so I can use it in another script.Here is the iframe code the I want to search for and return the substring:
HTML Code:
<iframe SCROLLING="no" id="myFr" style="width:660px; height:500px; border:0px; margin:0px; padding:0px; overflow:hidden" src="http://www.blabla.net/sdsdsd/?ut=wecsdsd&lang=EN"></iframe>
This is then best O could come up with but unfortunately.... it returns src=" too.
ActionScript Code:
private var _findTheURL:RegExp = /src=u0022(.*)u0022/i;
View 2 Replies
Aug 7, 2009
In CS4, using AS 2.0, I'm using loadMovie to pull in different ads (swfs).This is working great, but one swf is not getting along. It was coded in AS 3.0, and some content beneath masks is not displaying correctly.I obtained the original fla file, but still can't come up with a solution.I tried setting it to 2.0, but then none of the AS works.I don't know Actionscript very well so rewriting the ad's functions is not an option.convert the swf I'm trying to load in? Or an alternative to loadMovie in 2.0?
View 3 Replies
Sep 11, 2009
I am using flash CS4, AS2 and have had a client request for something that I'm not sure is possible.
I have created a calculator that calculates the cost savings that my client offers their customers. There are many options available in the calculator and it is quite in depth. At one point there is a pull down menu where the site visitor can choose their product, then enter the amount they pay for it currently. If their product is not listed, the site visitor can choose "other" from the list.
Is it possible that when the client selects "other", the text IN the pull down component for that option could be dynamic, so that the site visitor can enter the name of their product? The product they enter does not need to be submitted anywhere, nor does it need to remain upon that visitor's next visit. It simply needs to be there for the duration of their current session, to help the client keep track of what product they are comparing.
View 1 Replies
Feb 23, 2010
I just started making some simple banners for web sites. I got a new one to do this morning, and I was asked to make a button that says drag/pull here. as you drag/pull down, it reveals the layer below it. Also, as the button reaches halfway, it needs to go all the way automatically as well, so the users don't have to drag all the way down themselves. Is that something I need to do in actionscript
View 3 Replies
Nov 2, 2011
how to go about searching for this since I don't know the terms used for it. I am trying to make an interface to use on a website that would have to pull up images and text with no preloading. Think of an online encyclopedia; you put in a word and it pulls up the object/animal/etc with a description. I am looking at needing to pull up thousands of different things; hence the no preloading.
View 2 Replies
Jan 23, 2009
I'm using Flash CS4 as my IDE with Actionscript 3 and Flash Player 10. I'm working on a bigger project but the area I'm struggling in is dynamically pulling an image from the flash library (already loaded). I've been finding the same answers to my question all over and they seem to keep producing the same error so apparently I'm just not getting some little detail. I have an image loaded in the library called test1.jpg. I've right clicked on it and selected 'Export for ActionScript' and 'Export in frame 1'. The class is 'MyMc' and the Base class is 'flash.display.BitmapData'. My code is attached.
and it produces the following errors:
quote:
1136: Incorrect number of arguments. Expected 2. 1067: Implicit coercion of a value of type MyMc to an unrelated type flash.display:DisplayObject.
View 11 Replies
Oct 5, 2009
How could I get the XML data in to a text box?[code]...
View 8 Replies
Oct 21, 2009
1. In mysql db, I created a field called "logo" and made it a 'blob'. Using the BROWSE button in the mysql db I uploaded a 10KB logo. Is that correct? will I be able to pull the 10KB logo from PHP?
2. WHy isn't the image been comming in to flash? Will the code marked in red do it successfully?
[Code]....
3. 'ruth.jpg' is my logo name. Is my code correct in pulling it? echo '<img src="'.$line["logo"].'" alt="ruth" />';
View 34 Replies
Mar 23, 2010
I know how to pull data from a row of an mysql db. But how do I pull the data on the same COLUMN in a MYSQL db? What do I need to send to the server side script?
E.g. The mysql holds 2 field names "COMPANY" and "CONTACT PERSON". How do I pull all the COMPANY names only?
View 3 Replies
Aug 15, 2011
What I'm trying to do is to get flash to pull the actionscript from an external as file.[code]
View 2 Replies
Aug 19, 2010
Currently in Flash I am trying to pull in a value based on the querystring. Example..
[Code]...
This works in the main flash actionscript, but I need the querystring in a class constructor that I created. How can I pass the querystring to a separated out actionscript file?
View 2 Replies
Oct 13, 2010
im trying to pull .swf files from MySQL by using PHP, ive set everything in the database up with an ID and licked it properly. Im not sure if the 'type' has to be anything special, right now its just a 'VARCHAR' and when altering the javascript part of it that that flash automatically generated-- in the i tried to echo it out by putting it in the value like
< param name="movie" value="<?php echo $row['video_path']; ?>" />
View 1 Replies
Jul 10, 2009
I am currently designing a set of actionscript charts for my company's website. For the set of charts I have set up right now I'm reading all the data from FlashVars, but as you could guess that's not a very good format for charts...
I'd prefer to use a JSON array of values,
now my question is: Where should I go to start learning about reading from JSON is AS2? I'll hit the books, of course, but this forum is always good when I need to get some advice to dive right in to an urgent project
View 1 Replies
Dec 14, 2010
How do I pull in flashvars in flash. I have a html form with variables with 5 fields.
View 2 Replies
Mar 28, 2009
I am running into a frustrating problem at the moment, I want to pull a node from the XML and it has a an attribute of "class", but it automatically gets highlighted to blue because flash thinks its a class.[code]...
View 4 Replies
Apr 23, 2010
I've got a section in my code where I am trying to pull up a particular xml node based on an id value I have. When I try to pull it up via the method shown the code stops executing at that point. In other words, the "got here" is traced but neither of the two lines after it or any code below that point in the function seem to get executed. If I take that line out the code executes just fine. I'm using this same xml object in many places and the xml data is fine it is just when I try to use this syntax that it gets confused.
I'm also a bit confused as to why the code just stops. I realize that flash doesn't generally display errors at runtime, but if it doesn't show up as a compile error or warning what is the best way to avoid the code hang up? Also is this the correct way to access the node? I actually am trying to retrieve the team attribute on the same node with an id that I'm using in the xml search query. Should playXML.players.(@id == '18431').@team get me that value? It seems to cause the same behavior any time I try to use that syntax even with other attributes from the player nodes and if I use something like playXML.players.@id it returns all the nodes id attributes.
Code: Select alltrace("got here");
trace(playXML.players.(@id == '18431'));
trace("also got here");
Here is the xml:
Code: Select all<?xml version="1.0" encoding="utf-8"?>
<play>
<players>
<player id="18431" pos="LOT" realpos="OT" name="TT1 Tackle 4" team="1509" number=""/>
[code]....
Edit:I dropped a try/catch statement around this block and that solves the code execution issue but I still can't access the node I want with a given id using the playXML.players.(@id == '18431') style syntax.
View 1 Replies