flash-cs5

multiple swf communication using as3

╄→гoц情女王★ 提交于 2019-12-13 06:23:53
问题 My need : If I playing one swf, the other swfs should pause if it was playing. I can able to communicate two swfs using javascript(both swfs are different name). But come to multiple swfs, I don't know how to differentiate the swfs beacause all are same name. I have embed 3 swf files in my html page using the following script. swfobject.embedSWF('http://webserver/aruldass/versemusic/modules/mod_playerjr/player-songs.swf', 'jwplayer1', '280', '230', '9', false, flashvars, params, attributes);

flash Actionscript 3 and php image upload

我的未来我决定 提交于 2019-12-13 04:39:50
问题 recently i am going through a project of badge-builder with action-script and flash.now i need some help for image uploading from the flash interface to the server and showing it back in the flash interface, the back-end programing language is php and i am using action-scrip 3 and flash cs5 can anyone please give me a right direction how to achieve this job. Thank you very much. 回答1: Here is the AS3 code, it's just some quick and dirty timeline code: var fileRef:FileReference = new

how can i continuously decrease a number in as3

坚强是说给别人听的谎言 提交于 2019-12-13 04:24:43
问题 I'm planning to make a tug of war game and I have difficulty in this part... The game is the user have to rapidly click the button to win the game. I made it in numbers 1 click = +1 and at the same time with or without clicking the value of controller decreases by 0.5 thanks for the help var controller = 10; blocker.visible = false; function decreasing(){ controller = controller - 0.5; } decreasing(); pushBtn.addEventListener(MouseEvent.CLICK, theGame); function theGame (e:MouseEvent): void {

Flash Animations Skipping, Uncalled Audio Playing

ε祈祈猫儿з 提交于 2019-12-13 03:37:47
问题 I am totally baffled at the moment. I have a Flash CS5/AS3 project, a large Flash game, that uses a LOT of animations. I've divided these up into a MovieClip on a Scene, with corresponding actionscripts and events, for the "exploring screens", and another MovieClip on a Scene for one of the challenges, and another such set for another challenge. This method allows me to put only the animations that section needs into the corresponding MovieClip, and link the events of the scene to its

How to round number in actionscript

半世苍凉 提交于 2019-12-13 02:33:51
问题 how can I round number to up down or to the 0.5 using action script 3.0 for example 4.9 will be rounded to 5 4.7 will be rounded to 4.5 2.4 will be rounded to 2.5 2.3 will be rounded to 2 thank you. 回答1: How about Math.round(2 * number_here) / 2 回答2: z = Math.floor(n); p = n-z; if(p<0.25) ans=z; else if(p>0.75) ans=z+1; else ans=z+0.5; 来源: https://stackoverflow.com/questions/6889312/how-to-round-number-in-actionscript

ArgumentError: Error #1063

陌路散爱 提交于 2019-12-12 23:16:00
问题 I'm getting the following error after testing my Flash game's code: ArgumentError: Error #1063: Argument count mismatch on RestartButton(). Expected 1, got 0. at flash.display::Sprite/constructChildren() at flash.display::Sprite() at flash.display::MovieClip() at Document() RestartButton is the class of a MovieClip that has already been added to the stage. Here is the section of my Document Class where the error is located in: package { import flash.events.*; import flash.display.*; import

Flash CS5 reference a display object from a class other than the document class

跟風遠走 提交于 2019-12-12 21:15:17
问题 Using Flash CS5 Professional I have created a symbol, dragged it onto the stage, and given it an instance name of GreenLight1. If I want to make this visible from the document class, I can simply do the GreenLight1.visible=true; and poof it's good to go when I test the file. As long as I stay in the document class I am good to go, but now I'm trying to move to another class and hitting ALL kinds of trouble just trying to get Flash to allow me to access this simple object. All I am looking to

Load images to a TileList from Mysql using PHP and XML on Flash CS5

佐手、 提交于 2019-12-12 18:22:17
问题 I have a mysql database with a table containing PATH's to images. I want to load al the images to a TileList. Now i have this in PHP: <?PHP mysql_connect("localhost", "root", "root"); mysql_select_db("prototipo"); $result = mysql_query("select entretenimiento_id, e_nombre, e_imagen from entretenimiento"); echo "<?xml version=\"1.0\" ?><entretenimiento>"; while($row = mysql_fetch_assoc($result)) { echo "<e_nombre>" . $row["e_nombre"] . "</e_nombre>"; echo "<e_imagen>" . $row["e_imagen"] . "</e

How do I restart flash application with actionscript 3

梦想的初衷 提交于 2019-12-12 05:59:14
问题 yeah, I need to restart my application, my actioscript 3 code or at least remove all the content in stage to upload the beginning. This is not movie, so playing with gotoandplays is not an option. Thanks! 回答1: Best practice would be for each object that carries a strong listener to also listen for the Event.REMOVED_FROM_STAGE event, and destroy all its listeners and handle the properties you wish to save. while(numChildren) removeChildAt(0); Called from the root (or main timeline) will remove

Loader Complete event does not work with browser (AS3)

北城余情 提交于 2019-12-12 05:07:44
问题 Im trying to load an image in a movie clip and change its size as follow: var loader:Loader = new Loader(); public function setProfilePicture(url:String){ loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplte); loader.load(new URLRequest(url)); addChild(loader); } protected function onComplte(event:Event):void { EventDispatcher(event.target).removeEventListener(event.type, arguments.callee); var image:DisplayObject = (event.target as LoaderInfo).content; image.width = 132; image