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




What The... Mac/pc Behaviour



hi,
i've developped a flash navigation piece on the pc (flash 5 but done with flash 4 functionality and saved as flash 4 compatible) and tested it and it worked no problem, when i viewed it on the mac (OS X, I.E. flash 5 player) the get URL was behaving erratically and screwing up all links. Has anybody else experienced that too? any insight?
thanks all.



FlashKit > Flash Help > Flash ActionScript
Posted on: 07-19-2001, 10:45 AM


View Complete Forum Thread with Replies

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

Synchronizing Class Behaviour With Timeline Behaviour
I have been asking a lot of questions that tie into a jigsaw puzzle project I am working on. Here's another

The user places the jigsaw puzzle pieces in their correct places. This is all done in frame 1 using Actionscript in the document class and the puzzle piece classes.

After successful completion of the puzzle I issue the command this.gotoAndPlay(2) from the document class, and this starts in frame 2 a "congratulations" animation. This animation is created by animators, and I don't know how many frames long it will finally be.

So in a way, you can think of it as two seperate worlds between frame 1 (which is my "programmer space", using the document class and piece classes) and frame 2 onwards (which is the "animator space", using the timeline).

There will be various unused puzzle pieces strewn around the board when the user completes the puzzle. The requirement is that starting in frame 2 they fade out while the "congratulations" animation is playing, for the duration of the animation.

Since this is to happen from frame 2 and beyond I wanted to leave it to the animators, but the problem is that they don't know where the pieces are going to be lying starting in frame 2. During the actual game (in frame 1) they may have moved the pieces anywhere.

So I have two questions:

1) (a non-Actionscript question) Is there a way to start fading out objects on the stage from a particular frame without knowing their positions on the stage, and without using Actionscript?

and

2) (an Actionscript + timeline question) If I do have to fade out the pieces using Actionscript, well, that in itself is easy enough by progressively changing the alpha value, but is there a way to sync it with the animation? Maybe if I just know how many frames long the "congratulations" animation is I should be able to space it out correctly.

However I am not very knowledgeable about integration between what's happening in the timeline and what's happening in the document class. I do realize that the document class IS the timeline. So perhaps what I need is to be notified each time the playhead moves a frame using the ENTER_FRAME event? I suppose this would be a solution but as a newbie I'm wondering if there is a better way. I don't like the fact that I'd have to know in advance how long the "congratulations" animation is going to be.

Odd Behaviour
dunno if there is a reason to this but it seem pretty odd.


ActionScript Code:
package {
    import flash.display.Sprite;
    import flash.events.*;
   
    public class menuBox extends Sprite {
       
    private var initW:int;
    private var initH:int;
    private var initX:int;
    private var initY:int;
    private var colour:int;
    private var myID:int;
    private var total:int;
   
        public function menuBox(initW, initH, initX, initY, colour, total, parent, myID) {
            this.x = initX;
            this.y = initY;

        // create bg box
            graphics.lineStyle(1,0xFFFFFF,100);
            graphics.beginFill(colour, 0);
            graphics.moveTo(0, 0);
            graphics.lineTo(initW, 0);
            graphics.lineTo(initW, initH);
            graphics.lineTo(0, initH);
            graphics.endFill();
            this.addEventListener(MouseEvent.MOUSE_OVER, rollover);
        } // end constructor
       
        public function rollover(ev:MouseEvent) {
            trace(ev.target.parent.activated);
            trace(parent.activated);
            trace(ev.target.parent);
            trace(parent);
        } // end rollover
       
    } // end class
} // end package

basically in the rollover function, tracing ev.target.parent and parent gives the same result, the parent object, tracing ev.target.parent.activated traces the correct result but tracing parent.activated gives an error saying the property doesnt exist.

FLV Behaviour
Hello All,

How could make a swf interact with a FLV? All I want is to, once the flv reach a particular point, the swf goes to a different scene.

Many thanks

Odd Behaviour
I Made A Header In Flash Mx, And Its Behaiour Is Very Odd.
It Works Fine When I Test It While Making It, But It Goes Upside Down And Causes An IE Error When IT Is On A Page.

Any Ideas What The Problem May Be And How To Fix It?
Thanks,
Cory

Strange .swf Behaviour
in my "home" .swf i have a dummy movie clip in which i load other .swf's. things worked fine until i tried to load a .swf with a scroller into it. the .swf loads and is visible, but the scroller won't work. it's strange 'cause buttons and movie clips work fine, but not the scroller. what could have gone wrong? (of course the scroller works if i run the .swf outside the "home" .swf) please lead me to the right direction...

thanks,
taipan

