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








Can Some One Help Me With My Actionscript


I have i problem with my actionscript.
it's a slide show with pictures.
when i clikk on a picture the image comes in a new window using java script. But i get the same picture every time. I want the picture to be the same as the one i clikked on.

The problem lies her i think.

-----

myUrl = "javascript:launchwin('bildearkiv/" +
_root["bildeA"+i"]+', 'newwindow','toolbar=no,width=500,
height=300,left=0,top=0,status=no,scrollbars=no,
resizable=no')"

_root.newClip2.onRelease = function()
{
getUrl(myUrl);
}

-----

The complete code. the slide show works fine accsept the onRelease function

I have loadVariables on a diffrent frame. The frame befor this one.
The result of the load variables:

&tekstA0=annonse&bildeA0=dress3.jpg&tekstA1=tes t a&bildeA1=dress13.jpg&tekstA2=aaaaaa&bildeA2=dress 12.jpg&&rader2=3

------

stop();

cellWidth2 = annonse_hoved_mc.annonse_cell_mc._width;
center2 = Stage.width/2;
raderA = _root['rader2'].substr(0,1);

_root.error2 = _root['error2'];

if(_root.error2 == "none")
{
_root.gotoAndStop("60");
}

_root.onEnterFrame = function()
{
reelSpeed2 = (_xmouse-center2)/20;
annonse_hoved_mc._x += reelSpeed2;

leftStop2 = center2-annonse_hoved_mc._width+cellWidth2/2;
rightStop2 = center2-cellWidth2/2;

if (annonse_hoved_mc._x < leftStop2){
annonse_hoved_mc._x = leftStop2;
}else if (annonse_hoved_mc._x > rightStop2)
{
annonse_hoved_mc._x = rightStop2;
}
}

for (i=0; i<raderA; i++)
{
originalClip2 = _root.annonse_hoved_mc.annonse_cell_mc;
newClip2 = originalClip2.duplicateMovieClip("cellA"+i, i);

newClip2._x = i*170;
newClip2.annonse_info_txt.text = _root["tekstA"+i];
content2 = newClip2.annonse_holder_mc;
content2.loadMovie("bildearkiv/" add _root["bildeA"+i]);

myUrl = "javascript:launchwin('bildearkiv/" +
_root["bildeA"+i"]+', 'newwindow','toolbar=no,width=500,
height=300,left=0,top=0,status=no,scrollbars=no,
resizable=no')"

_root.newClip2.onRelease = function()
{
getUrl(myUrl);
}

}

-----------

mychos




FlashKit > Flash Help > Flash ActionScript
Posted on: 03-31-2004, 11:35 AM


View Complete Forum Thread with Replies

Sponsored Links:

Basic Moving Clip W/actionscript + Random Motion W/actionscript
ive tried this many times w/logical scripts but i dont know how

how do you create motion w/actionscript?

also, how do you randomize the motion?

any help would be appreciated

View Replies !    View Related
Adding Actionscript To An Empty Movie Clip Created By Actionscript
Ok, I'm trying to figure out if I can add actionscript to an empty movie clip that I created using actionscript. Is it possible and if so, how?

Thanks,
Doug

View Replies !    View Related
[FCS3] Adding Actionscript To A Movieclip Through Actionscript?
Yo, is there a way to add actionscript to a movieclip created in actionscript? Such as a onClipEvent(load) and onClipEvent(enterframe)? I have a onEnterFrame already for the movie clip as its created though. I have taken code thats from a gravity tutorial where it uses the two methods above. I've tried adding them into the onEnterFrame that I had already to add gravity to the movieclips created though that did'nt work =(

View Replies !    View Related
Jigsaw Puzzle - Changing From Actionscript 2.0 To Actionscript 3.0
Hello Everyone,

I was hoping someone could help me convert the following actionscript from actionscript 2.0 to actionscript 3.0. I'm trying to complete a jigsaw puzzple but I'm having problems converting it into actionscript 3.0.

Below is my actionscript:

//Puzzle Pieces
scramble_btn.onRelease = function(){
piece1._x = random(250);
piece1._y= random(250);
piece2._x = random(250);
piece2._y= random(250);
piece3._x = random(250);
piece3._y= random(250);
piece4._x = random(250);
piece4._y= random(250);
startGame();
messageOn.text = "";
counter.text = "00:00";
clearInterval(timeStarted);
timeStarted = setInterval(countdown, 1000);
time_start = 0;
}

//Puzzle Move
function startGame(){
piece1.onPress = function(){
this.startDrag();
piece1.swapDepths(1)
}
piece1.onRelease = function() {
this.stopDrag();
hit1();
checker();
};
piece2.onPress = function(){
this.startDrag();
piece2.swapDepths(1)
}
piece2.onRelease = function() {
this.stopDrag();
hit2();
checker();
};
piece3.onPress = function(){
this.startDrag();
piece3.swapDepths(1)
}
piece3.onRelease = function() {
this.stopDrag();
hit3();
checker();
};
piece4.onPress = function(){
this.startDrag();
piece4.swapDepths(1)
}
piece4.onRelease = function() {
this.stopDrag();
hit4();
checker();
}
};

//HitTest Script
function hit1(){
if(piece1.hitTest(container1)){
piece1._x = container1._x;
piece1._y = container1._y;
}else{
piece1._x = random(250);
piece1._y = random(250);
}
}
function hit2(){
if(piece2.hitTest(container2)){
piece2._x = container2._x;
piece2._y = container2._y;
}else{
piece2._x = random(250);
piece2._y = random(250);
}
}
function hit3(){
if(piece3.hitTest(container3)){
piece3._x = container3._x;
piece3._y = container3._y;
}else{
piece3._x = random(250);
piece3._y = random(250);
}
}
function hit4(){
if(piece4.hitTest(container4)){
piece4._x = container4._x;
piece4._y = container4._y;
}else{
piece4._x = random(250);
piece4._y = random(250);
}
}

//Timer
counter.text = "00:00";

function countdown() {
started();
time_start = time_start+1;
if (time_start>10) {
messageOn.text = "GAME OVER!!!";
clearInterval(timeStarted);
}
}

function started(){
sec = Math.floor(time_start+1/1000);
sec = (sec<10)?"0"+sec:sec;
min = Math.floor(sec/60);
min = (min<10)?"0"+min:min;
counter.text = min+":"+sec;
};

//This will check if all puzzle pieces are complete...and display game finish messsage.
function checker(){
if((piece1.hitTest(container1)) && (piece2.hitTest(container2)) && (piece3.hitTest(container3)) && (piece4.hitTest(container4))){
messageOn.text = "CONGRATULATIONS!!!";
clearInterval(timeStarted);
}
}

View Replies !    View Related
Giving Actionscript To An Actionscript-loaded Movie
How can I (if possible) set actionscript (say, an on-mouse event) to a movie that I load via attachMovie()? I poked around and I couldn't seem to find an answer...

I want the movie that I load via attachMovie() to have an on(RollOver) event...any thoughts?

View Replies !    View Related
Warning: An ActionScript 1.0/2.0 SWF File Has Loaded An ActionScript 3.0 SWF;
Hi all,

I'm trying to clone an swf (produced in CS3) that has been loaded into my app (built using Actionscript/mxmlc) but keep getting the following message appear in my logs:


Code:
Warning: An ActionScript 1.0/2.0 SWF file has loaded an ActionScript 3.0 SWF; code in the ActionScript 3.0 SWF will not run.
I know the CS3 swf has been produced using Actionscript 3 as it's settings and published for FP9. It does nothing more than a motion tween of a graphic.

Here is a really simple example of how to emulate the problem:

ActionScript Code:
package{

    import flash.display.Loader;
    import flash.display.MovieClip;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.net.URLRequest;
   
    [SWF(backgroundColor=0x000000)]

    public class Test extends Sprite{
       
        private var _mc:MovieClip;
   
        public function Test():void{
       
            var mc:String = "rain.swf";
            var ldr:Loader = new Loader();
           
            ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,loadedSWF);
            ldr.load(new URLRequest(mc));
        }
       
        private function loadedSWF(e:Event):void{
           
            var mc:MovieClip = MovieClip(e.target.content);
           
            this._mc = MovieClip(new (mc.constructor)());
            this.addChild(this._mc);
        }
   
    }
}

I'm using the following version of mxmlc: Version 3.0.0 build 1844

I've also tried a slightly more convoluted way:

ActionScript Code:
package{

    import flash.display.Loader;
    import flash.display.MovieClip;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.utils.getQualifiedClassName;
    import flash.net.URLRequest;
   
    [SWF(backgroundColor=0x000000)]

    public class Test extends Sprite{
       
        private var _mc:MovieClip;
   
        public function Test():void{
       
            var mc:String = "rain.swf";
            var ldr:Loader = new Loader();
           
            ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,loadedSWF);
            ldr.load(new URLRequest(mc));
        }
       
        private function loadedSWF(e:Event):void{
           
            var c:Class = Class(e.target.applicationDomain.getDefinition(getQualifiedClassName(e.target.content)));
            this._mc = new c();
           
            this.addChild(this._mc);
        }
   
    }
}

I would like to know what's causing the warning message, am I doing something wrong?

View Replies !    View Related
Migrate ActionScript 1.0 To ActionScript 2.0 , Part 1: The Basics
This is an article discussion thread for discussing the SitePoint article, "Migrate ActionScript 1.0 to ActionScript 2.0 , Part 1: The Basics"

View Replies !    View Related
Actionscript - User Input Actionscript
I am trying to develop a way where by a users input can determine the number of fields in a form e.g. the user inputs the number 3 then the form would have 3 fields

can you show me or point me in the direction of an example i can look at and manipulate?

View Replies !    View Related
[F8] Flash6 Actionscript 2, Flash 8 Actionscript 2...help
Ok loosing it a bit now, have gone back to a very old project from a Flash 6 file, managed to convert the script language to ActionScript2, works fine as flash6 actionscript2, but once I change the project to be flash 8 I get One error......and I know where it's coming from (see below), Have come to a dead - end here, so hope that one of you guys may be able to help me....

Feel free to use this if you can get it working, just credit the designer (Me).

On the main stage MC named "site", go inside and double click on any of the MC's (named "str0, or str1 etc....all instances). Once inside an "str" MC move to frame 2 and the MC on the stage should be called "seg0 or seg1 etc...(again all instances"), go inside the MC and click on frame 1 of the actions layer. Scroll down and look for the variable named "var nummer = _parent.plus+Number(this._name.substr(3, 1));"....this always returns NaN in flash player 8, but works in flash player 6?.................help me.....I'm drowning.

link to files:
http://www.solidvision.co.uk/dev/help.zip

View Replies !    View Related
Moving A Game From Actionscript 1.0 To Actionscript 2.0...
Hi there.

I hope someone can help me out here. I have been asked to create a simple Flash memory game, and I have been given a template to use as a basis. However, this template has been created in Actionscript 1.0 for Flash player 5. I now need to transfer it over to Actionscript 2.0 Flash player 8, and Ive noticed lots of odd behaviour once it has been changed.

Here is the code....


Code:
initGame();
stop();
function initGame() {
// make sorted list of cards
cardsListOrdered = [];
for (i=1; i<=18; i++) {
cardsListOrdered.push(i, i);
}
// shuffle list
cardsListSorted = [];
while (cardsListOrdered.length>0) {
r = int(Math.random()*cardsListOrdered.length);
cardsListSorted.push(cardsListOrdered[r]);
cardsListOrdered.splice(r, 1);
}
// create card clips and assign their location and picture
x = 0;
y = 0;
for (i=0; i<36; i++) {
attachMovie("Card", "Card"+i, i);
_root["Card"+i].picture = cardsListSorted[i];
_root["Card"+i]._x = x*60+200;
_root["Card"+i]._y = y*60+50;
// move to next card spot
x++;
if (x>5) {
x = 0;
y++;
}
}
firstclip = 0;
}
function clickCard(clip) {
// see if two card are showing
if (secondclip != 0) {
// turn those two cards back over
firstclip.enabled = true;
secondclip.enabled = true;
firstclip.gotoAndStop(1);
secondclip.gotoAndStop(1);
firstclip = 0;
secondclip = 0;
}
// see if same card was clicked
if (firstclip == clip) {
// turn card back over
firstclip.gotoAndStop(1);
firstclip = 0;
// see if no cards are showing
} else if (firstclip == 0) {
// turn first card over
clip.gotoAndStop(clip.picture+1);
firstclip = clip;
firstclip.enabled = false;
// must be one card showing
} else {
// turn second card over
clip.gotoAndStop(clip.picture+1);
secondclip = clip;
secondclip.enabled = false;
// see if two cards match
if (firstclip.picture == secondclip.picture) {
// Disable both cards
firstclip.enabled = false;
secondclip.enabled = false;
firstclip = 0;
secondclip = 0;
}
}
}
When set to FlashPlayer5, all works well. If a player tries clicking the same tile twice, it stops them. Also, when a pair of tiles are uncovered, again, the user is no-longer able to press them. This was done using the "enabled = false".

However, when I change it to Flash Player 8, none of these seems to work. Ill include the .fla so someone could possibly play around with it and see where the problem is, or whether there is another way to do it....

Hope someone can help.
Many thanks

View Replies !    View Related
Convert Actionscript Flash 5 To Actionscript 2.0
any one can tell me how to convert actionscript flash 5 to actionscript 2.0??? anythings i need to take note? i reallynew in actionscript 2.0...please help me.. thanks a lot

View Replies !    View Related
Swf Actionscript 3, Load A Actionscript 2 File.
Hey dudes.

I need some help over here:
i have one banner player, and load some external swf files in actionscript 2, but the player is actionscript 3.

The files is loaded like a movie, when load a as2 files into as3. I just need a trigger when the swf file ends, when is in the last frame of movie.

Someone have a ideia in how do that?

thanks!

View Replies !    View Related
Flash ActionScript == Flex ActionScript?
Is ActionScript basically programmed the same way for Flash as it is for Flex? I know some folks who develop in AS for Flex. I didn't know if it was exactly the same for Flash, so I could tap them as a resource when I have an AS question.

Thanks,
Loren

View Replies !    View Related
Urgent :Getting Actionscript To 'pause' - Actionscript 2.0
Hi guys,

I need the actionscript to carry out a piece of code, then pause for 0.5 seconds, then carry out the next piece of code, then pause, then next code e.t.c

There will be twenty pieces of code that build up an animation with tweens that need to start at different times.

I guess its something to do with setInterval, but I'm not sure on the syntax, as there 20 pieces of code I don't want lots of nested code (though if thats the only way to do it then so be it!)

I'd really appreciate your help guys

cheers

View Replies !    View Related
Obtaining An ActionScript 2 Variable From ActionScript 3
Probably one of the most subjects on this forum has to be ActionScript 3 and ActionScript 2 communication. I found several threads on how to communicate between the two using a LocalConnection class, but there is one problem with this approach - I can't transport any values with it. Because LocationConnection.send doesn't have a return type, there is no way to transport a value from AS2 to AS3. This is very unfortunate, as I need to have access to a value that is set somewhere in the AS2 code.

I could use JavaScript as a middle layer to communicate the data between the two, but this will be a very ineffective way to achieve it. Are there any better ways for doing this?

View Replies !    View Related
ActionScript 3.0 Is 5~7 Times Slower Then ActionScript 2.0
I have a code that will translate this XML
quote:
<?xml version='1.0'?>
<Member>
<M>
<Username>Test 1</Username>
<Password>Test 1 Password</Password>
</M>
<M>
<Username>Test 2</Username>
<Password>Test 2 Password</Password>
</M>
<M>
<Username>Test 3</Username>
<Password>Test 3 Password</Password>
</M>
</Member>
Into this array
quote:
Array[0].Username = "Test 1"
Array[0].Password = "Test 1 Password"
Array[1].Username = "Test 2"
Array[1].Password = "Test 2 Password"
Array[2].Username = "Test 3"
Array[2].Password = "Test 3 Password"


Here is my variable declaration
quote:
var StartTime:Number = getTimer();
var EndTime:Number = getTimer();
var j:Number = 0;//This Variables used for ActionScript 3.0 Loop
var k:Number = 0;//This Variables used for ActionScript 3.0 Loop


Here is the XML String
quote:
var MyXMLString:String = "<?xml version='1.0'?><member><O><member_id>1</member_id><currency_id>0</currency_id><name>Administrator</name><description>Account Administrator</description><contact>-</contact><billing_info>-</billing_info><opening_payable>0.0000000000</opening_payable><opening_receivable>0.0000000000</opening_receivable><type>STAFF</type><asset_chart_of_account_id>0</asset_chart_of_account_id><liability_chart_of_account_id>0</liability_chart_of_account_id><staff_username>administrator</staff_username><staff_password>21232f297a57a5a743894a0e4a801fc3</staff_password><staff_privileges>ADMIN</staff_privileges></O><O><member_id>1</member_id><currency_id>0</currency_id><name>Administrator</name><description>Account Administrator</description><contact>-</contact><billing_info>-</billing_info><opening_payable>0.0000000000</opening_payable><opening_receivable>0.0000000000</opening_receivable><type>STAFF</type><asset_chart_of_account_id>0</asset_chart_of_account_id><liability_chart_of_account_id>0</liability_chart_of_account_id><staff_username>administrator</staff_username><staff_password>21232f297a57a5a743894a0e4a801fc3</staff_password><staff_privileges>ADMIN</staff_privileges></O><O><member_id>1</member_id><currency_id>0</currency_id><name>Administrator</name><description>Account Administrator</description><contact>-</contact><billing_info>-</billing_info><opening_payable>0.0000000000</opening_payable><opening_receivable>0.0000000000</opening_receivable><type>STAFF</type><asset_chart_of_account_id>0</asset_chart_of_account_id><liability_chart_of_account_id>0</liability_chart_of_account_id><staff_username>administrator</staff_username><staff_password>21232f297a57a5a743894a0e4a801fc3</staff_password><staff_privileges>ADMIN</staff_privileges></O></member>";
var MyXML:XML = new XML(MyXMLString);//Parse the XML ONCE


I have a function called ConvertXML , and to check the performance i made it loop every frame by calling the following RunXML function
quote:
function RunXML(Events:Event){
StartTime = getTimer();
for(var i:Number=0;i<100;i++){
var MyXMLArr:Array = ConvertXML(MyXML, false, false);
}
EndTime = getTimer();
trace(EndTime - StartTime + " ms");
}


and here is my code for parsing the variable MyXML in ActionScript 3.0 (ConvertXML function)
quote:
//Action Script 3.0 ConvertXML
import flash.xml.*;
function ConvertXML(RecvXML:XML, ChildBranch:Boolean, IsTable:Boolean):Array {
var RowArr:Array = new Array();
for (j=0; j<RecvXML.child("*").length(); j++) {
var TempObject = new Object();
for (k=0; k<RecvXML.child("*")[j].elements("*").length(); k++) {
TempObject[RecvXML.child("*")[j].elements("*")[k].name()] = RecvXML.child("*")[j].elements("*")[k];
}
RowArr.push(TempObject);
}
return RowArr;
}
addEventListener(Event.ENTER_FRAME, RunXML);


The code above run 5~7 times slower then the following actionscript 2.0 code
quote:
//Action Script 2.0 ConvertXML
function ConvertXML(RecvXML:XML, ChildBranch:Boolean, IsTable:Boolean):Array {
var RowArr:Array = new Array();
for (var aNode:XMLNode = RecvXML.firstChild.firstChild; aNode != null; aNode=aNode.nextSibling) {
var TempRecord:Object = new Object();
for (var bNode:XMLNode = aNode.firstChild; bNode != null; bNode=bNode.nextSibling) {
TempRecord[bNode.nodeName] = bNode.firstChild.toString();
}
RowArr.push(TempRecord);
}
return RowArr;
}
this.onEnterFrame = RunXML;


they both does exactly the same thing.. and yet the actionscript 3.0 code run 5~7 TIMES SLOWER . why?
i have tried other benchmark, and it seems that actionscript 3.0 perform 10 to 100 TIMES FASTER then actionscript 2.0 , only for this one it run slower... why?

I also attach all the code for actionscript 3.0
should you want to try the actionscript 2.0 , just uncomment the ConvertXML and this.onEnterFrame for actionscript 2.0 and comment the one for actionscript 3.0


Why? have i done something wrong?


Cheers and God Bless,

Chowi








Attach Code

var StartTime:Number = getTimer();
var EndTime:Number = getTimer();
var MyXMLString:String = "<?xml version='1.0'?><member><O><member_id>1</member_id><currency_id>0</currency_id><name>Administrator</name><description>Account Administrator</description><contact>-</contact><billing_info>-</billing_info><opening_payable>0.0000000000</opening_payable><opening_receivable>0.0000000000</opening_receivable><type>STAFF</type><asset_chart_of_account_id>0</asset_chart_of_account_id><liability_chart_of_account_id>0</liability_chart_of_account_id><staff_username>administrator</staff_username><staff_password>21232f297a57a5a743894a0e4a801fc3</staff_password><staff_privileges>ADMIN</staff_privileges></O><O><member_id>1</member_id><currency_id>0</currency_id><name>Administrator</name><description>Account Administrator</description><contact>-</contact><billing_info>-</billing_info><opening_payable>0.0000000000</opening_payable><opening_receivable>0.0000000000</opening_receivable><type>STAFF</type><asset_chart_of_account_id>0</asset_chart_of_account_id><liability_chart_of_account_id>0</liability_chart_of_account_id><staff_username>administrator</staff_username><staff_password>21232f297a57a5a743894a0e4a801fc3</staff_password><staff_privileges>ADMIN</staff_privileges></O><O><member_id>1</member_id><currency_id>0</currency_id><name>Administrator</name><description>Account Administrator</description><contact>-</contact><billing_info>-</billing_info><opening_payable>0.0000000000</opening_payable><opening_receivable>0.0000000000</opening_receivable><type>STAFF</type><asset_chart_of_account_id>0</asset_chart_of_account_id><liability_chart_of_account_id>0</liability_chart_of_account_id><staff_username>administrator</staff_username><staff_password>21232f297a57a5a743894a0e4a801fc3</staff_password><staff_privileges>ADMIN</staff_privileges></O></member>";
var MyXML:XML = new XML(MyXMLString);//Parse the XML ONCE
var j:Number = 0;//This Variables used for ActionScript 3.0 Loop
var k:Number = 0;//This Variables used for ActionScript 3.0 Loop
/*
//Action Script 2.0 ConvertXML
function ConvertXML(RecvXML:XML, ChildBranch:Boolean, IsTable:Boolean):Array {
var RowArr:Array = new Array();
for (var aNode:XMLNode = RecvXML.firstChild.firstChild; aNode != null; aNode=aNode.nextSibling) {
var TempRecord:Object = new Object();
for (var bNode:XMLNode = aNode.firstChild; bNode != null; bNode=bNode.nextSibling) {
TempRecord[bNode.nodeName] = bNode.firstChild.toString();
}
RowArr.push(TempRecord);
}
return RowArr;
}
this.onEnterFrame = RunXML;
*/

//Action Script 3.0 ConvertXML
import flash.xml.*;
function ConvertXML(RecvXML:XML, ChildBranch:Boolean, IsTable:Boolean):Array {
var RowArr:Array = new Array();
for (j=0; j<RecvXML.child("*").length(); j++) {
var TempObject = new Object();
for (k=0; k<RecvXML.child("*")[j].elements("*").length(); k++) {
TempObject[RecvXML.child("*")[j].elements("*")[k].name()] = RecvXML.child("*")[j].elements("*")[k];
}
RowArr.push(TempObject);
}
return RowArr;
}
addEventListener(Event.ENTER_FRAME, RunXML);


function RunXML(Events:Event){
StartTime = getTimer();
for(var i:Number=0;i<100;i++){
var MyXMLArr:Array = ConvertXML(MyXML, false, false);
}
EndTime = getTimer();
trace(EndTime - StartTime + " ms");
}

























Edited: 10/09/2008 at 12:17:57 AM by M4G1C14N

View Replies !    View Related
URGENT How Do I Get Actionscript To Pause Actionscript 2.0
Hi guys,

sorry to repost, I know its an annoying thing to do, but this is pretty urgent on a project I'm doing.

I need the actionscript to carry out a piece of code, then pause for 0.5 seconds, then carry out the next piece of code, then pause, then next code e.t.c

There will be twenty pieces of code that build up an animation with tweens that need to start at different times.

I guess its something to do with setInterval, but I'm not sure on the syntax, as there 20 pieces of code I don't want lots of nested code (though if thats the only way to do it then so be it!)

I'd really appreciate your help guys

cheers

View Replies !    View Related
Help: This Works In Actionscript 1 But I Need It To Work In Actionscript 2
I have some scrolling navigation that works when published using actionscript 1 but not actionscript 2. I need to use actionscript 2 because it supports the streaming video that I'm trying to navigate. Can someone help me rewrite my button logic to get the scroll bar to work as it did in actionscript 1? Please see my fla if necessary, but here is the area I need help with.

if (Number((getProperty("../scrollhandle", _y)))>Number((Number(../:top)+Number((../:speed/(../:height/../:scrolllength)))))) {
setProperty("../scrollhandle", _y, (getProperty("../scrollhandle", _y)-(../:speed/(../:height/../:scrolllength))));
} else {
setProperty("../scrollhandle", _y, ../:top);
}
tellTarget ("../scrollhandle") {
gotoAndPlay(3);
}

the error that I get is:

**Error** Symbol=buttonlogic, layer=Layer 1, frame=2:Line 1: Operator '>' must be followed by an operand
if (Number((getProperty("../scrollhandle", _y)))>Number((Number(../:top)+Number((../:speed/(../:height/../:scrolllength)))))) {

**Error** Symbol=buttonlogic, layer=Layer 1, frame=2:Line 2: Operator '-' must be followed by an operand
setProperty("../scrollhandle", _y, (getProperty("../scrollhandle", _y)-(../:speed/(../:height/../:scrolllength))));

**Error** Symbol=buttonlogic, layer=Layer 1, frame=2:Line 4: Unexpected '.' encountered
setProperty("../scrollhandle", _y, ../:top);

Please help if you can.

View Replies !    View Related
Actionscript 3 Tutorials For Actionscript Beginners
hey all, looking for some tutorials on actionscript 3 for people who are relatively new to actionscript altogether? Finding loads of tutorials but they seem to expect u to already have a grasp of actionscript 2!!

cheers in advance!

View Replies !    View Related
Works In Actionscript 1.0, Not Actionscript 2.0, Help?
Any idea why this would work fine in Flash MX but not MX 2004 Pro? I'm new to the upgrade but I can't imagine why this doesn't work.

_root.mission.gotoAndStop("mission");

I'm publishing in Actionscript 1.0 so I don't see what the difference would be.

Thank you much!

View Replies !    View Related
Converting ActionScript 1 To ActionScript 2
Flash keeps giving me a "type mismatch" error for this particular line of code:
myItemArray[x] = parseInt(Math.random()*9) + myItemArray[x];
Based on my research it's because it's old script and I'm not sure how to go about converting it so I don't get the error. I've pasted the entire block of code for your understanding. Thanks in advance for you help.

Code:
//Build array
myItemArray = new Array("a1","a2","a3","a4","a5","a6","b1","b2","b3" ,"b4","b5","b6");
for(var x = 0; x < 12; x++){
myItemArray[x] = parseInt(Math.random()*9) + myItemArray[x];
}
//Sort array
myItemArray.sort();
//Strip off random num at beginning
for (var x = 0; x < 12; x++){
myItemArray[x] = myItemArray[x].substr(1,myItemArray[x].length);
}

View Replies !    View Related
Works On ActionScript 1.0 But Not On ActionScript 2.0
The following code works if you have your flash file set to:
Flash Player 6
Action Script 1

I need it to work for
Flash Player 7
Action Script 2

What it does is that basically if i have
1 2 3 4 5
and i click on the 5 it will arrange the movie clips so they will be
5 1 2 3 4

mc is the name for action script of the movie clip i'm using

I think
the function that doesn't work correctly is the move function

HOW CAN I FIX THIS Sad

Code:
var acceleration = 12;
var friction = 0.7;
clipArray = [];
posArray = [];
for (var k = 0; k<5; k++) {
myclip = attachMovie("mc", "mc"+k, k);
myclip._y = 100;
myclip._x = 170+myclip._width*k;
//myclip.myText.text = "Button "+k;
clipArray.push(myclip);
//countArray.push(k);
posArray.push(myclip._x);
myclip.onPress = dostuff;
}
function move() {
var xdif = posArray[this.jvar]-this._x;
this.xspeed += xdif/this._parent.acceleration;
this.xspeed *= this._parent.friction;
this._x += this.xspeed;
this.checkDistance();

}
checkDistance = function () {
if (Math.abs(posArray[this.jvar]-this._x)<1) {
this._x = posArray[this.jvar];
delete this.onEnterFrame;
}
};
function dostuff() {
for (var i = 0; i<clipArray.length; i++) {
// setting indexes
clipArray[i].ivar = i;;
}
// deleting the mc the user clicked
k = clipArray.splice(this.ivar, 1);

// the mc you click is on the front
clipArray = k.concat(clipArray);

for (var j = 0; j<posArray.length; j++) {
// re setting the indexes
clipArray[j].jvar = j;
trace(clipArray[j]+" "+clipArray[j].jvar);
// calls move
clipArray[j].onEnterFrame = move;
}
}

View Replies !    View Related
The Difference Between Actionscript 1 And Actionscript 2?
What's the difference between Actionscript 1 and Actionscript 2? was actionscript 1 used in earlier versions of flash like flash 5?

View Replies !    View Related
ActionScript 1.0 To ActionScript 2.0 Converter
Guys i need an extansion or anything that converts my actionscript 1.0 script to actionscript 2.0 . anything ? software application anything ? plz reply . thanks

View Replies !    View Related
Actionscript 2.0 Convert To Actionscript 3.0
Hello Everyone,

I have the code below which was created for Actionscript 2.0... I was hoping someone could help me convert to Actionscript 3.0.

If there is anyone that could help me out I would greatly appreciate it.

Thanks,
Alan


var mouse_control:Boolean = true;

var speed:Number = 0;

var mouse_force:Number = 100;

map_color_mc.gotoAndStop("1");
var stop_motion:Boolean = false;
var front_map_position:Number = front_map_mc._x=0;
var reverse_map_postion:Number = reverse_map_mc._x=0;
var centerX:Number = Stage.width/2;
point_mc.duplicateMovieClip("point_mc2", -16367);
point_mc2._x = point_mc._width;
point_mc2._y = point_mc._y;
this.onEnterFrame = function() {
if (stop_motion == false) {
if (mouse_control) {
speed = ((_xmouse-centerX)/mouse_force);
}
front_map_position += speed;
reverse_map_postion -= speed;
if (front_map_position>0) {
front_map_position = -(front_map_mc._width/2);
}
if (front_map_position<(front_map_mc._width/2)*-1) {
front_map_position = 0;
}
if (reverse_map_postion>0) {
reverse_map_postion = -(reverse_map_mc._width/2);
}
if (reverse_map_postion<(reverse_map_mc._width/2)*-1) {
reverse_map_postion = 0;
}
point_mc._x = front_map_mc._x=front_map_position;
point_mc2._x = point_mc._x+point_mc._width;
reverse_map_mc._x = reverse_map_postion;
}
};
globe_hit_mc.onRollOver = function() {
if (mouse_control == false) {
stop_motion = true;
}
};
globe_hit_mc.onRollOut = function() {
if (mouse_control == false) {
stop_motion = false;
}
};

View Replies !    View Related
Importing Actionscript Into Actionscript
I've got a game and I've got too much actionscript.
So I'm wondering if it's posible to import an external actionscript file into the code on the maibn SWF file.
This would also give the user a chance to edit basic vaiables, eg. speed, jumpHeight etc.

Any ideas?

View Replies !    View Related
Set Movieclips's Actionscript Using Actionscript
Right now, I have a button that attaches a movie clip. However, I need to attach some code to the movie clip, once it's been added. How would I do that?
Edit: Otherwise, would there be any way to automaticly attach it to any movie clip sharing the same instance name?

View Replies !    View Related
Actionscript 2.0 &#8594; Actionscript 3.0
Hi,

Since I'm no expert in it, it took me time to get used to some Actionscript 2.0 codes. Now I'm trying to work on Actionscript 3.0, but I don't know that much about it. I have a script that I want to convert from 2.0 to 3.0. Here it is:


ActionScript Code:
g_list.addItem({label:"Wikipedia", data:"Wikipedia"});
g_list.addItem({label:"Yahoo", data:"Yahoo"});
var listHandler:Object = new Object();
listHandler.change = function(ntt:Object) {
    switch (ntt.target.selectedItem.data) {
    case "Wikipedia" :
        getURL ("http://www.wikipedia.org");
        break;
    case "Yahoo" :
        getURL ("http://www.yahoo.com");
        break;
    default :
        trace("unhandled event: "+ntt.target.selectedItem.data);
        break;
    }
};
g_list.addEventListener("change", listHandler);

Can anyone help me, please?

View Replies !    View Related
Migrate Actionscript 3 To Actionscript 2
Hello,

I have a problem migrating from AS3 to AS2.

I have the following code:

class Main extends MovieClip {
var g1:Graph;
function Main() {
g1 = new Graph(); // I create a new instance on Graph
addChild(g1); //add it to this movieclip
g1.startup(); //in startup I add several instances on Elem to g1
}
function updateElems()
{
for(var i:Number = 0; i < g1.numChildren; i++)//I iterate through childrens to update them
{
var elem:Elem = g1.getChildAt(i) as Elem;
elem.update();
}
}
}

I create an AS3 project and associate the stage to the Main class that adds a child - g1 - of type Graph using addChild(), then I add several Elem instances to Graph using addChild().

While running I need to update the Elem instances so I iterate through g1's children of type Elem, using getChildAt(i=0, numChildren).

I need to port this to AS2

In AS2
- there's no fl.core.UIComponent (I've used mx.core.UIComponent)
- mx.core.UIComponent doesn't have getChildAt and addChild methods

The questions are:
a) how can I add Main class to stage as I cannot link it from the user interface as this feature is only supported with as3?
b) how can I add g1 to Main?
c) how can I add instances of Elem to g1
c) how can I iterate through the children of g1, the Elem instances and update them?

