ActionScript 3.0 :: How To Make Objet Work
Feb 24, 2011Can you help me figure this out how to make the objet work? It should flip when it moves from Right to Left.
View 2 RepliesCan you help me figure this out how to make the objet work? It should flip when it moves from Right to Left.
View 2 RepliesI have a button object that I need to scale to align with the variable width of an array of images.However, when I set the width in code, the button does not actually become that width. Tracing out the width gives me the correct value, but on screen.. it's off.
I've proved it to myself by scaling the same button object manually in the properties pane and visually comparing. Both of the buttons below have a width of 410.
Code:
navigatorDown_btn.width = 410;
navigatorDown_btn.x = (stage.stageWidth/2)-(navigatorDown_btn.width/2);
trace(navigatorDown_btn.width); // output: 410
* I have a flash project called contact
* The document class is ContactClass
I am trying to make a sprite button with graphics and can't make it work. I have successfully added text fields so I know the path is correct. I suspected my code was correct and confirmed it should be, after reading several tutorials showing the process for creating sprite buttons with graphics. Anyway, I imported nearly every class on Earth, but certainly everything which needs to be. Stage is gray and 800x600.The graphics code by itself with appear, but not when linked to the sprite. Also, the sprite won't appear no matter what. Another interesting piece of the puzzle: nothing will trace, not even objects such as textfields which actually appear and function on the stage when I text the code.
public class ContactClass extends Sprite {
public function ContactClass() {
var home_btn:Sprite = new Sprite();[code]....
I am a new comer to flash and I have been teaching myself actionscript 2.0 and I am now trying to move to action script 3.0 this seems a dumb question but for the life of me i can't figure out how to make my buttons work.i am trying to have the user click at button that connects to a movie clips and plays the movie, the movie stops then goes to the next frame of animation.
View 1 RepliesI have been going nuts all day trying to figure out why my 'drag and drop onto a target' movie doesn't work. I have a movie clip to drag onto another movie clip which is the target.when the first clip is dragged onto the target clip i want the target clip to gotoandplay(2);
the clicking and dragging and stopdrag() etc works, but when I drop the piece over the target, it just does nothing.here is my code on the MC that is being dragged:
on(press){
startDrag (this, true, 135, 95, 700, 440);
}
on(release){
[code]....
btw, I am using actionscript 2.0
I cant find any conflicting assignments in keyboard preferences.
View 6 RepliesI have a 3 screen project and there are two buttons on each screen that have to be able to enable the user to jump to the appropriate screens when clicked on. I am totally new to flash and I have tried off and on for a couple weeks to figure this out in various books and online. I just can't figure out what I'm doing wrong.
View 1 RepliesWhen I test the movie my hyperlink works fine, but when I publish it, doesn't work. I'm not experienced with ActionScript. Here are some screen shots of what I got...
View 3 RepliesIt works perfectly when pulled within labels like in the demo.[code]note: (id="slidesbigtext") loads text from javascript without any issues, just can't find a way to make sIFR work in this situation..
View 1 RepliesI'm using PhantomJS 1.4.1 (support for plugins like Flash was removed in 1.5) complied with --qt-4.8.I cannot get Flash to be enabled inside PhantomJS. I use the --load-plugins=yes option. I set up QTWEBKIT_PLUGIN_PATH to all the paths that contain libflashplayer.so:
QTWEBKIT_PLUGIN_PATH=/usr/lib/browser-plugins:/usr/lib/flash-plugin:/usr/lib/mozilla/plugin:/usr/lib64/flash-plugin:/usr/lib64/mozilla/plugins:/usr/lib64/opera/plugins
[code].....
I have three sliders and they are generating numbers. What I am trying to do is, liderOne.value is divided by sliderTwo.value. And that gives me a number named density... Everything is okay for now...ActionScript Code:var density:Number = sliderOne.value / sliderTwo.value ;But I want the third slider to change the alue density by itself. I mean, in the purpose of doing that, I tried;ActionScript Code:sliderThree.value = density;but by this way, sliderThree is showing me the values of density. Everytime I change the values of sliderOne or sliderTwo, sliderThree is changed as density changes. But when I test the movie and try to change the sliderThree , it was like a big rock and not even moving
View 2 RepliesRecently I found Tweener And I followed the instruction of installment, but I got a compiler error:Desc: The class or interface 'caurina.transitions.Equations' could not be loaded.Sour: import caurina.transitions.Equations;Even I run the samples downloaded from the website, I got the errors, could someone tell me why is that?
View 1 RepliesI was reading Kirupa Chinnathambi's function tutorial and I was trying to make my own function, but it's not working! Here it is:[code]
View 9 Repliesi am trying to to do the following. I have 2 buttons on a page.when i click the first button it should just display the image i want it to.when i click the second button it should display the other image i want to display.
View 2 RepliesI don't have the cash right now to get Flash CS3, so I'm limited to using Actionscript 2 and that's what I have here. What I'm trying to do is use the onSoundComplete(); function, or something similar but not getting any results.
I'm doing a basic sort of mp3 player, though it only rotates between 3 songs. I have a character walking on stage as a movie clip, he's carrying a radio which is a nested movie clip within the first, and within the radio movie clip is where I have it set that you can manually advance from one song to the other by hitting a forward button, and there's also a volume slider. The first default song playing is "letsDance", The second song playing is "outtasite" and the third song playing is "please". They all work perfectly, the forward button to advance works, and the volume slider works.What doesn't work is when one song finishes, I want the next song to start. For now, I only included code for going from song 1 to song 2, but that's not working so I decided to stop there.
Unfortunately, with the three .mp3s included even at 20 seconds each, my compressed .zip file is 1.2mb, bigger than the allowed 146kb .zip on the kirupa forum. Therefore, I cannot post it on the forum, but have it hosted on a web server. Anyone willing to look at the file, you can find it at:
http:[url]...
What's in this .fla file right now is just the radio button and the volume slider, nothing else. I didn't want to include any unnecessary extras so even the three songs that are included are even shortened down to about 20 seconds each. Each of these songs are located externally from the .swf file and are called in through the "loadSound" command.Anyone who could shine some light or advice on why this isn't working or a better way to follow on what's going on here. I've read other things online about onSoundComplete(); like being used with music in arrays which I guess I could do, but I want to be sure I have control of advancing one song to the next and also adjusting the volume. Other things I've read about onSoundComplete(); is that it just doesn't work.
I've used CDATA tags many times, but I am writing the XML slightly differently then usual. Where do I put the cdata tags within this example so i can control the href links in the last section:
Code:
<item number="04" name="WE SELL ART" />
<item number="05" name="CONTACT" action="gotoFrame" variables="vitals" sectionNumber="05" sectionContent="POST. 123 Street Address, City, Country
PHONE. 123-456-7890
ELECTRIC. <a href="mailTo:info@test.com">info@test.com</a>"/>
I'm using CS4/AS3 and am swapping out swf files in a single holder from different buttons. The problem is that the child isn't getting removed when switching from button to button.Here's my code:
var Xpos:Number=0;
var Ypos:Number=150;
var swf:MovieClip;
var loader:Loader=new Loader();
[code]...
I have 3 movieclips, and I want them to work like buttons. It's for a website, so they need to redirect the user to a URL.
The entire flash file has 7 layers, and one of these layers is called "AS3", and is ment for all my actionscript. So, i figured if I gave the MC's an instance name, then I could write the AS3 in the "AS3"-layer. But I can't seem to get any code to work.
A loading bar for my portfolio website is not working at all. Although the same loading bar will work on other Flash projects.After doing some research I have found that loading in MovieClips from the library may be the cause of this. So instead of loading them in from the library, i am now loading them in externally but the problem still persists. how can i un-embed the font? [URL]
View 1 RepliesI have an example that I copied out of a book "Actionscript 3.0 Cookbook"here's the error message:TypeError: Error #1009: Cannot access a property or method of a null object reference. at jim.bitmap::Clouds()[C:AS3projectsclassesjimitmapClouds.as:13] at clouds_fla::MainTimeline/frame1()[clouds_fla.MainTimeline::frame1:2]
[Code]...
How to make flash contact form to work? The form is under contacts, how do i get it to send to an email address?
View 7 RepliesThe main class shown below is showing a blank screen and is NOT navigating to [URL].
package {
import flash.display.Sprite;
import flash.net.navigateToURL;
import flash.net.URLRequest;
import flash.net.URLVariables;
public class NavigateToURL extends Sprite {
public function NavigateToURL() {
var url:String = "[URL]";
var request:URLRequest = new URLRequest(url);
navigateToURL(request); }}}
I have a flash that I am trying to make the buttons/links towork on and no matter what I do they just do not work. I have many hours into it so far and just had no success weather using my CS3 how to book of the forums information.I not sure what I am missing. Never had this much trouble before. the first one I tried is HOME, have not gone farther since I can make the 1st one work.[URL]..
View 1 Replieshow to make Xml work with <![CDATA[null]]>? Now if to deal with something like <node><![CDATA[null]]></node> an exception will be thrown.
View 1 Repliesis there a way to make the slider work with the gotoandstop. I would like to us a slider as a navagation bar and when u slide to home all the stuff related to home pops up and so on.
View 1 RepliesI have a probleme to make my new site work with netscape7 (the name of the clip is pis=piscine)
http:[url]....
size of the stagevar largeurScene:uint = stage.stageWidth;var hauteurScene:uint = stage.stageHeight;
/bt01 is a button called clpix01var bt01:clpix01 = new clpix01();bt01.x = 110;bt01.y = 200;// Le curseur de la souris prend la forme d'une main au survol du boutonbt01.buttonMode = true;addChild(bt01);[code].....
var navBtnGlow:GlowFilter = new GlowFilter(color:uint = 0x999999,
alpha:Number = 1.0,
blurX:Number = 0,
blurY:Number = 15,
strength:Number = 1,
quality:int = 2,
inner:Boolean = true,
knockout:Boolean = false);
I even copied and pasted from a tutorial, the alpha word glows blue when I place it in my flash project, and I keep getting this error message.
Syntax error: expecting rightparent before colon.
I am using cs5.5 flash professional. on a pc. windows 7.
I am creating a Flash header for class and two things need to happen - One, it needs a stop and start button, and 2 it has to be clickable.
I have the code for each one and they do work separately, but when I try to apply both, only one will work. Here are the codes that I am using[code]...
I have some banner ads in AS3 that I need to make work with Google adWords.
View 1 Repliesmy gotoAndPlay does not seem to be working. On frame 1 I have this for testing purposes:
trace("frame 1")
and on frame 2 I have:
gotoAndPlay(2);
and I get "frame 1" traced out continually. It's going back to frame 1 for some reason.