Behaviour Of Z-axis
I'm doing a 3D application using Flash. I need to introduce the z-axis to my current script. I have a few questions. For z-axis, are points nearer to you positive or negative? Also, when the z-coordinate of one of my movie clips is changing constantly, I need to change its size too, to give an illusion of 3D. How do I change the movie clip's size according to its z-coordinate? Use x-scale / y-scale? Can give an example? Thanks in advance!

Very Strange MC Behaviour
Ok. Make an MC containing a text box with a word (anyoword)
Then make a button with the code to rotate the MC you just made. _root.YourMC._rotation=10 (or any angle).

Ok this works fine right ?

Ok now edit the MC and change the text box to an Input text box.

Now try the button. The text disapears.

Does anyone know why this happens ? It is very frustrating.

Symbol Behaviour...
hello,

is it possible to change Symbol behaviour with ActionScript,
if it is,.. does anyone know how?


Big Thanks!!

Odd Text Behaviour
Hi

I'm uddating a site created by another designer. I've been provided with the .fla files etc.

The site uses an embedded font, I got the font and installed it on my computer.

The .fla, which I think was created in an earlier version of Flash, 4 or 5, was created on a PC.

When I open the .fla it tells me that it needs to substitute the font, the substitute font dialogue comes up and it offers me the font I installed, but with a slightly different name; ie it looks for 'Humanst521 BT' and selects the font 'Humanist 521 BT'.

All well and good so far, the site opens in flash looking fine and dandy. I make various changes. All looks great when I create .swfs, they look exactly as they should.

But when I publish the swf with an html page, and take that into Internet Explorer, all the text becomes jagged(on both a mac and pc).

I made sure all text is static, has integer positions etc all the usual but to no avail.

When I looked at the text boxes in MX it says the font is '(humanst521 BT)' - the brackets obviously meaning substituted - so I changed them all over to 'Humanist 521 BT' but the problem remained.

I then thought that perhaps the font I installed wouldn't embed in a swf so I created a rubbish test movie using the font. In internet explorer it looked as smooth as can be.

So what is going wrong ? is it the fact the original .fla was created in earlier flash ? or is it the fact it was created originally on a PC ? or is the font not actually the same ? or am I being really really stupid ?

Sorry this has been so long winded but I wanted to explain the details and what I've tried to solve this.

Thanks for wading through my rubbish

Toadguy

Preload Behaviour?
Just wondering how in Dreamweaver I would go about loading a blurred image (with a smaller file size) before the same image without blur applied is loaded when page is opened

Problems With Mc's Behaviour
Hello there:-)

I have the problem that i want to scale and move a mc at the same time.
The one I created. doesn't do it properly at the same time. It somehow scales first and then moves.

I use Flash MX and I attached the fla.

Actually it's supposed to look like www.relevare.com

Thanks!!