Thanks!

View Replies !    View Related
Can You Have One Actionscript 3.0 Work With Actionscript 2.0?
Hi
I am creating a scrollbar with dynamic text in actionscript 3.00 for my website but all my other swf's are actionscript 2.0 is there anyway I can make them work together?
thanks
matt

View Replies !    View Related
Actionscript 3 Support Actionscript 2?
Hi
I would want to ask whether if currently, all the object, functions, classes in actionscript 2 can be rewritten in actionscript 3?
E.g (its just an example), actionscript 2 have Math class, and actionscript 3 also has Math class??

Hope everyone here can understand what I mean. Thanks.

View Replies !    View Related
Works On ActionScript 1.0 But Not On ActionScript 2.0
The following code works if you have your flash file set to:
Flash Player 6
Action Script 1

I need it to work for
Flash Player 7
Action Script 2

What it does is that basically if i have
1 2 3 4 5
and i click on the 5 it will arrange the movie clips so they will be
5 1 2 3 4

mc is the name for action script of the movie clip i'm using

I think
the function that doesn't work correctly is the move function

var acceleration = 12;
var friction = 0.7;
clipArray = [];
posArray = [];
for (var k = 0; k<5; k++) {
myclip = attachMovie("mc", "mc"+k, k);
myclip._y = 100;
myclip._x = 170+myclip._width*k;
//myclip.myText.text = "Button "+k;
clipArray.push(myclip);
//countArray.push(k);
posArray.push(myclip._x);
myclip.onPress = dostuff;
}
function move() {
var xdif = posArray[this.jvar]-this._x;
this.xspeed += xdif/this._parent.acceleration;
this.xspeed *= this._parent.friction;
this._x += this.xspeed;
this.checkDistance();

}
checkDistance = function () {
if (Math.abs(posArray[this.jvar]-this._x)<1) {
this._x = posArray[this.jvar];
delete this.onEnterFrame;
}
};
function dostuff() {
for (var i = 0; i<clipArray.length; i++) {
// setting indexes
clipArray[i].ivar = i;;
}
// deleting the mc the user clicked
k = clipArray.splice(this.ivar, 1);

// the mc you click is on the front
clipArray = k.concat(clipArray);

for (var j = 0; j<posArray.length; j++) {
// re setting the indexes
clipArray[j].jvar = j;
trace(clipArray[j]+" "+clipArray[j].jvar);
// calls move
clipArray[j].onEnterFrame = move;
}
}

