Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Converting SWF's...



Does anyone know of a way to convert .swf files to .fla?



FlashKit > Flash Help > Flash Newbies
Posted on: 10-12-2001, 06:39 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Converting A PDF To A Flash FLA File Without Converting To An Image First?
Basically, I'm building a digital catalogue that runs off a CD and uses a Flash 'page turning component' to display the pages. Certain pages will have links that use Flash's Fscommand call to open Word and Excel documents.

Has anyone got any bright ideas of how to Convert a PDF to a Flash FLA file without converting to an image first?

I know I can open a PDF in Photoshop, save as a PNG or JPG and then import this into Flash, however the quality isn't brilliant. If you use a hi-res image, then you get a hi-res file size...

Currently, the best way I have found, is to open the PDF in Illustrator, then export it as a SWF. Illustrator converts all text to shapes and you end up with a small SWF, yet great quality when displayed in larger sizes. As I'm currently using a page turning flash component that loads SWF files, I need the quality to be good for the 'Zoom' function.

I've found an Illustrator script that will do the hard work via a 'batch' process, so I can take a 100 page PDF and convert the whole lot to 100 SWF files while I drink tea and 'look busy' and read a magazine, but the problem I have is that I need to add a layer of buttons to several of the SWF files to add a little functionality....

I do have a SWF to FLA decompiler which does a good job, however because Illustrator turns everything into shapes, the decompiler does the same and you end up with thousands of files in the library.... Plus there are a lot of error messages when the file is first loaded...

Many layers are masked, (for some reason without a fill), so if you publish the decompiled file straight away, you just get a blank file. Once you go through and fill the masks needed, it shows when you publish, but this really is a lot of work and I've had a few pages that show when you open the SWF file, but don't show when the SWF is called into the page turning file.... Hmmm....

So in short, I'd like to take a PDF and convert it to a FLA file, add a layer of buttons and publish as a SWF file....

Anyone got any 'Pearls of Wisdom'?

Clere
Clere Print

Converting...
Hi all,

I'm trying to create some small animations from a .mov file supplied to us. The customer just wants a few scenes taken from it (door opening for 'Come on in' that sort of thing)

What is the best way of doing this? converting the .mov to jpgs and creating small movies...? Any suggestions welcome.

Thanks
Ash

Converting
how do u convert a flash movie into jpg or gif movie format? im trying to make an avatar and it wont let me make it a mov it just makes it a pic

Converting .fla's PC->MAC
im trying to solve a problem for which someone posted a file on these boards that is a solution. when i try and download it, i get a file.php type of deal. when i change the name to something.fla and then go to open it (using view all files) it says 'unexpected file fomat'. i tried using flash typer too but it doesnt help. im on a mac using flash 5.

m

Converting .FLA's From PC -> MAC
im trying to solve a problem for which someone posted a file on these boards that is a solution. when i try and download it, i get a file.php type of deal. when i change the name to something.fla and then go to open it (using view all files) it says 'unexpected file fomat'. i tried using flash typer too but it doesnt help. im on a mac using flash 5. any mac users out there experience this.

its really two issues: one, how to get a file to download off these boards intact

and two: (and ive had this before with no solution) trying to open PC Flash files with a Mac.

please. any tips appreciated this is really holding me back .......!!!!!!

m

Converting
could anybody convert this matlab script into actionscript
im only interested in converting kp to Q




% function to convert a given value of value of Q to Kp or vice versa
%
% function out=q_to_kp(in,index)
%
% Inputs:
%
% in: scalar or vector value of either Q or Kp
% index: String that determines whether in is Q or Kp i.e.
% index="q' or index="kp"
%
% This function uses the simple formula for converting between Q and
% Kp indices. By varying the input string the formula will work backwards
% such that Kp is calculated by Q.

function out=q_to_kp(in, index)

out=repmat(nan,size(in)); % pre-allocate output file
% check the string to see which inex is the input