Odd Game Behaviour, Help :-(
This is a game I'm making. I'm having problems getting the game behaviour just right.
I want it to generate the comet object every second or so with random _x and start off above screen and leave below it. I thought I had the code right but its acting odd, I don't think it's duplicating the clips right. Aim is to get it to do "removeMovieClip" when laser "hitTests" the comet to destroy both the laser and comet but I'm struggling, any help would be much apprecieted.

Different Behaviour Between IE And Netscape?
check out this link :

www.comicscave.gr/backup/d.swf

this movie works ok and preloads ok in netscape with flash player version 7,0,19,0, but NOT in Internet Explorer (same version). In Internet Explorer, it loads for a huge time without preloading and showing anything, and then the preloader starts loading data, as if the movie loads completely and then the loader starts loading all over again. Whats wrong?

i cant think of something!
thanks!

Odd Button Behaviour
Hello,

I've been using Flash for quite a while now. At least a year and a half I believe. However, I just ran into a problem I've never seen before! In a site that I am designing for a client, I have a series of buttons set up indepentently (as opposed to as a Navigation) that are supposed to go to a different frame in the movie upon release OR press. However, not only are they not doing this, the rollover and keyframes for Hit, Over, and Down are totally not responding. It's quite odd. The SWF is located at http://www.smalljewels.net/index2.swf . The FLA is located athttp://www.smalljewels.net/index2.fla . And in case you're wondering about the bb.php script not working, just go to http://www.smalljewels.net/bb.php to see the output it produces. I've been playing with this and trying many many different settings for about a week and can't for the life of me figure it out. If anyone has any knowledge, could you please share some with me?

Thanks,
Nick Small.

Button Behaviour
Heres a tricky one for you well at least it has been for me for the past week I have this file which contains a series of buttons which act as a menu and should stay selected when hit, however this part works and the rollover part works, but when a button is hit then rolled over the button doesnt maintain its hit state.

Any help would be great

Weird AS Behaviour.
I just duplicated a symbol and renamed it. The symbol in question is a newsbox that loads an external textfile. This symbol works perfectly by itself, but when I place the duplicated one in the scene (in order to have 2 news feeds) one of them doesn't work.

Notes:
-I have changed the textfile source
-I have changed the instance name itself
-I have not modified the instance names within the newsbox MC

Here is the code used to activate this (frame 1 of the newsbox MC):


Code:
loadVarsText = new LoadVars();
loadVarsText.load("events.txt");
loadVarsText.onLoad = function(success) {
if (success) {
main.mainText.html = true;
main.mainText.htmlText = this.myText;
main.mainText.autoSize = "left";
offset = main._height-main.mainText._height;
bottom = (main._y+main.mask_mc._height-main._height-space)+offset;
} else {
trace("not loaded");
}
};
stop();
fscommand("allowscale", "false");
//bar.useHandCursor = dragger.useHandCursor=false;
space = -150;
friction = .6;
//was 0.9
speed = 4;
//was 4
y = dragger._y;
top = main._y;
bottom = (main._y+main.mask_mc._height-main._height-space);
dragger.onPress = function() {
drag = true;
this.startDrag(false, this._x, this._parent.y, this._x, this._parent.y+this._parent.bar._height-this._height);
scrollEase1();
};
dragger.onMouseUp = function() {
this.stopDrag();
drag = false;
};
bar.onPress = function() {
drag = true;
if (this._parent._ymouse>this._y+this._height-this._parent.dragger._height) {
this._parent.dragger._y = this._parent._ymouse;
this._parent.dragger._y = this._y+this._height-this._parent.dragger._height;
} else {
this._parent.dragger._y = this._parent._ymouse;
}
scrollEase1();
};
bar.onMouseUp = function() {
drag = false;
};
moveDragger = function (d) {
if ((dragger._y == y+bar._height-dragger._height && d == 1) || (dragger._y == y && d == -1)) {
clearInterval(myInterval);
} else {
dragger._y += d;
scrollEase1();
updateAfterEvent();
}
};
up_btn.onPress = function() {
myInterval = setInterval(moveDragger, 18, -1);
};
down_btn.onPress = function() {
myInterval = setInterval(moveDragger, 18, 1);
};
up_btn.onMouseUp = down_btn.onMouseUp=function () {
clearInterval(myInterval);
};
MovieClip.prototype.scrollEase1 = function() {
dragger.onEnterFrame = function() {
if (Math.abs(dy) == 0 && drag == false) {
delete this.onEnterFrame;
}
r = (this._y-y)/(bar._height-this._height);
dy = Math.round((((top-(top+main.mainText._height)*r)-main._y)/speed)*friction);
main._y += dy;
};
};
Thanks for the help,
DaVuLf

Strange Behaviour
hi,

i have a movie with a button symbol called button and a movieclip symbol called circle. i want to resize the circle symbol, but if i add the following code to the button...

on (release)
{
width(circle)
{
_xscale += 10;
_yscale += 10;
}
}

not only the circle gets resized but also the button symbol itself. how does that come? what am i doing wrong?

thx

Odd Keyframe Behaviour
Hi,

This is my first Flash project, a website for a local band. I've tried to think of a way to explain my problem, but it's not clear. Take a look here instead: unclear_insight

Mouse over the polaroids, then try going thru the link tabs from RIGHT to LEFT. Note the odd behaviour of the images on the right. It only seems to effect the first image touched by the mouseover. The images are instances of MCs. I think this behaviour is caused by jumping to keyframes, but I don't know how to fix it.

If anyone could offer any insights I'd really appreciate it. I can supply the .fla if necessary.

Regards,

Jason.

Mouse Out Behaviour
Hi,

When you create a button, I know its possible to drop a movie-clip in to the button over state to add some animation on mouse over. My question is: is it possible to do the same thing, but for a mouse out action?

Ie: I have a movie clip I want to play when the user moves his mouse away form the button.

Thanks in advance...

Unusual Mc Behaviour.. Help
Hi there,

I have a movieclip that I bring into appearance by using the mx transition class. I have a few buttons on the movieclip when clicked should open an image in a new browser window. However, the buttons are not doing anything when I click them even though I have applied script to them. Below is the sort of script that I am applying directly to the buttons.


Code:
on(release) {
getURL("http://images.mywebsite.com/image1.jpg", "_blank");
}
Any ideas why the buttons are not doing anything?

Thanks

Lots Of MCs With Same Behaviour..
hi,

i've got a little problem which i'm sure there's a simple solution to, but i just can't figure it out.

i've got a little game, and i've got several MCs that i want my character to be able to crash into. when he crashes into them i want them to explode, and then if touched again i want them to do nothing. i only want them to do anything the second they're touched, then they'll stay on the stage but shut themselves off.

i want to just place a load of these objects in my levels and have them all act exactly the same way. i know it's possible by having the code on top of each of these MCs, but it's really time consuming to set up.

is there a way to drop all these MCs on the stage in different places and have some code in frame 1 that'll dictate how they all act?

i tried right clicking the MC in question and clicking 'linkage', and giving it an instance name for when it's exported to AS, but i didn't get anywhere with this.

any help greatly appreciated!

thanks for reading
J

Button Behaviour
i have 2 buttons and i have an animation of them. when rollover button start jumping and when rollout button stops jumping. how to make when release button to continue jumping and when release other button the first to stop and the second to start its animation....

Very Very Strange Behaviour
my swf file runs and gives multiple trace messages (normally erros like cant connect to http://localhost......./somefile.txt),
it started out with just 1, now its all these
Error opening URL "http://localhost/flashservices/app/gateway.php"
Error opening URL "http://localhost/development/Resources/gfoxintro.txt"
Error opening URL "http://localhost/development/Resources/bridieintro.txt"

the thing is, is that i havent been doing anything with the source code for the part that is responsible for all of the above.
when i cut and paste the addresses into my browser, they get displayed just fine,
anyone have any ideas? could it be that some error somewhere else is causing AS to bail out here?

Strange Behaviour
Hi everybody,
I need to find a solution to something strange. I Have a movie with buttons, scrolls ect... When I publish the movie and open it wide screen (the client wants it full screen) everything starts behaving funny. Especially the scroll buttons and bar (custom one) . It doesnt stop scrollin when I take the mouse off the buttons, and behaves a bit crazy. Please, anybody knows why this happens ans the solution?
Thanks

Font Behaviour....
hi all,
when i use a dynamic text box, the output looks doesnt appear as a smooth one. ie.,it looks like "fixedsys" (fixedsys is a font name). how to over come this? very urgent.pls help (
Senthil

SWAPDEPTH Behaviour, Can This Be Done?
Hi!
I've been following the Swap Depths
tutorial, but there's something I'd like to know.
This code here bellow is slightly different from this tutorial, but the resulting behaviour is the same.
We have 3 buttons inside 3 Mc's. Each Mc is called MC1, MC2 and MC3.
The AS code for each button is:

on (press, release, dragOver, dragOut) {
x = 0;
x = x+2;
_root.MC1.swapDepths(x);
}

on (press, release, dragOver, dragOut) {
x = 0;
x = x+2;
_root.MC2.swapDepths(x);
}

on (press, release, dragOver, dragOut) {
x = 0;
x = x+2;
_root.MC3.swapDepths(x);
}

What I would like to get is that the MC that I click, goes to the top, BUT respecting the relative position for the others. I mean, in this tutorial, if you run the swf file and put every window a bit one over the other, and click the last window, it will come to the top, but the other two won't keep their relative position because the clicked window will be swapped with the one on the top. Understand? (it's very simple although difficult to explain).
To make it easier: let's imagine we have 3 papers on the table and I pick up the one in the bottom and put it on top....this is exactly what I want (but in this tutorial, the other 2 papers are moved aswell). I just want that the window I click gets on top of the other 2, nothing else.
The thing is that I don't know how to do this with "swapdepths". In the AS reference bok it says it can be done but (as usual) they don't tell you how to do it...
Any help please?
Thank you very much.

Manare

LoadClip Behaviour
Hello

I'm trying to create a loader that will load external files on clicks of menu buttons.
Now, this is done easly with LoadClip, with listener and onLoadProgress/Init/Complete methods.
The problem occurs when you are to press another button that loads a different file, as it will automatically unload a previous file even before the new starts to load.
If I want to show the previous file, while the new one is being loaded i'd have to load it into a different container (empty movie clip) and once this is done, unload the old file using unloadMovie.
I can think of several ways of doing this, but all of them would have to be hardcoded and farr from self explanatory.
What I'm looking for is some function or other elegant solution to this task.

button code:

ActionScript Code:
mcButton1.onRelease = function():Void
    {
        fLoad("http://www.mydomain.com/myfile.swf");
        clearInterval(nInterval);
        nInterval = setInterval(fFadeIn,5,mcLoader);
    };

really ugly solution

ActionScript Code:
function fLoad(sTargetFile:String):Void
    {
        if (bSwitcher) {
            MCL.loadClip(sTargetFile, mcHolder1);
            bSwitcher = !bSwitcher;
        }
        else {
            MCL.loadClip(sTargetFile, mcHolder2);
            bSwitcher = !bSwitcher;
        }
       
    }

oListener.onLoadComplete = function(sTargetFile:MovieClip):Void
    {
        clearInterval(nInterval);
        nInterval = setInterval(fFadeOut,5,mcLoader);
        if (bSwitcher) {
            mcHolder2._visible=true;
            mcHolder1._visible=false;
           
        }
        else {
            mcHolder2._visible=false;
            mcHolder1._visible=true;
        }
       
    }

Mc Window-like Behaviour
I am building a site that has a movie clip on stage that I want to behave like a window, i.e that can be dragged closed etc. The window contains buttons within the mc that move the mc timeline to next and previous frames to show new pages of information. When I attach a startDrag() from the main timeline, the window drags ok, but the buttons within the mc that control moving to next/prev frame don't function. I tried to limit the drag hit area by placed a button on the mc and adding a startDrag() on an onRelease function of the button but this won't work. I also tried modifying the hitArea of the mc in an attempt to get a small area at the top left of the window that will respond to a click and allow the window to be dragged. Being bale to drag the window is important as the background is a jpg that should be seen by the user in full. Many thanks in advance!

Strange Behaviour Of WS
Hi I have a problem when I'm calling Web Service with interval of 10 to 60 seconds it returns it's nodes twice... which is strange because I checked my methods.. they seem to be ok .. I checked the WS it was ok... I tried to debug but you know the debugger in flash is horrible and of course it crashed:).. have you had such problem with WS or the mistake is in my code?

OnRelease Behaviour
Hi, ive been building a fairly large flash app and have realised that i cant click on my movieclip buttons more than once without first moving the mouse.

When i test the swf locally i can repeatedly click on my movieclips and fire the onRelease handler over and over. As soon as i view the swf in a browser ( IE or firefox ) i find that i have to move the mouse between clicks.

I tried to isolate the cause by building a seperate fla with a moviclip with onRelease onRollOver and onRollOut handlers but this worked fine both locally and in the browser. Next i copied the movieclip into a new layer in my original app and the movieclip inherited the clicking issue when running in the browser.

When i first rollover the movieclip the hand symbol appears, when i click I see the normal arrow cursor appear whilst i am still holding the mouse button down. When i release the button the hand cursor reappears but clicking then only works once i move the mouse.

Im using Flash 8 and publishing as a Flash 8 movie. My browsers have flash player 9 installed.

Anybody have any ideas as to what might be happening here, im fairly puzzled.

Thanks





























Edited: 04/24/2007 at 04:07:20 AM by charlie656

MovieClip Behaviour
Hi All,

i want to know what is the difference b/w the symbol Movie clip and the MovieClip created by using Movieclip class.
b/c when i want to unload movie from the symbol Movieclip created at designe time and it is on the stage , i have to
use function like this for example, if movieclip instance name is "mc"
unloadMovie(mc)

unloadMovie(target:MovieClip) : Void // function prototype





while if i create like this
this.createEmptyMovieClip("box", 1);

with (box) {
lineStyle(1, 0xCCCCCC);
beginFill(0x4827CF);
moveTo(0, 0);
lineTo(80, 0);
lineTo(80, 60);
lineTo(0, 60);
lineTo(0, 0);
endFill();
}

box.onRelease = function() {
box.unloadMovie(); // i have use like this
};

can any explain the the reason of this where as both are Movieclips

best regards

shane

Strange Behaviour
Hi everybody,
I need to find a solution to something strange. I Have a movie with buttons, scrolls ect... When I publish the movie and open it wide screen (the client wants it full screen) everything starts behaving funny. Especially the scroll buttons and bar (custom one) . It doesnt stop scrollin when I take the mouse off the buttons, and behaves a bit crazy. Please, anybody knows why this happens ans the solution?
Thanks

Weird Jpg Behaviour, Possible Bug?
Noticed weird behaviour when loading jpg's dynamically.

Loading in first frame adds smoothing to the image while loading in any frame after a playhead in a timeline has moved results in no smoothing.

I put examples up here;
http://www.deligon.com/duztdruid/scaleQuality.html
http://www.deligon.com/duztdruid/sca...HasPlayed.html

FLA's can be downloaded here;
http://www.deligon.com/duztdruid/scaleQuality.fla

http://www.deligon.com/duztdruid/sca...yHasPlayed.fla

My problem is actually that I need the smoothing all the time.

Any ideas / suggestions?

Odd TextArea Behaviour
See attached images. When I click on TextArea scroll bar, border becomes green and the text is highlighted. It does not matter if selectable is true or false.

This odd behaviour seems to occur after Flash Player 7,0,19,0 is installed. And I am not sure what version I had before. It looks ok when previewing in Flash MX 2004. This thing only happens in browsers.

What AS can eliminate this odd behaviour?

SWAPDEPTH Behaviour, Can This Be Done?
Hi!
I've been following the Changing Stacking Order (swapDepth) tutorial
but there's something I'd like to know.
In this tutorial, we have 3 buttons inside 3 Mc's. Each Mc is called green, yellow and blue.
The AS code for each button is:
ActionScript Code:
on (press, release, dragOver, dragOut) {    x = 0;    x = x+2;    _root.green.swapDepths(x);}on (press, release, dragOver, dragOut) {    x = 0;    x = x+2;    _root.yellow.swapDepths(x);}on (press, release, dragOver, dragOut) {    x = 0;    x = x+2;    _root.blue.swapDepths(x);}

What I would like to get is that the MC (window) that I click, goes to the top, BUT respecting the relative position for the others. I mean, in this tutorial, if you run the swf file and put every window a bit one over the other, and click the bottom window, it will come to the top, but the other two won't keep their relative position because the clicked window will be swapped with the one on the top. Understand? (it's very simple although difficult to explain).
To make it easier: let's imagine we have 3 papers on the table and I pick up the one in the bottom and put it on top....this is exactly what I want (but in this tutorial, the other 2 papers are moved aswell). I just want that the window I click gets on top of the other 2, nothing else.