View Replies !    View Related
ActionScript 2.0 To ActionScript 1.0 Using Flash 8
Hi there, I've a contact form with input fields, but, in some area of this form I've placed a combobox drop down menu, wich is a component, I'm using flash 8, so everything was working fine untill my client saids he needs that working in Actionscript 1.0 and the movie published for the flash player version 6, in my button I've this code

on (release) {
Enquiry = (comboBox1.getSelectedItem().label);
_root.test.text = este;
gotoAndPlay("gracias");
this.loadVariables("contacts.php", "POST");
}

thing here is because of the player version update now my dropdown menu is not working, just wondering if somebody can help me with this?

Thanks a lot!!


Arturo

View Replies !    View Related
Actionscript 1.0 To Actionscript 2.0 Conversion, Help
Hi guys,
Straight to the point. I found this skewing prototype in laco tweener web. And it was in actionscript 1.0 can u convert this code so its compatible with flash8 & actionscript 2.0 please? I can't seem to know what's wrong in here that I cant play it in as2.
------------------------------------------------------------------------------
var mp = MovieClip.prototype;
mp.setXskew = function(value) {
var _xskew = value;
//this._xskew = value;
//
var _yskew = this._yskew;
// add properties to movieclip
if (!this.inner_mc) {
// defines inner_mc clip needed to skew
for (var clips in this) {
if (typeof (this[clips]) == "movieclip") {
this.inner_mc = this[clips];
// finds first movieclip and uses it to skew
break;
}
}
if (!this.inner_mc) {
return trace("No interior clip for skewing found in "+this._name+".");
// error if inner not found
} else {
this.inner_mc._rotation = -45;
}
// assure clip is rotated -45 degrees
}
var toRads = Math.PI/180;
// converts degrees to radians
var xr = _xskew*toRads;
// skew in radians
var yr = _yskew*toRads;
var cosxr = Math.cos(xr);
// cosine of skew
var cosyr = Math.cos(yr);
this._rotation = 45+(_xskew+_yskew)/2;
// rotate this clip accordingly
var div = Math.sin(this._rotation*toRads)*.707106781186547;
//div: divisor - sin rotation *sin 45 degrees;
if (!div) {
div = .0000001;
}
// prevents dividing by 0 which you just... cant... do
this._xscale = 100*(Math.sin(yr)+cosxr)/div;
// scaling for skew
this._yscale = 100*(Math.sin(xr)+cosyr)/div;
this.inner_mc._yscale = this.inner_mc._xscale=50/cosyr;
// scaling inner to maintain width/height
// = base_yscale*.5/cosxr;
};
ASSetPropFlags(mp, "setXskew", 1, 0);
//
mp.getXskew = function() {
return this._xskew;
};
ASSetPropFlags(mp, "getXskew", 1, 0);
//
mp.setYskew = function(value) {
var _xskew = this._xskew;
//
var _yskew = value;
//this._yskew = value;
// add properties to movieclip
if (!this.inner_mc) {
// defines inner_mc clip needed to skew
for (var clips in this) {
if (typeof (this[clips]) == "movieclip") {
this.inner_mc = this[clips];
// finds first movieclip and uses it to skew
break;
}
}
if (!this.inner_mc) {
return trace("No interior clip for skewing found in "+this._name+".");
// error if inner not found
} else {
this.inner_mc._rotation = -45;
}
// assure clip is rotated -45 degrees
}
var toRads = Math.PI/180;
// converts degrees to radians
var xr = _xskew*toRads;
// skew in radians
var yr = _yskew*toRads;
var cosxr = Math.cos(xr);
// cosine of skew
var cosyr = Math.cos(yr);
this._rotation = 45+(_xskew+_yskew)/2;
// rotate this clip accordingly
var div = Math.sin(this._rotation*toRads)*.707106781186547;
//div: divisor - sin rotation *sin 45 degrees;
if (!div) {
div = .0000001;
}
// prevents dividing by 0 which you just... cant... do
this._xscale = 100*(Math.sin(yr)+cosxr)/div;
// scaling for skew
this._yscale = 100*(Math.sin(xr)+cosyr)/div;
this.inner_mc._yscale = this.inner_mc._xscale=50/cosxr;
// scaling inner to maintain width/height
//
};
ASSetPropFlags(mp, "setYskew", 1, 0);
//
mp.getYskew = function() {
return this._yskew;
};
ASSetPropFlags(mp, "getYskew", 1, 0);
//
mp.addProperty("_xskew", mp.getXskew, mp.setXskew);
ASSetPropFlags(mp, "_xskew", 1, 0);
mp.addProperty("_yskew", mp.getYskew, mp.setYskew);
ASSetPropFlags(mp, "_yskew", 1, 0);
delete mp;