if strcmp(index,'q'); % compare strings for Q input
for n=1:length(in);
if in(n)==1, out(n)=0; % if Q=1 set Kp to zero
elseif in(n)<0; % test for a negative input and display error
disp('error: Q index cannot be negative!');
out(n)=nan;
else out(n)=in(n)-2; % for any other value of Q get appropriate
Kp
end
end

elseif strcmp(index,'kp'); % compare strings for Kp input
for n=1:length(in);
if in(==0, out=1; % if Kp is zero set Q=1
elseif in(<0; % test for negative input and display error
disp('error: Kp index cannot be negative!');
out(n)=nan; % substitute NaN for the negative values
else out(n)=in(n)+2; % for any other value of Kp get appropriate Q
end
end
else % in case of other string inputs display error
disp('error: string input must be "q" or "kp"');
return;
end
the smiley faces are colons in brackets

Converting An Avi To An Swf
How do I go about converting an avi file to an swf?

Converting Swf's To .fla's
is it possible to convert a swf file back to a fla file ???

any software that does this ?

Converting Swf To Fla
Is it true that there are programs that can take an swf and convert it back to Fla? Are there no protections against this?

Converting Swf Into Avi
Hello dears

I want to convert swf file into avi format. can any body suggest me how to do this.I shall be very thankful to whom, who will tell that

Converting A .SWF Into A .FLA
where do i start? i wish to create a website, but i dont no, yea sure all the books say get a pen and paper blah blah. but really i need some inspiration.

AS Value Converting?
Is there any way actionscript can be used to add zero's before a digit? Hard to explain, but here are some examples.

2 -> 0002
53 -> 0053
734 -> 0734
5346 -> 5346

Converting
I'm so sorry, but I don't know where exacly this would go.

For posting a movie, how do I convert folders to .zip files? I'm trying to post something, but it's not in that format. So sorry about the place I posted this, I'm new here. There's the file.....wait, where is it?
Can this be moves to the correct place?

Converting From AS1 To AS2
Evening peeps

A couple of weeks ago i got FlashMX 2004. One of the first things that intrested me about it was the new option to add images to dynamic text fileds This would be a big plus for me and my site .
I thought it would be as simple as exporting my movie with player 7 and AS 2. when i run the site it throw up all sorts of problems. is ther conflicts with AS1 and AS2?

Cheers
Paul

P.S
Would love to get those smilies working in my forum

Converting
I lost one of my .fla files but I still have the .swf file. What I need to do is turn that .swf into a .html. Is there any way to do this?

Converting .asp To Cgi
I found a flash contact form that I plan on using on my new site but my host doesn't support .asp files which are used by this flash form.

I was wondering if there's any way to convert the .asp file into cgi which is supported by my host.

here's the contact.asp script....

<% @language="VBSCRIPT" %>

<%

Dim myMail, myBody

myBody = "Name: "& request.form("name") & vbcrlf
myBody = myBody & "Email: "& request.form("email") & vbcrlf
myBody = myBody & "Message: "& vbcrlf & request.form("message")

Set myMail = CreateObject("CDONTS.NewMail")

myMail.BodyFormat=1
myMail.MailFormat=1
myMail.From=request.form("email")
myMail.To="mail@mail.com.com"
myMail.Subject="Mail from Web"
myMail.Body=myBody
myMail.Send

set myMail=nothing

%>

And here's the flash commands on the 'submit' button in flash...

on (release) {
if (!name.length) {
name = "PLEASE ENTER A NAME";
} else if (!email.length || email.indexOf("@") == -1 || email.indexOf(".") == -1) {
email = "PLEASE ENTER A VALID EMAIL";
} else if (!message.length) {
message = "PLEASE INSERT A MESSAGE";
} else {
loadVariablesNum("contact.asp", 0, "POST");
gotoAndStop("thank you");
}
}


...Any help would be greatly appreciated!

Converting To .gif?
How do u convert .swi files to .gif files?

Converting Swf To A Fla.
I need to change one of my old flash movies, but I don't have the original fla. I do have the swf. Is there a way to convert it back to a fla, or am I redoing it from scratch?

Thanks.

Converting An Swf To A Jpg?
hey there.

i have a project underway where the user can design a custom postcard via some simple Flash interactivity. Is there a way to either:

a) have the option to save and send the iamge with a personalized greeting on it to an email address?

or if that's a little too much for much

b) have a button that saves it out as a jpg?