According to Kirupa's words, this EXAMPLE here is done using swapdepth aswell, and IT'S EXACTLY the behaviour that I want. Just compare this one with the one in the tutorial and see the different window behaviour.
The thing is that I don't know how to do this with "swapdepths". In the AS reference bok it says it can be done but (as usual) they don't tell you how to do it...
Any help please?
Thank you very much.

Manare

Mailto Behaviour
hi all, super quick question.

if i want a button to open up someones email viewer, i use, for example,

mailto:fulci@fucli.com is this correct? do i use quotes, because it doesnt seem to work, with or without them. can someone correct my obvious errors please if anyones got the time. thanks alot. much appreciated!

Datagrid Behaviour
Is it me or it the DataGrid component in Flash CS3 completely different to the Flash 8 version and the Flex version? In CS3 the cells are individually selectable which is what I dont want - I want to only be able to select rows like in Flash 8 and in Flex. Can someone help?

DisplayObject.x Behaviour ?
Hi guys,

After an hour of frustration I noticed that the DisplayObject.x and DisplayObject.y values don't behave the same way that a Number does. I was adding a small increment to them, over and over, and they weren't increasing.

I did the exact same operation on a Point.x and Point.y and it worked as expected.

Is there a reason for this ?

Thanks.

Unsual Behaviour
Is it possible that you can access a static variable or object without defining the method as public static this is what I mean