------------------------------------------------------------------------------

and here's the code for the press button.
#include "lmc_tween.as"
//
skew_btn.onPress = function() {
squares_mc_xskew = random(180);
squares_mc.tween("_xskew", squares_mc_xskew, 1, 'easeInOut');
//
squares_mc_yskew = 180;
squares_mc.tween("_yskew", squares_mc_yskew, 1);
};

------------------------------------------------------------------------------

Thanks in advance!

View Replies !    View Related
Works On ActionScript 1.0 But Not On ActionScript 2.0
The following code works if you have your flash file set to:
Flash Player 6
Action Script 1

I need it to work for
Flash Player 7
Action Script 2

What it does is that basically if i have
1 2 3 4 5
and i click on the 5 it will arrange the movie clips so they will be
5 1 2 3 4

mc is the name for action script of the movie clip i'm using

I think
the function that doesn't work correctly is the move function

var acceleration = 12;
var friction = 0.7;
clipArray = [];
posArray = [];
for (var k = 0; k<5; k++) {
myclip = attachMovie("mc", "mc"+k, k);
myclip._y = 100;
myclip._x = 170+myclip._width*k;
//myclip.myText.text = "Button "+k;
clipArray.push(myclip);
//countArray.push(k);
posArray.push(myclip._x);
myclip.onPress = dostuff;
}
function move() {
var xdif = posArray[this.jvar]-this._x;
this.xspeed += xdif/this._parent.acceleration;
this.xspeed *= this._parent.friction;
this._x += this.xspeed;
this.checkDistance();

}
checkDistance = function () {
if (Math.abs(posArray[this.jvar]-this._x)<1) {
this._x = posArray[this.jvar];
delete this.onEnterFrame;
}
};
function dostuff() {
for (var i = 0; i<clipArray.length; i++) {
// setting indexes
clipArray[i].ivar = i;;
}
// deleting the mc the user clicked
k = clipArray.splice(this.ivar, 1);

// the mc you click is on the front
clipArray = k.concat(clipArray);

for (var j = 0; j<posArray.length; j++) {
// re setting the indexes
clipArray[j].jvar = j;
trace(clipArray[j]+" "+clipArray[j].jvar);
// calls move
clipArray[j].onEnterFrame = move;
}
}

