Hello all,
Im completely new to Flash and ActionScript2 but what I need is to add Google analytics code to track clicks from "button"
Bellow is a part of my function
this.onRelease = function(){
getURL("http://www.mysite.co.uk/someulr.html","_self");
getURL("javascript:pageTracker._trackPageview('/flash_site.html');","_self");...
I'm loading a flash MovieClip (Test.swf) like below.
The problem is I can't read the size of mc (mc.width and mc._width both return 0, for the height as well), but I need to scale it.
I have the stage size, I can scale, but I don't have the size of Test.swf, so I can't scale it to fit into the stage...
ActionScript2, not actionscript3. ...
I have a Flex application that automatically loads the SWF and it's contents and displays the default progress bar like in all Flex apps. Currently I have a class in the application using a Loader instance to load an external bitmap to be added to the stage/canvas. I'd like to handle the loading of this bitmap in the Flex default preload...
Im new to this flash and I am using as2 for the action script I wanted to know if there are any good tutorials on how to create a toggle button so far this is all I have.
on (release) {
play ();
}
on (release) {
stop ();
}
I wanted so that when you hit playit would start the animation but showing the pause button and vice versa.
...
In my flash movie, every time when I click on a button, it takes focus off of the stage. And I have to reclick the stage in order to interact with it again. Is there away to fix this issue. I am making a game and it will be very annoying if the player has to keep reclicking the stage in order to take control of the game every time they c...
I've been using the uploadify jquery for a long time - this tool has been working on several different servers for quite a while. Recently, on rackspace cloud sites accounts, the uploads stopped working.
There's been no change to our code and our code works perfectly on other servers. I'm having trouble finding the issue, here's what ha...
Ok, I have raise these question a thousand times and so far no ones been able to help me. I am raising again because I discovered something new. In the past I haven't been able to create parameters for class objects, every time when I do so I get the following error
1136: Incorrect number of arguments. Expected 0.
I notice that my cl...
I have an object that points in the direction of another object (i.e. it rotates to the direction that the second objects x and y coordinates are at) below is the code I use.
var distx = target.x - x;
var disty = target.y - y;
var angle:Number = Math.atan2(disty, distx);
var vx:Number = Math.cos(angle) * cspeed;
var vy:Number = Math....
EDIT: I have since solved this problem by simply reworking my MXML-based app and using the SWFLoader component to get the desired effect, without any reloading necessary. This question is therefore no longer an issue for me, but I leave it open for reference.
In MXML, I can get the desired effect easily:
<?xml version="1.0" encoding=...
I have an odd issue while using FlashCS4.
I have a textfield that, when set to
STATIC TEXT works absolutely fine, in
the correct font.
If I set it to DYNAMIC TEXT, the text
shows up as Arial or some other
default on systems where the selected
font isn't available. It shows up in
the proper font on systems that have
the font installed.
...
I am curious to know if there is a way of connecting a flash front-end to a C++ driven backend? I'm not currently working on a project that involves this, but I found out about an application used in the gaming industry, called Scaleform, that requires knowledge on doing such things in order to create menus in games.
...
I'm creating a project in flex builder but it's not using the flex framework, it's just pure actionscript.
At the moment I have some bitmap resources embedded for drawing things, but I'd like a little animation and thought I could create swf animations for them in flash and use the [Embed()] thing to embed them in the actionscript proje...
I am developing a project in Flash Builder which will load a file built by Flash CS4. The code in Flash CS4 is below, it's a doc class. I am sure the dispatchEvent has been invoked:
package {
import flash.display.MovieClip;
import flash.events.Event;
public class flashcs extends MovieClip
{
public function flashcs():void
{
...
I am debugging both a flash cs4 project and a flash builder project, actually the flash builder project will load the flash cs4 project thru swfloader, but the system can only support one debugger at a time. So I am seeking a method to debug it simultaneously...
...
var bmd:BitmapData = ImageSnapshot.captureBitmapData(someSprite);
trace("bmd size "+getSize(bmd));
var bounds:Rectangle = new Rectangle(0, 0, bmd.width, bmd.height);
var snapshot:ImageSnapshot = new ImageSnapshot(0,0,bmd.getPixels(bounds));
//var snapshot:ImageSnapshot = ImageSnapshot.captureImag...
In Flash/ActionScript2, is it possible to capture the mousemove, buttonup and down event but only within one MovieClip?
At present, i can capture mousemove etc. via a listener, but only for the entire stage...
I need to draw a rectangle for selecten, and then press a save button. The problem is i save the coordinates on mousedown and up...
Question: I need to load a swf file from inside my flash.
Now, normally I would use loadClip, but I need to pass a parameter (filename) to this swf.
How can I pass a parameter there?
...
My animation is 100 frames total. I want to set a range of frames. Is is there a command to play only frames 50 to 75? I want begin-and-end frame to be in an object I can call on later. There must be a "best" way of doing this!
100 frame total
<==play 50 to 75==>
SAMPLE
These commands work, but I would end up adding labels and st...
How do I resolve the error of duplicate variable definitions? There has to be
separate namespaces and use for each definition, but I'm just not seeing it.
CODE
I didn't write this, but I've been trying to unpackage it and change the classes and seem to have broken it. I want to use this for time-scaling the playback of my movies.There'...
var snapshot:ImageSnapshot = ImageSnapshot.captureImage(someSprite);
var file:FileReference = new FileReference();
file.save(snapshot.data,'abc.png');
In the above code I am able to capture an image.
But I also want to apply a scalingMatrix(for zoomIn/Out) and a clipping rectangle to it.
How to do it?
I tried capturebitmapdata too...