private var sprite:Sprite;


public static function returnSprite():Sprite
{
return sprite
}

When I put this code inside a class that is implementing singleton design pattern it give me an error if I define the function as public static...

I dont know whether I am making any sense here

Strange Behaviour
Hi everybody,
I need to find a solution to something strange. I Have a movie with buttons, scrolls ect... When I publish the movie and open it wide screen (the client wants it full screen) everything starts behaving funny. Especially the scroll buttons and bar (custom one) . It doesnt stop scrollin when I take the mouse off the buttons, and behaves a bit crazy. Please, anybody knows why this happens ans the solution?
Thanks

Weird Jpg Behaviour, Possible Bug?
Noticed weird behaviour when loading jpg's dynamically.

Loading in first frame adds smoothing to the image while loading in any frame after a playhead in a timeline has moved results in no smoothing.

I put examples up here;
http://www.deligon.com/duztdruid/scaleQuality.html
http://www.deligon.com/duztdruid/sca...HasPlayed.html

FLA's can be downloaded here;
http://www.deligon.com/duztdruid/scaleQuality.fla

http://www.deligon.com/duztdruid/sca...yHasPlayed.fla

My problem is actually that I need the smoothing all the time.

Any ideas / suggestions?

Behaviour On Buttons
Hi,

I've found Action Script rather hard to use, so, after wasting hours I thought I'd come and ask here.