View Replies !    View Related
Converting Actionscript 1.0 To Actionscript 2.0
Last edited by funkyflash : 2006-01-18 at 11:06.
























This code goes in Frame 1:

ActionScript Code:
//          script by Jae Young, Choi
//            on Designers Forum (corea)
 
Movieclip.prototype.elasticScale = function(target, accel, convert) {
    xScale = xScale * accel + (target - this._xscale) * convert
    yScale = yScale * accel + (target - this._yscale) * convert
    this._xscale += xScale
    this._yscale += yScale
}


This code goes on the movieClip:


ActionScript Code:
onClipEvent (enterFrame) {
    if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
        elasticScale(150, .75, 0.1)
        trace ("x=" + xscale)
        trace ("x2=" + (target - this._xscale))
    } else {
        elasticScale(100, .75, 0.1)
        trace ("x=" + xscale)      
        trace ("x2=" + (target - this._xscale))
    }
}

View Replies !    View Related
ActionScript 2.0 To ActionScript 3.0 Migration
Here's a Livedoc published by MM giving an overview of the differences between 2.0 and 3.0. This is geared as a reference for Flex 2.0, but I would assume that this would apply as well to anyone who's going to be jumping into 3.0 with Flash.

Big and exciting changes. ActionScript is really shaping up to be a serious platform language. Long live Flash!