Love to know! big help if you can give me some direction.

thanks!

Stevie Spin

Help Converting AS 1 To 2
I need some help converting an AS 1 file to AS 2. It's a preloader script that I got from a tutorial here at FK. I've never tried converting AS 1 to 2 before and after a little bit of trial I found it's a little more difficult than expected. I would appreciate anyone's help on this. I've included my original AS code and not my screwed up attempt. Thanks everyone for any advice or help.

code:
onClipEvent(load) {
_root.stop();
dO = 3.6;
r = 90;
function addslice(O) {
x1 = r*Math.sin(O*Math.PI/180);
x2 = r*Math.sin((O+dO)*Math.PI/180);
y1 = r*Math.cos((O)*Math.PI/180);
y2 = r*Math.cos((O+dO)*Math.PI/180);
with (_root.mask) {
moveTo(0, 0);
beginFill(0x000088);
lineTo(x1, y1);
lineTo(x2, y2);
endFill();
}
}
_root.createEmptyMovieClip("mask", 0);
this.setMask(_root.mask);
_root.mask._yscale = -100;
_root.mask._x = this._x;
_root.mask._y = this._y;
oldLoaded = 0;
}

onClipEvent(enterFrame) {
loaded = Math.ceil(_root.getBytesLoaded()/_root.getBytesTotal()*100);
for (i=oldLoaded; i<loaded; i++) {
addSlice(dO*i);
}
if(loaded == 100) {
_root.mask._alpha = 0;
delete this.onEnterFrame;
_root.gotoAndStop(2);
}
}

Converting AS2 To AS1
excuse me, everyone.. i hope you guys can help me out on something...

how can i convert an AS2 class into AS1?

i believe i will be receiving some sort of code from a friend, and he she said it would be in AS2.. and i am only on flash mx, so i would be needing help on this issue..

thanks, everyone, for any help you can give.

Converting To Gif
Hi folks

Can we import or open Swish Max movie into Flash MX and convert it to GIF and save it, or is it possible that we can open the swish exe file in Flash. I want to convert a swish Max movie into GIF. Is there any solution.

Thanks

Feroze

Converting .swf To .fla
My computer crashed and I lost my original file. I have the .swf file on hand on my web server. I read on here once that there was a program that will convert the files over. Anyone know of any? Also, is it very reliable. I can probably just redo the entire thing but that will require setting up all the images and stuff again and I want it to be an exact reprint. I can't afford to have anything different on the new copy cause it is for a client website that is already in use. Basically there was a change in one of the links that I need to fix.

Converting *.swf
Hi Folks

Anyone know of an app that can convert .swf into mpeg or any other suitable movie format?

Thanks
Dave