The questions:

(1) My button has an animation that plays on the Over state, but as soon as the mouse leaves the button, it returns to the Up state. What I want is for the animation of the Over state to complete even if the mouse is removed before going back to the Up state.
(2) Usually onRelease the button returns to the Up state. Is it possible to set the button to remain in the Down state in the period after clicking before you are redirected to the new page?

Any help would be appreciated, I can't seem to go beyond the very simplest of Flash actions.

Thanks,
Steve

Changing Behaviour?
Hi, thanks in advance for anyone who can help with this, I have a website consisting of three scenes and want the back button in IE to always goto a specific scene + frame, at the moment, when the back button is pressed it goes all the back to the beginning of the first scene.

Does anyone know how to change this. Thanks



Weird Jpg Behaviour, Possible Bug?
Noticed weird behaviour when loading jpg's dynamically.

Loading in first frame adds smoothing to the image while loading in any frame after a playhead in a timeline has moved results in no smoothing.

I put examples up here;
http://www.deligon.com/duztdruid/scaleQuality.html
http://www.deligon.com/duztdruid/sca...HasPlayed.html

FLA's can be downloaded here;
http://www.deligon.com/duztdruid/scaleQuality.fla
http://www.deligon.com/duztdruid/sca...yHasPlayed.fla

My problem is actually that I need the smoothing all the time.