http://livedocs.macromedia.com/labs/...migration.html

View Replies !    View Related
Actionscript 1.0 To Actionscript 2.0 Problem
ok my problem may or may no be something you guys can help me with... i downloaded a preloader tutorial from actionscript.org and i love the preloader but the problem is it doesn't work with actionscript 2.0 or at least that's what i think is the case. as it is right now i can't figure out any other reason other then the fact that it was created on flash mx and i use mx 2004. the reason i think it's a difference between AS 1.0 and 2.0 is that when i just transfer my documents and everything directly into the tutorial page, format it to the same size and everything, the preloader works but the easing code i use doesn't, and if i'm not mistaken that's something for AS 2.0. is there a way i can convert the script over? i'm not sure how to do it really if anyone knows can you help? here it is:

ActionScript Code:
onClipEvent (enterFrame) {
    loading = _parent.getBytesLoaded();
    total = _parent.getBytesTotal();
    percent -= (percent-((loading/total)*100))*.25;
    per = int(percent);
    percentage = per+"%";
    loadBar._width = per;
    if (percent>99) {
        _parent.gotoAndPlay(2);
    }
}

View Replies !    View Related
[CS3] Needs Help Converting Simple Flash 5 Actionscript 1.0 To Flash 8 Actionscript 2
Hi, can anyone help me convert this code to actionscript 2.0
I will separate it into the frames its on.