Converting To FLV? How, And Is It Necessary?...
How do you (or is there a good/easy tutorial to) convert movie files (.MOV, .WMA, etc) to .FLV format (I'm using Flash MX 2004)? Do I need to buy an outside software package like Sorenson Squeeze or FLIX or something?....

Also, is it necessary to even convert them if what I'm going to be doing is playing them online (based off of the tutorials at gotoandlearn.com )? What's the benefits/advantages to converting them to .FLVs, versus just calling the .MOV file? I'd prefer the media to stream, cuz the movies are like 3-4 minutes long each that I will be doing...

Thanks!...

Converting Swf
i've been trying to convert an swf file to any other sort of video format but i have been unsuccesful. i tried exporting in flash to avi but it only got info on my main timeline and most of my content is in movieclips. i then tried to export to quicktime, this seemed to be actually exporting all my content but at the end i got an error saying that i didn't have the proper handler. i have quicktime pro 6.5 on my machine and that should be able to handle the flash. i get the same message when trying to publish to quicktime. since then i have tried some third party converters like swf2avi and they don't work. does anyone have any suggestions? thanks.

jeremy boyd

Converting A SWF/FLA To A Gif
Ok, I have a flash animation consisting of about 140 frames, the animation has been compressed on to one layer into one frame (so you cant preview it unless you go control, test movie) now, I'm trying to save it as a gif file but for some odd reason, when I open the file up, it just shows the first frame and nothing else happens. If someone could please help me on this, it would be greatly appreciated.

My msn is erik_n@telus.net (just so if someone wants to just do it for me instead of tell me what to do)

Erik

Converting AS1 To AS2
hi could some one tell me what the differences that is between the two samples other then that one is AS1 and the other is AS2? keep in mined I'm working with a xml file.



Code:
AS1:

if (blank == blank) {
aPath = new Array();
aPath.push(audioTracks[i].attributes.path);
}



Code:
AS2:

if (blank == blank) {
var aPath:Array = new Array();
aPath.push(audioTracks[i].attributes.path);
}


why is this two diffrent arrays? though is if do it like this it works


Code:
AS2:

var aPath:Array = new Array();
if (blank == blank) {
aPath.push(audioTracks[i].attributes.path);
}


I'm trying to convert a file from AS1 to AS2 and I dont know much about AS2.
Yet I'm learning it as I go.

Help Converting Swf
Alright, I've been trying to figure this out for the past week and its really annoying. I've tried about 6 different programs to convert an SWF file to AVI or MPEG, but whenever the file converts it goes from 300kb to 1.6 GB.... which is impossible. Do you think I have to buy the real version first, or do I just suck at life....???

Converting .swf To .fla?
I was wondering if it was possible to convert a .swf file back .fla because I need to update a website and I can't find the orignal .fla file.

Need Some Help Converting .fla's
Does anyone know if you can convert an .fla into an eps file? I have to get something to a printer and I've made a drawing in flash. They need it as an .eps file and when I export it as an .eps 3.0 it completely changes everything. Is there anyone out there who can help me?

Help: Converting .PPT To .SWF
Hi,
I have some .ppt documents that have flash embedded into the presentation, but now I want to integrate these presentations to my website, so I was researching some automatic converters. Does anyone know of any good converters (that support embedded flash as activeX)?

Thanks

(HELP) Converting From MX To F8
What do I change to make this work in F8??

Any help would be welcomed


Code:
onClipEvent (load) {
hx = 800/2; // Centre of circular path
hy = 400/2;
r = 100; // Width of Rotation
a = 30; // Depth of Rotation
function speed(num) {
speedX = -(_root._xmouse-hx)/num;
return speedX;
}
function trans() {
p += speed(60); //Speed - Higher the number, slower the speed
range = ((p+308)*Math.PI)/180; // Range -(p+'x') X is variable
re1 = ((Math.sin(range))*r);
re2 = ((Math.cos(range))*a);
}
function property() {
trans();
_x = hx+re1;
_xscale = _yscale=_alpha=re2+70;
this.swapDepths(_alpha);
}
}
onClipEvent (enterFrame) {
property();
}

Converting SWF To SVG
Hiya

I know this has probably been asked a million times before, but is it possible to convert scripted SWF files into SVG format? It's just that I'm trying to upload the file to a website that doesn't accept SWFs - I would just convert it to a GIF or something but then the actionscript doesn't seem to work.

There's probably a really simple answer to this somewhere... I just can't seem to find it. Thanks in advance!

[F8] Converting AS2 To AS3
hi there!

I am trying to create an image gallery that loads external images, with a button to cycle through them. I found this code online:

arrImgs = ["USA 1.jpg","USA 2.jpg","USA 3.jpg","USA 4.jpg"];
var id:Number = 0;

loadMovie(arrImgs[id], _root.photo.empty);

btn.onRelease = function(){
id<arrImgs.length-1 ? id++ : id = 0;
loadMovie(arrImgs[id], _root.photo.empty);
};

and understand that it is creating an array, then giving each an ID, and iterating through them when the button is pressed. is anybody able to convert this code to ActionScript 3.0 for me?

Thanks

Converting .swf Into .fla
I have the .swf file but lost the .fla file in another computer. Is there a way I can convert the .swf file into the .fla so I can edit it again in flash cs3?

thanks!

Converting AS2 To AS3
Hello folks,
Converting AS2 to AS3
is there any tool for this conversion?

I have one big AS2 code, and there are a great deal of AS to adjust manualy, so one nice convertor whould be nice!
I need to add some class that is available only in 3.0

Thanks!

Converting AS3 Into AS2
hiya guys. im a newbie to flash so sorry if my im asking an obvious question (or a hard one)!

someone gave me this AS3 and i need it on AS2:

stop();
stage.addEventListener(MouseEvent.MOUSE_DOWN, doMouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, doMouseUp);
stage.addEventListener(MouseEvent.MOUSE_MOVE, doMouseMove);

var isAnimation:Boolean = false;
var oldX:int = stage.mouseX;
var startAnimationFrame:int = 2;
var endAnimationFrame:int = 110;


var animFrame:int = 2;
gotoAndStop(startAnimationFrame);
function doMouseDown(e:MouseEvent) : void {

isAnimation = true;

}

function doMouseUp(e:MouseEvent) : void {

isAnimation = false;
}

function doMouseMove(e:MouseEvent) : void {

if(isAnimation) {

if((stage.mouseX - oldX) < 0) {

if(animFrame+1 <= endAnimationFrame) {

animFrame++;
} else {

animFrame=startAnimationFrame;
}
} else {

if(animFrame-1 >= startAnimationFrame){

animFrame--;
} else {

animFrame=endAnimationFrame;
}
}

gotoAndStop(animFrame);

oldX = stage.mouseX;
}
}

Is it easy to convert?
(unless someone wants to quickly do it for me tehehe )

any help appreciated x x

[CS3] Converting From As2 To As3
Hello.

I have been trying to convert the following from as2 to as3 and I have not been successful in doing so. I would appreciate any help and here is the code:


Code:
var num:Number = 0;

_root.onMouseDown = function ()
{
var temp = _root.attachMovie("Circle","Circle"+num++,_root.getNextHighestDepth());
temp._x = _root._xmouse;
temp._y = _root._ymouse;
temp.gotoAndStop(Math.ceil(Math.random()*5));
temp._xscale = temp._yscale = Math.random()*100 + 20;
temp._alpha = Math.random()*100 + 20;
}


I want to attach a sound to this. I can do it with no problems in as3 (attach a sound that is).

[CS3] Converting AS 3.0 To AS 2.0
I written the below code in AS3. i want to convert this to AS2.

code is here >

this.fullscreen_btn.addEventListener(MouseEvent.MO USE_UP, toggleFullscreen);
stage.scaleMode = "exactFit";
function toggleFullscreen(event:MouseEvent) {
if (stage.displayState == "fullScreen") {
stage.displayState = "normal";
} else {
stage.displayState = "fullScreen";
}
}

Help Converting To AS3
I found this draggable sortable list thing in AS2 :: http://blog.soulwire.co.uk/flash/act...amic-stacking/

I tried converting it to AS3, but am thrown off by the prototype functions. Does anyone know of a sort of thing in AS3 or think you can turn it into as3?

Converting WVX To MPG. How?
How do I convert a WVX file to an MPG file so I can put it in my cartoon???

__________________________________________________ ______________________
Another question, how do I have an MC show it's motions inside of it when you play it in CTRL + ENTER, or when you import that file in?

Converting Bmp To Swf
Hello,
I'm having trouble finding some basic answers, and I was wondering if anyone here could help me. I'm trying to make small file size high resolution movies. These movies are a series of plotted bmps (contour plots, or velocity vector plots). These bmps can be large, so I was hoping I could make them smaller by converting them to vector format (swf). I know bmps can be converted to swf, but what's the best way to do this? Will the swf file be smaller, but retain quality? I'd love to be able to create swf plots firsthand. Are there any software plotting packages that allow this?

Any help or hints at all are much appreciated!!
Thanks,
Wendy

Converting From MX To 8
Need help in updating the syntax for this old MX code to Flash 8 (AS1/2??)

Any help is welcomed!!!


Code:
onClipEvent (load) {
hx = 800/2; // Centre of circular path
hy = 400/2;
r = 100; // Width of Rotation
a = 30; // Depth of Rotation
function speed(num) {
speedX = -(_root._xmouse-hx)/num;
return speedX;
}
function trans() {
p += speed(60); //Speed - Higher the number, slower the speed
range = ((p+308)*Math.PI)/180; // Range -(p+'x') X is variable
re1 = ((Math.sin(range))*r);
re2 = ((Math.cos(range))*a);
}
function property() {
trans();
_x = hx+re1;
_xscale = _yscale=_alpha=re2+70;
this.swapDepths(_alpha);
}
}
onClipEvent (enterFrame) {
property();
}

Converting To AS3. How Would I Do This In AS3
I am switching over to AS3 and had a question regarding how I would do the similar action in AS2 in AS3.


Code:
//AS2
var myMC:MovieClip = new MovieClip
myMC = _root.attachMovie("square","square",this.getNextHighestDepth())
In AS3, if I do the following:

Code:
//AS3
import flash.display.MovieClip;

var myMC:MovieClip = new MovieClip();
var s:symbol= new symbol() // symbol is class in the library..create and then attach to stage
myMC = stage.addChild(s)
I get the following error:
1118: Implicit coercion of a value with static type flash.displayisplayObject to a possibly unrelated type flash.display:MovieClip.Where I am trying to set myMC equal to (=) the recently added child (s), so that I can easily access, call, or move it later simply by referencing 'myMC'.

Can I do this in AS3?

Thanks.

Help Converting AS2 To AS3
I am trying to convert the code below to AS3 (slideshow)... Could someone do me the enormous favor of helping me out? It seems that time is not on my side while learning AS3. LOL

Thank you so much! #_#


ActionScript Code:
var currentPosition:Number = SlideHolder.Slide1._x;
var startFlag:Boolean = false;
menuSlide = function (input:MovieClip) {
    if (startFlag == false) {
        startFlag = true;
        var finalDestination:Number = input._x;
        var distanceMoved:Number = 0;
        var distanceToMove:Number = Math.abs(finalDestination-currentPosition);
        var finalSpeed:Number = .5;
        var currentSpeed:Number = 0;
        var dir:Number = 1;
        if (currentPosition<=finalDestination) {
            dir = -1;
        } else if (currentPosition>finalDestination) {
            dir = 1;
        }
        this.onEnterFrame = function() {
            currentSpeed = Math.round((distanceToMove-distanceMoved+1)*finalSpeed);
            distanceMoved += currentSpeed;
            SlideHolder._x += dir*currentSpeed;
            if (Math.abs(distanceMoved-distanceToMove)<=1) {
                SlideHolder._x = maskMovie._x-currentPosition+dir*distanceToMove;
                currentPosition = input._x;
                startFlag = false;
                delete this.onEnterFrame;
            }
        };
    }
};

Converting AS3 Into AS2
*edited! sorry, i said im a newbie. i had to delete afew frames in order to reduce the size, hence it looks a bit wierd.


hiya guys. im a newbie to flash so sorry if my im asking an obvious question!

someone gave me this AS3 and i need it on AS2:


ActionScript Code:
stop();
stage.addEventListener(MouseEvent.MOUSE_DOWN, doMouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, doMouseUp);
stage.addEventListener(MouseEvent.MOUSE_MOVE, doMouseMove);

var isAnimation:Boolean = false;
var oldX:int = stage.mouseX;
var startAnimationFrame:int = 2;
var endAnimationFrame:int = 110;


var animFrame:int = 2;
gotoAndStop(startAnimationFrame);
function doMouseDown(e:MouseEvent) : void {
   
    isAnimation = true;
   
}

function doMouseUp(e:MouseEvent) : void {
   
    isAnimation = false;
}

function doMouseMove(e:MouseEvent) : void {
   
    if(isAnimation) {
       
        if((stage.mouseX - oldX) < 0) {
           
            if(animFrame+1 <= endAnimationFrame) {
              
               animFrame++;
            } else {
               
               animFrame=startAnimationFrame;
            }
        } else {
           
            if(animFrame-1 >= startAnimationFrame){
              
               animFrame--;
            } else {
               
               animFrame=endAnimationFrame;
            }
        }
       
        gotoAndStop(animFrame);
       
        oldX = stage.mouseX;
    }
}

Is it easy to convert?
(unless someone wants to quickly do it for me hehe )

any help appreciated x x

Converting From As 1 To 3
Hello, I have a .fla file that had some actionscript embedded in it. I was wondering if there is a converter out there that can go from as 1 to 2, and then I need to go from 2 to 3. I need to get it to 3, so I can use amfphp. Here is the code I pulled out of the file, which was created in mx2004, right now I am using cs3.

The original code I pulled out was:

ActionScript Code:
onClipEvent (load) {
            loadMovie("img/pic.jpg", _root.mainPIC.TEMPlgTARGET);
        }
       
        on (rollOver) {
            loadMovie("img/pic.jpg", "_root.mainPIC.lgTARGET");
            with (_root.mainPIC) {
                gotoAndPlay("fadeup");
            }
        }

and then I added a little bit more so it would work with amfphp, this is what I came up with:


ActionScript Code:
package {
    // required for flash file and output display
    import flash.display.MovieClip;
    import fl.events.*;
    import flash.events.*;
    import flash.ui.Mouse;
   
    // required to send/recieve data over AMF
    import flash.net.NetConnection;
    import flash.net.Responder;
       
        public class main extends MovieClip {
            protected var gateway:String = "../../amfphp/gateway.php";
            protected var connection:NetConnection;
            protected var responder:Responder;
           
            public function Main() {
                trace("Gal 360");
                // Event listner for buttons
                send_btn.addEventListener(MouseEvent.CLICK, sendData);
                fault_btn.addEventListener(MouseEvent.CLICK, faultServer);
                // Responder to handle data returned from AMFPHP.
                responder = new Responder(onResult, onFault);
                connection = new NetConnection;
                // Gateway.php url for NetConnection
                connection.connect(gateway);
            }
        onClipEvent (load) {
            loadMovie("img/pic.jpg", _root.mainPIC.TEMPlgTARGET);
        }
       
        on (rollOver) {
            loadMovie("img/pic.jpg", "_root.mainPIC.lgTARGET");
            with (_root.mainPIC) {
                gotoAndPlay("fadeup");
            }
        }
            }
}

And when I tried to publish it I got two messages saying:

1084: Syntax error: expecting rightbrace before leftbrace. onClipEvent (load) {


1084: Syntax error: expecting rightbrace before leftbrace. on (rollOver) {

Converting AS 3.0 To AS 2.0
I want to convert this code to AS 2.0 which is in AS 3.0

Please help me!1

code is

this.fullscreen_btn.addEventListener(MouseEvent.MO USE_UP, toggleFullscreen);
stage.scaleMode = "exactFit";
function toggleFullscreen(event:MouseEvent) {
if (stage.displayState == "fullScreen") {
stage.displayState = "normal";
} else {
stage.displayState = "fullScreen";
}
}

Copyright © 2005-08 www.BigResource.com, All rights reserved