Any ideas / suggestions?

How To Test Behaviour Of Swf On Mac Without Mac
sorry if the question is not appropriate for this branch.

a client said he's got a problem with a flash movie. he tested the swf on mac. everything works fine on my pc and i need to see how the movie works on mac, but i have no mac ! is there any soft which would allow to me emulate swf behaviour on mac?

cheers,
richard

Odd Button Behaviour
I’ve been messing around with this kirupa tutorial to get used to loading swf’s into container MC’s. You can see by this tutorial link that a transition closes on each button click, loads up the relevant movie and then opens again revealing the loaded movie behind.

http://www.kirupa.com/developer/mx/p...transition.htm

All was working really well until I decided to add a flash xml gallery.

http://www.kirupa.com/developer/mx20...otogallery.htm


I built the gallery as a stand-alone swf based on the tutorial above and it worked a treat. I planned on the interface swf loading the gallery into the container MC, but when I tried this I came across an odd problem.

Once the gallery is loaded into the interface every thing seems fine. But when you click on the buttons located within the gallery.swf to move from picture to picture, the button presses play the transition movie in the interface swf. The transition closes, the next picture loads into the gallery and then the transition opens. This shouldn’t happen! Why are these buttons triggering the transition?

The code:-

This AS is in the 1st frame of the main interface swf :-


ActionScript Code:
b3.onRelease = function() {
    if (_root.section != "faq.swf") {
        _root.section = "faq.swf";
        _root.transition.gotoAndPlay("closing");
    }
};
b4.onRelease = function() {
    if (_root.section != "contact.swf") {
        _root.section = "contact.swf";
        _root.transition.gotoAndPlay("closing");
    }
};
b5.onRelease = function() {
    if (_root.section != "gallery.swf") {
        _root.section = "gallery.swf");
        _root.transition.gotoAndPlay("closing");
    }
};


This next code is the AS for the xml file and button / keypresses etc within the gallery.swf :-


ActionScript Code:
function loadXML(loaded) {
    if (loaded) {
        xmlNode = this.firstChild;
        image = [];
        description = [];
        total = xmlNode.childNodes.length;
        for (i=0; i<total; i++) {
            image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
            description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
        }
        firstImage();
    } else {
        content = "file not loaded!";
    }
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
    if (Key.getCode() == Key.LEFT) {
        prevImage();
    } else if (Key.getCode() == Key.RIGHT) {
        nextImage();
    }
};
Key.addListener(listen);
previous_btn.onRelease = function() {
    prevImage();
};
next_btn.onRelease = function() {
    nextImage();
};
/////////////////////////////////////
p = 0;
this.onEnterFrame = function() {
    filesize = picture.getBytesTotal();
    loaded = picture.getBytesLoaded();
    preloader._visible = true;
    if (loaded != filesize) {
        preloader.preload_bar._xscale = 100*loaded/filesize;
    } else {
        preloader._visible = false;
        if (picture._alpha<100) {
            picture._alpha += 10;
        }
    }
};
function nextImage() {
    if (p<(total-1)) {
        p++;
        if (loaded == filesize) {
            picture._alpha = 0;
            picture.loadMovie(image[p], 1);
            desc_txt.text = description[p];
            picture_num();
        }
    }
}
function prevImage() {
    if (p>0) {
        p--;
        picture._alpha = 0;
        picture.loadMovie(image[p], 1);
        desc_txt.text = description[p];
        picture_num();
    }
}
function firstImage() {
    if (loaded == filesize) {
        picture._alpha = 0;
        picture.loadMovie(image[0], 1);
        desc_txt.text = description[0];
        picture_num();
    }
}
function picture_num() {
    current_pos = p+1;
    pos_txt.text = current_pos+" / "+total;
}


I’ve been playing around with this for hours, but can’t figure out why the transition plays when the gallery buttons are clicked.

If anyone can shed some light, I would be very grateful!

TIA.

Strange Behaviour
Hey

A colleague of mine just hit an issue with an onEnterFrame piece of code she is working on:

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

timer = 4;

onEnterFrame = function(){

timer = timer - 0.04;
trace(timer);

}

----------

partial output:

1.2
1.16
1.12
1.08
1.04
0.999999999999997
0.959999999999997
0.919999999999997
0.879999999999997

Weird huh?

I fixed her issue using Math.floor, but I'm curious what causes Flash to equate 1.04 - 0.04 = 0.999999999999997?