Frame 1
i = 1;
max = 60;
x = getProperty("fire", _x);

Frame 2
if (Number(i)<=Number(max)) {
duplicateMovieClip("fire", "fire" add i, i);
i = Number(i)+1;
}

Frame 3
if (Number(i)<=Number(max)) {
duplicateMovieClip("fire", "fire" add i, i);
i = Number(i)+1;
}
gotoAndPlay(2);

Thanks i appreciate any help

View Replies !    View Related
Actionscript To Javascript ..any Actionscript Hero Or Javascript Guru?
Hi..everybody..

i just like to know..if anyone could tell me is it possible to pass a variable from actionscript to javascript ?
eg.
password = inputName
login = login
boolean gate == fales;

if (password == "temp" && login =="login"){
answer = "Access granted!" ;
getURL("temp.html",_self);

} else {
answer = "Access denied!" ;
}

because my login page was made in flash..however, after i found out that user could type in url direct access to the web, i made a redirect meta tag ,redirect that web to login page..however, its does work out..because those 2 pages are not passing login success to another...>__<
thanks you..

anythingokay

View Replies !    View Related
Flash 8 V. Flash MX 2004, ActionScript, Actionscript 3
I have a question:

Could someone explain the material differences between Flash 8 and Flash MX 2004, ActionScript and ActionScript 3?