Maybe this is a well known issue but I hadn't come across it before.

Any ideas?

Thanks

Paul

Weird Behaviour
Hey...

The weirdest thing..
I got a kind of project-showcase, each project resides in a "base"-movieclip where the projects information and a slideshow.

The thing is, all is working fine except for this tiny thing.. :

If I got more then 23 images in a project the "alpha-tween" don´t work what so ever... instead of fading in/out it gets invisible during the tween-time. I can´t figure out what may be causing this. I´m using TweenMax so I´m not sure if it´s some kind of TweenMax-bug (which I find hard to believe)

I´m posting my "Slide-class" below:
- An array of the images + an array of a "container" for each image, are added to the class, loaded from an xml-file.

- the code from the class that initiates the "Slide"-class

ActionScript Code:
var slide:Slide = new Slide();
var initslide:Function = Delegate.create(slide, slide.initSlide);
initslide();
slide.addToQueue(imageHolderArray);
slide.addToImageQueue(images);
slide.runImageLoader();


- the "Slide"-class

ActionScript Code:
import gs.TweenMax;
import mx.transitions.easing.*;
import mx.utils.Delegate;
 
class se.fixid.caseviewer.Slide {
 
    private var _clips:Array;
    private var _images:Array;
    private var _mcl:MovieClipLoader;
    private var _queueId:Number;
    private var _slideId:Number;
    private var _delay:Number;
    private var _timer:Number;
   
    public function Slide()
    {
        trace("// --- Slide Created --- //")
    }
   
    public function initSlide():Void
    {
        _clips  = new Array();
        _images     = new Array();
        _queueId    = 0;
        _slideId    = 0;
        _delay  = 5000;
        _mcl       = new MovieClipLoader();
        _mcl.addListener(this);
    }
   
    public function addToQueue(scopeArray:Array):Void
    {
        _clips = scopeArray;
        for ( var i=0; i<_clips.length; i++ )
        {
            _clips[i]._alpha = 0;
        };
    }
   
    public function addToImageQueue(scopeArray:Array)
    {
        _images = scopeArray;
    }
   
    public function runImageLoader():Void
    {
        if(_queueId < _images.length)
        {
            var link = String(_images[_queueId]);
            _mcl.loadClip(link, _clips[_queueId]);
            _queueId++
        }
        else
        {
            trace("// --- All images loaded --- //")
            startSlide();
        }
       
    }
   
    private function startSlide():Void
    {
        trace("// --- Start Slide --- //")
        var firstImage:Function = Delegate.create(this,showFirstImage);
        firstImage();
       
        _timer = setInterval(Delegate.create(this, runSlide), _delay);
    }
   
    private function showFirstImage():Void
    {
        TweenMax.to(_clips[0], 1, {_alpha:100});
        _slideId++
    }
   
    private function runSlide():Void
    {
        if(_slideId == 0)
        {
            TweenMax.to(_clips[_clips.length-1], 1, {delay:.5, _alpha:0});
        }
        TweenMax.to(_clips[_slideId-1], 1, {delay:.5, _alpha:0});
        TweenMax.to(_clips[_slideId], 1, {_alpha:100})
        _slideId++
       
        if(_slideId == _clips.length)
        {
            _slideId = 0;
        }
    }
   
    private function onLoadInit(scope:MovieClip):Void
    {
        runImageLoader();
    }
}


I just re-wrote the class to try to find out what´s causing this but I still can´t find out what is is...

Anyone got an idea?

Odd Button Behaviour ... ? Help?
dear all.


i have two problems and cannot find a way to solve them.
what i was trying to achive was:
- a button (agata) should look lighter when the mouse rolls over it
- should turn darker again when the mouse leaves the button
- should call up a link when clicked
- should stay alpha=50 as long as active and as long as no other button has been hit or rolled over.

1. although i define ...

agata.onRelease=function(){
getURL("Series/Agata/index.html","images");
agata._alpha=50;
}

i can not get the button to remain alpha=50 when active, although the according swf loads correctly.

as an alternative i have tried this

agata.onPress=function(){
agata._alpha=50;
}

this is not working either.

2. instead what i get is an unvoluntary "onReleaseOutside", meaning when i click the button, move the mouse off the button and release it then, the button appears and stays in a lighter grey (alpha=50), but the link is not working.

all very odd ..

my code goes like this, "RollOver", RollOut" and "OnRelease" are working just fine:

agata._alpha=100;

agata.onRollOver=function(){
agata._alpha=50;
}
agata.onRollOut=function(){
agata._alpha=100;
}
agata.onRelease=function(){
getURL("Series/Agata/index.html","images");
}
agata.onPress=function(){
agata._alpha=50;
}

thanks for reading, any help would be appreciated.

rhineheart

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