Can Flash 8 ($699 retail version) do everything that the other three can do?

Thank you very much for your time and response.

View Replies !    View Related
Actionscript 2 Localconnection Talking To Actionscript 3 Localconnection
We have a whole site written using LocalConnection in AS 3, however, one of our managers wants us to use a component that was written in AS 2 for a menu bar. Is it possible to have the AS2 menu utilize LocalConnection to trigger functions in our AS 3 LC listener?

View Replies !    View Related
Can Anyone Convert This Actionscript 2.0 Code To Actionscript 3.0 Code ?
Hi, I'm a graphic designer and I've used this system since the last two years. I would like to convert it on to actionscript 3.0 but I am not a programmer. Can someone help me please? Thank you!

on(rollOver){
txt.gotoAndPlay("entrada")
}
on(rollOut){
txt.gotoAndPlay("salida")
}

on (release) {
_parent.navegate("clip01")

if (_parent.anterior != "occitane") {
_parent[_parent.anterior].gotoAndPlay("salida");
}
_parent.anterior = "occitane";
_root.navigate("occitane");
}

================================================== ===

function navigate(destino) {
if (firstime != false) {
_root.currentSection = destino;
_root.gotoAndPlay("salida");
firstime = false;
} else {
_root.currentSection = destino;
_root.contenedor.gotoAndPlay("salida");
}
}

================================================== ===

salida = "salida00"
function navegate(destino){
this.destino=destino
this.gotoAndPlay(salida)
salida = "salida" + destino
//salida = "salida" add destino
}
stop()

================================================== ===

fscommand("showmenu", "false");
fscommand("allowscale", "false");

Stage.scaleMode = "noscale";
//-----------------------
var StageWidth:Number = 1000;
var StageHeight:Number = 546;
function escalaFondo()
{
if (Stage.width > Stage.height) {
fondo._width = Stage.width;
fondo._yscale = fondo._xscale;
} else {
fondo._height = Stage.height;
fondo._xscale = fondo._yscale;
}

fondo._x = (StageWidth - fondo._width) / 2;
fondo._y = (StageHeight - fondo._height) / 2;
}
//-----------------------
Stage.addListener(this);
this.onResize = escalaFondo;
escalaFondo();
//-----------------------

View Replies !    View Related
Actionscript For MC, Please Tell Me.
Hi everybody.
I just want to know if I have on the scene a Mc(called "Defi") with inside 2 MC: "Duploop" and "Red".
On the scene, I have a button who launch "Duploop".

I must use this script inside the MC "Loop":

duplicateMovieClip (_parent._parent.Red, "Red" add CopyCount, CopyCount);

the script for my button:
on (release) {
_parent._parent.Duploop.play();
}

or

_parent.defi.Red,....
_parent.defi.Duploop.play

Thanks.

View Replies !    View Related
ActionScript
Hi
i draw a circle i want zoom this circle without tweening.How can i do with actionscript.Please some help me.

thank u

View Replies !    View Related
Actionscript
Hi there,

I was wondering if anyone knows any good links to sites that can teach you basic action scripting. I am now getting very into flash and am realizing that if I know actionscript, it would make things much easier! Also if you know any good books on actionscripting, I am open.

My e-mail is Karate_Kid_15@hotmail.com if you would rather e-mail me.

Thanks a lot!

View Replies !    View Related
ActionScript Help
Hi
I need to have a Stop Watch(like a timer), which on click Start (say a Button) it should start counting from 00:00.
I tried using myDate.getSeconds() & myDate.getMillisecods(),
this shows the system time which i dont want.
Any other method is there...
If u have samples pls give me the URL

Cheers

View Replies !    View Related
ActionScript
Hi
on clipevent(enterframe)
this._xscale=(this,_xscale)+2
this._xscale=(this._xscale)+2

I am doing this to zoom movie clip but it won't stop it keep zooming how can i put stop button to stop when ever i want to stop.Please some one help me.

thank u

View Replies !    View Related
Help In Actionscript
the code below....ok...
how do i make "newly made targets" is equal to "H"?

How to make _root.target+i.output_letter="H"; this code to do this.....

_root.target1.output_letter="H";
_root.target2.output_letter="H";
_root.target3.output_letter="H";
...
...
...

where 1,2 ,3...n where n values are equal to the i value in the loop.



on (release) {
gotoAndPlay ("WithoutRestriction3", 1);

if(n>1){for (var k=1;k<(n+1);k++){removeMovieClip("target"+k);}}

for (var i=1; i<(_root.word_confirm.length); i++) {
duplicateMovieClip ("target", "target"+i, i);
setProperty ("target"+i, _X, target._X+38*i);
eval("target"+i+".output")=i;
//_root.target+i.output_letter="H"; /*i need help here!*/
}
n=i;


}

View Replies !    View Related
Help Me...in Actionscript
PART A
i have an array
EG.
my array: 1,2,1,3,1,1,1,4
extracted array: 2,3,4

i wan to extract onli the values above 1 and put them in another new array.
then from there i wan to display input textboxes according to number of number element
of elements in the "newly extracted array"

so in the EXAMPLE's case, it would provide 3 textboxes.
.................................................





u see i am trying to make an "equation" type of question for the user to input.
something like this:

EG.
_! x _! x _!

imagine "_" represents the textboxes (from part A) that i wan to appear...so how do i keep
updating where the "x" or multiplication sign and also the "!" or factorial?



so how do i do all this?....pls help mi if u can
I'd really appreciate it..thanks
PSls dun ask wat a factorial is...its got something to do with probability....i'm sick of it already..
[Edited by darfiszie on 06-27-2001 at 01:23 PM]

View Replies !    View Related
Actionscript And Me Don't Mix
i'm just having a really hard time understand actionscript, like it doesn't make since to me, and that makes it hard to learn, and i don't wanna just copy script from a page each time i need to do somethnig, does anyone know a place that goes through it all in good detail and good explanation?
thx for the help

View Replies !    View Related
XML And ActionScript
Maybe I'm missing something, but when I search for tutorials on XML and ActionScript, i find tutorials teaching me how to do almost everything with XML apart from feed my dog.
All I want to do is load ONE string from an XML document, to use in a text box that moves right to left - creating a dynamic ticker tape display that can be updated easily from a web page.
It seems that this is 'too simple' to warrant a tutorial, leaving a fairly flash-savvy, actionscript novice, and XML newbie me; baffled.
HELP!

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved