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




Help Adding Moviclips/Btns To My Papervision Scene



Please help. I'm new to papervision and AS3. I'm trying to spin a cube with materials and interact with buttons on the cube. I was able to assemble this:

http://www.methodengine.com/clients/...vidboxspin.swf

It shows my cube with my materials. I placed buttons over the box that spin it. I would like those buttons to actually appear and spin on the cube itself.

Can anyone out there point me in the right direction. I was able to add movieClips on the stage, but no in the front cube material.

Here is my code to make this happen:


ActionScript Code:
package {    import flash.display.*;    import flash.filters.*;    import flash.events.*;    // Import Papervision3D    import org.papervision3d.events.InteractiveScene3DEvent;    import org.papervision3d.scenes.*;    import org.papervision3d.cameras.Camera3D;    import org.papervision3d.objects.DisplayObject3D;    import org.papervision3d.materials.*;    import org.papervision3d.utils.virtualmouse.VirtualMouse;    import org.papervision3d.utils.virtualmouse.IVirtualMouseEvent;    import org.papervision3d.utils.*;    import org.papervision3d.objects.*;    import flash.text.TextField;    import flash.utils.*;    public class Main extends MovieClip {        public var mc :MovieClip;        // ___________________________________________________________________ 3D vars        var container:Sprite;//    var scene:Scene3D;        var scene :InteractiveScene3D;        var camera:Camera3D;        var ism:InteractiveSceneManager;        var plane:Plane;        var time:Number;        var tweening:Boolean = false;        var myVidfront:Boolean = true;                var mouse:Mouse3D;        var vMouse:VirtualMouse;        var material:InteractiveMovieMaterial;        public var myVidContainer:MovieClip;        private var frontMaterial:BitmapFileMaterial = new BitmapFileMaterial("images/player2_back.png");        private var backMaterial:InteractiveMovieAssetMaterial = new InteractiveMovieAssetMaterial("flv", true, true);        private var targetrotationY:Number = 0;        var p:Cube = new Cube(new MaterialsList( {          front: frontMaterial,          back: backMaterial,          left: new ColorMaterial( 0x000000),          right: new ColorMaterial( 0x000000),          top: new ColorMaterial( 0x000000),          bottom: new ColorMaterial( 0x000000)          } ), 800, 100, 500, 1, 1, 1);        public function Main() {            init();            time = getTimer();        }        public function init():void {            stage.scaleMode = "noScale";            // add a spin btn            var spin180_btn:PlayVid= new PlayVid();            spin180_btn.x = 500;            spin180_btn.y = 25;            addChild(spin180_btn);                        // add another spin btn            var spin360_btn:PlayVid= new PlayVid();            spin360_btn.x = 400;            spin360_btn.y = 25;            addChild(spin360_btn);            init3D();            addEventListener( Event.ENTER_FRAME, loop );            spin180_btn.addEventListener(MouseEvent.CLICK, spin180);            spin360_btn.addEventListener(MouseEvent.CLICK, spin360);        }                // ___________________________________________________________________ Init3D        public function init3D():void {            // Create container sprite and center it in the stage            container = new Sprite();            addChild( container );            container.name = "mainCont";            container.x = 270;            container.y = 200;                        // Create scene            scene = new InteractiveScene3D( container );            ism = scene.interactiveSceneManager;                        scene.addChild(p);            p.rotationX = 0;            p.rotationZ = 0;            p.rotationY = 0;            p.x = stage.stageWidth / 4;            p.y = -100;                        var moreVids_btn:MoreVids = new MoreVids();            moreVids_btn.x = 480;            moreVids_btn.y = -130;            //      scene.container.addChildAt(moreVids_btn,1);            moreVids_btn.addEventListener(MouseEvent.CLICK, spin360);                        // Create camera            camera = new Camera3D();            camera.zoom = 10;            camera.sort = true;         }                private function spin180(event:Event):void {                        tweening = true;            trace(p);            if(myVidfront){                myVidfront = false;                targetrotationY = 180;            }else{                myVidfront = true;                targetrotationY = 0;            }        }                private function spin360(event:Event):void {            tweening = true;            if(myVidfront){                myVidfront = false;                targetrotationY = 360;            }else{                myVidfront = true;                targetrotationY = 0;            }        }                // ___________________________________________________________________ Loop        function loop(event:Event):void {            if (tweening) {                if (p.rotationY <targetrotationY) {                    p.rotationY += Math.sqrt(targetrotationY-p.rotationY);                    p.rotationY = Math.round(p.rotationY);                } else if (p.rotationY> targetrotationY) {                    p.rotationY -= Math.sqrt(p.rotationY-targetrotationY);                    p.rotationY = Math.round(p.rotationY);                }            }            scene.renderCamera( this.camera );        }    }}



ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 09-29-2008, 08:59 PM


View Complete Forum Thread with Replies

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

Adding Sprites To Stage In Papervision 2.0
Im trying to control a Netstream in Papervision using a scrub bar:


PHP Code:




_stream = stream;
_duration = duration;
_track = new Sprite();
_track.graphics.lineStyle();
_track.graphics.drawRect(0, -2.5, 100, 5);
addChild (_track);
_thumb = new Sprite();
_thumb.graphics.lineStyle();
_thumb.graphics.beginFill(0xFFFFFF);
_thumb.graphics.drawRect(-5, -5, 10, 10);
_thumb.graphics.endFill();
addChild(_thumb)
addEventListener(Event.ENTER_FRAME, onEnterFrame1);
_thumb.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
_thumb.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);







But how can I add Sprites to the stage in Papervision?

Deleting Objects From The Papervision Scene.
Hello guys! I´ve got a basic problem with Papervision :_ I´m trying to create and then delete planes from the scene. I was using 1.7 version until I noticed there were not destroy method inside the materials classes so this is my first attemp using Papervision 2.

What I have done to test it is using Papervision2.com Basic Interactive tutorial example. In this, I´m creating 50 planes in the stage and adding them the erase method onMouse Down, here is the code :

// Creating planes..

override protected function init3d():void
{

ourMaterial.interactive = true;
ourMaterial.doubleSided = true;
ourOverMaterial.interactive = true;
ourOverMaterial.doubleSided = true;

for(var i:Number=0; i<50; i++){
planeArray[i] = new Plane(ourMaterial, 1000,1000, 2, 2);

default_scene.addChild(planeArray[i]);

planeArray[i].addEventListener( InteractiveScene3DEvent.OBJECT_PRESS, _onPress );


planeArray[i].x=Math.random()*800
planeArray[i].x=Math.random()*600
planeArray[i].z=Math.random()*10
planeArray[i].rotationX=Math.random()*360
planeArray[i].rotationY=Math.random()*360
planeArray[i].rotationZ=Math.random()*360
}

}

// OnPress Event...

private function _onPress( e:InteractiveScene3DEvent ):void
{
trace("before destroying plains numChildren is",default_scene.numChildren);

for(var i:Number=0; i<planeArray.length; i++)
{

ourMaterial.destroy();
planeArray[i].removeEventListener( InteractiveScene3DEvent.OBJECT_PRESS, _onPress);

default_scene.removeChild(planeArray[i]);
planeArray[i]=null


}
planeArray.splice(0, planeArray.length);

trace("after destroying planes numChildren is",default_scene.numChildren);
}

//end

My problem is that I really can´t delete the objects from the Scene, when I request numChildren it display the total amount of planes I placed into the scene. Does anyone know how can I delete objects from the stage? Any Ideas? I´d appreciate any comments.Thx in advance

Best Regards
Clau!

Papervision Mouseevents Througth Scene
I have a number of planes divided in rows. When clicked on a button within the plane's material, a box appears displaying content. This box has a close button. This button closes the box. However, when the close button is not over the content in the scene the buttons recieves the mouseevent(green), when it's over it does not(red). The image below shows this.

I use papervision 1.7, if required i will post additional information.

Deleting Objects From The Papervision Scene.
Hello guys! I´ve got a basic problem with Papervision :_ I´m trying to create and then delete planes from the scene. I was using 1.7 version until I noticed there were not destroy method inside the materials classes so this is my first attemp using Papervision 2.

What I have done to test it is using Papervision2.com Basic Interactive tutorial example. In this, I´m creating 50 planes in the stage and adding them the erase method onMouse Down, here is the code :

// Creating planes..

override protected function init3d():void
{

ourMaterial.interactive = true;
ourMaterial.doubleSided = true;
ourOverMaterial.interactive = true;
ourOverMaterial.doubleSided = true;

for(var i:Number=0; i<50; i++){
planeArray[i] = new Plane(ourMaterial, 1000,1000, 2, 2);

default_scene.addChild(planeArray[i]);

planeArray[i].addEventListener( InteractiveScene3DEvent.OBJECT_PRESS, _onPress );


planeArray[i].x=Math.random()*800
planeArray[i].x=Math.random()*600
planeArray[i].z=Math.random()*10
planeArray[i].rotationX=Math.random()*360
planeArray[i].rotationY=Math.random()*360
planeArray[i].rotationZ=Math.random()*360
}

}

// OnPress Event...

private function _onPress( e:InteractiveScene3DEvent ):void
{
trace("before destroying plains numChildren is",default_scene.numChildren);

for(var i:Number=0; i<planeArray.length; i++)
{

ourMaterial.destroy();
planeArray[i].removeEventListener( InteractiveScene3DEvent.OBJECT_PRESS, _onPress);

default_scene.removeChild(planeArray[i]);
planeArray[i]=null


}
planeArray.splice(0, planeArray.length);

trace("after destroying planes numChildren is",default_scene.numChildren);
}

//end

My problem is that I really can´t delete the objects from the Scene, when I request numChildren it display the total amount of planes I placed into the scene. Does anyone know how can I delete objects from the stage? Any Ideas? I´d appreciate any comments.Thx in advance

By the way! I know maybe there would be problem using just one material and destroying it on the itteration, but anyway, I also tried with just one plane and I couldnt delete it :_

Thx
Best Regards
Clau!

Papervision: Render Scene As Material?
Hi all,

I've been having a lot of fun with Papervision3D recently, and I'm now trying to find out how to use the currently rendered scene as the material for a plane.

I'm basically trying to acheive a reflection on the "floor" of my current scene.

Here is how someone else has done it - but I can't find an explanation of how it was done:

http://www.nivas.hr/pub/papervision3d/bitmapCopyObject/

Any help and ideas are much appreciated!
Cheers, Seb.

Accessing Btns Underneath Other Btns
I'm really stuck here now. I've designed myself into a corner. I have 2 invisible btns that need to exist and be accessible at the same time even though one of them is on top of the other (one btn is for over and rollout scripts and the other is for onRelease scripts -- the scripts have to be separate like that since the over/rollout scripts are within the same mc duplicated and the onRelease must have separate scripts outside of the duplicated mcs). I've tried thinking it through multiple ways and this is the only way I can see it working. Is there a way to make that happen? I'm not too strong on scripting, so this "double button" thing is how it must work. Should I scrap this idea and start over? Thanks! Did I succeed in making an easy idea seem complex? Sorry ...

Adding Scene Issue
Hi !
I did flash project in one scene. I put preloader in frond of it (in new scene). Preloader works fine, but the code in next scene doesn't work at all!!!!

I didn't find any solution. I tried to paste all frames to new empty movie with two scenes. Script started to work, but gotoAndPlay commands dont work correctly.

Leos

Trouble With Adding A New Scene
Hi,

I have a main scene that begins with a animation. Now when i add a new scene to house a preloader and place it above the main scene and play the movie the preloader works fine but when it plays the next scene everything stops at frame 1. At 1st I thought it was my preloader but i tripled checked it and it was fine, I also just added a blank scene but i get the same problem. Im using flash 8. ne 1 ever get this problem?

thx

Problems Adding Just A Scene
hi guys,
i am getting in pain just adding a second scene to my flash 8 artwork.
...i have finished an intro and now the movie should jump to a second scene using gotoandplay("scene2", 1).
as soon as i add the second new scene from the scene inspector and play the movie, i get a movie that stops playing to the first (i think it's so) frame of first scene....well at the end ...as soon as i add a scene, the movie stops. no code added or removed!!!it's strange!!!
please helppppp
thank
adro

Adding A Link To Scene
Hi,

I am a total beginner in Flash and wanted to know, how to add a link that opens in a new window to a scene?
I found out that on AS2 it was done in a manner similar to:

ActionScript Code:
on (release)
{
getURL("http://www.google.com",_new)
}
or something like that.
Right now I got to this:

ActionScript Code:
Scene.addEventListener(MouseEvent.CLICK,goTo);
function goTo(e:MouseEvent) {
    var request:URLRequest = new URLRequest("http://www.google.com/");
    navigateToURL(request);
}
But I get an error 1061

Basically I need to add a link to another web page on my banner.

Help please?!

Adding A Scene Distorts Images
This seems very strange to me, but why would adding a scene to the movie lower the quality of the images I am using. I have images that look fine, but if I just add a scene to the movie the quality goes way down.

Thanks for the help,
Todd

Adding All Instances In A Scene To An Array
I want to instruct actionScript to look at my scene, go though each item on it (e.g. all of the check boxes and radio buttons) and add each of these items that have got an instance name into an array.

I can't think of a simple solution to this. Can anyone help please?

[F8] Adding Text Field In Scene 2
I have a two scene movie

In the second scene i have

Code:
createTextField("word_txt", 2000, 100, 100, 300, 100);
word_txt.multiline = true;
word_txt.wordWrap = true;
word_txt.border=true;

var my_fmt:TextFormat = new TextFormat();
my_fmt.color = 0xFF0000;
my_fmt.underline = true;
word_txt.text = "This is my first test field object text.";
word_txt.setTextFormat(my_fmt);


If I export the whole movie this doesn't work

If I export just the second scene it does work.

What do I need to alter to make it work if I export the whole scene

THanks in advance

Adding All Instances In A Scene To An Array
I want to instruct actionScript to look at my scene, go though each item on it (e.g. all of the check boxes and radio buttons) and add each of these items that have got an instance name into an array.

I can't think of a simple solution to this. Can anyone help please?

Adding Up Score From Movieclip To Scene
Hi, I am doing a quiz game project using flash that is due soon. I am having a bit of problem with adding up score from many movieclips and displaying it on another scene.


Any help is deeply appreciated.Thanks in advance.

Blurry Graphics When Adding A Scene
Hello...i'm new at this forum and here's my first question:

When i add an extra scene to my movie (flash MX 2004) than all my graphics become blurry like a bad jpg. When i delete the scene again, the graphics are perfect.

Is this a bug in flash or am i doing something wrong? The graphics I imported are png or jpg.

I tried some changes with the jpg publishing quality, but that didn't work.

So..anyone with the solution?

Thnx in advance.

Adding 2 Sound Fx To A Scene But It Interupts The First Loop
Hi, i am working through one of the tutorials in swish and i have come accross a problem. IN THE TUTORIAL "THIS IS MY MESSAGE" i have added the vector graphics and the initial sound. However i wanted to added a sound effect when the first picture loaded in. When i did this my first sound loop cuts of then startes again when the sound fx is meant to cut in. So i look at sound/actions panel. I loop 88amp3 15 times and then at my first jpeg i loop a sound fx once. But when i play the whole scene my sound fx cuts in through the whole thing. When i go back to the sound panel i find that the setting have changed and the soundfx wants to play 15 times now overiding my initial 88amp3 sound loop. Its just that in future i want to put key sounds along side pics loading in and what not, and im not sure how to co-ordinate this. Anyone know what im doing wrong? Im pretty sure im close but i cant find the solution. Any takers?
Regards,
Gibbo.

Images Look Crappy When Adding Preload-scene
I have an imagesequence that should be exported with the swf in highest quality. Works great on it self and all, no problem whatsoever, UNTIL....

I added a preloader in a scene

Now when I export, the images look all crappy! Almost bitmap-like. I swear I've checked the properties of all images and the export-settings and all that.

Can someone help me with this problem?
Much appreciated,

Mediamonkey

Adding Scene Makes Images Fuzzy
I have a flash movie (flash 5) with imported PNGs for buttons. When I add a new scene (either by duplicating or adding new), the quality of these images plummets, even though I have the publish settings set to 100% jpg quality. As soon as I delete the new scene(s), the quality is restored. Obviously I can't publish a movie with poor quality images (it's like they've been enlarged and then over-sharpened in paintshop pro or similar, except they haven't). Does anyone know if/how I can remedy this? TIA

Adding Live Video To A Scene As A Texture?
Does anyone know if it is possible to add live video (streaming) as a texture in a Flash scene using AS3? If so, what software would I require to do this?

Adding New Frames Before Game Scene [mucking Up]
Got a game, asteroids, and it works fine, but when i move the frames along 1 so that i can add an into screen, with high scores and a play button, it throws off all my remove movieClips.

if anyone know as to why, would be great help.

Differencing Viewed Btns From Non-viewed Btns
I have created a project with many different scenes. You link to the scenes through one page that has many buttons on it. Here is what I am looking to do:
If you click one of the buttons and link to a scene, and then go back to the main page, can I alter the state of the button that has been clicked to show that that button has been used (basically showing which buttons have been viewed and which have not). I believe it may be similiar to a game board, you click on a piece, get a question and go back to the game board but that square is a different color.
Can anyone help me?

Thanks.

Swaping Moviclips?
is there a command that can be used to swap movieclips

Buttons Within Moviclips
i have several buttons within moviclips

The button code is working but if I use gotoAndPlay to move the movie playhead it does not work. Does anyone know why this is?

Gareth

Random Moviclips? How Do I Do It?
Help. I asked this before. Received an answer, and was unable to make it work. All i got was a blank white stage. I would like to be able to display bitmapped logos in a random fashion. If at all possible, I'd like to make them crossfade with the next logo.
I was told to:
"Place all of the logos in one flash document. Make them all symbols (movieClips) and take them off the stage. In the library, right click on each one and choose "Linkage". Click "Export for ActionScript" and give it a name like "logo1". Repeat this process with a couple more to get the idea and add a number (logo2, logo3, ect)."
When I take care of the linkage
1.In the indentifier box: goes logo1,2 etc.
2.in the AS2.0 class:nothing
3.Linkage checkboxes: Export for ActionScript is the only checked?

The script I received is as follows:
var rndNum:Number = Math.round(Math.random()*20);
this.attachMovie("circle"+rndNum, "logo1_mc", this.getNextHighestDepth(), {_x:100, _y:100});
Should the "circle" = logo?
What does the "logo1_mc mean? Should I have named the images _mc?
Does the" _x:100" position the movie clip on the stage?

Can I be anymore confusing?

Thanks

Constraining Moviclips
Hi
Dose anyone know if it is possible to constrain on moviclip to another at run time, for example when you drag one moviclip it is constrained to another.
You could for example draw a cross shape - convert is to an mc and then constrain another mc to be dragged along the cross shape.

I have attached an example of what I mean

Cheers for any help with this one

Variables In Multiple Moviclips
Hi.
I have a problem.
I want to use variables, but when I declare a variable and want to use it in another movieclip the variable doesn't do anything.



In the main-timeline I've declared:

. ID = 0;

On a button (in a movie with the name: MovieClipName) I've declared:

. on (press) {
. ID = 1;
. }

And on another button:

. on (rollOver) {
. if (ID == 0) {
. tellTarget ("_root.MovieClipName") {
. gotoAndPlay ("MovieLabelStart");
. }
. }
. }





Please help me....

Random Moviclips Playing
ok. I put this up in Flash General and nobody got it, and it seems quite simple so somebody here should be able to help...I hope

I have four identical mc's on stage, called bar1. bar2, bar3 and bar four. They have a stop on their first frame, a simple animation and then a gotoAndStop(1); on the last frame.

Also on stage is an activator clip. It is to keyframes, on the first frame is the script

test = random(5)
_root.bar(test).play();

MoviClips Order Problem
Hi,
I 'm trying to make a movie that a part of it will present
lyrics of an artist.
I have many buttons that each one calls with "tell target" a movieClip that contains the lyrics(they are load from an aexternal file).

The problem is that because the movieClips are load in the same place, the 3rd (for example) covers the 1st.

Is there a way to always appear in front?

thnx very !
chris

Help With Layering Moviclips Please? (flash 5)
Hello, im making a game but have come across a roadblock.

I have movieclips on a stage that move around and interact. My problem is these movieclips appear behind other movieclips when they should be in front and vice versa. how can i make it so that, the lower on the Y axis the moviclip is, that movieclip will apear in front?

Can't Remove Duplicated Moviclips
mornin

i'm using this code to create duplicate movieclips depending on a variable called totalRecords, which i get from an asp page counting the number of records in a database:

function thumbMov() {
var a = parseInt(_parent.totalRecords);
var b = 0;
var c = 0;
while(a>0){
thumb.duplicateMovieClip("thumb"+b,b);
this["thumb"+b]._x = c;
this["thumb"+b].mya = a;
this["thumb"+b].myb = b;
this["thumb"+b].onRelease = function(){
_root.images.gotoAndPlay(1);
_root.images.strImage = "images/gallery/" add _parent.strRecord add this.mya add ".jpg", "thumb"+this.myb;
}
a--;
b++;
c += 36;
}
thumb._visible = false;
}
thumbMov();
stop();


I am using three buttons in the code's _parent movie (called 'reel') to load in different values for totalRecords. The only problem I am having is that when the new value of totalRecords is less than the previous, i.e. 14 records to 5 records, the 14 duplicated movieclips still remain. I would like them to be deleted and replaced with the correct number.

I've tried adding a 'removeMovieClip(thumb)' and 'this.reel.thumb.removeMovieClip();' but nowt happens.

The code on the buttons currently looks like this:

on (release) {
this.reel.thumb.removeMovieClip();
strCategory = "sport";
loadVariables("gallery.asp?Record=" add strCategory, _root.gallery);
_root.gallery.reel.gotoAndPlay(1);
gotoAndPlay(2);
}


thanks for your help

Attaching Moviclips To _root
Hi i am trying to get a simple movieclip working i have 4 movieclips in the libary , i have allready set their linkage identifers to "export for actionscript" and im using

_root.attachMovie("mc1","mc1",10);
_root.attachMovie("mc2","mc2",10);

etc and im setting the _x positions correctly but i cant seem to get more than one movieclip to attach to the root .

Is their any way of getting this working without adding everything into anothermc i want to attach everything to _root for easy refrence

Thanks

Path Problems Within Moviclips
ok so here it is, on the main timeline i have a movieclip named menu_mc, within that another named menu2_mc. Also on the main timeline i have another movieclip named welcome_mc. i would like to access a certain frame within menu2_mc when welcome_mc reaches the end of its' timeline.
i have this as my action script at the end of welcome_mc.......

_root.menu_mc.menu2_mc.gotoAndPlay("home");

i have labeled the frame i want to target home. any help at all would be much appreciated.
peace
.chris.

Copying Moviclips In Library
Hi. I have a problem with flash cs3. I have a menu with several bars as movieclips, with buttons inside them and somea animation. My problem is that I can´t copy that movieclip in the library and have a new independent movieclip object. I have a "movie1_mc" in the library and a as a duplicate it a get "movie1_mc copy". Then, when I create an instance of "movie1_mc copy" and I change the text in it, it also changes the all "movie1_mc" instances and the movieclip itself in the library. Is theres anyway of duplicating them in the library and have several movisclips that look the same (just want to change some text) but are independent? I'm working in as 2.0.

Thanks

Swapping Moviclips To Stage From Library
Hope you can help

I would like to swap moviclips from the library with a moviclip that is on the stage, is this possible

Thanks

Gareth

Passing Info Trought Different Moviclips
hello everybody, can someone of you help me with this problem;
in the first html page i have a movi loaded and also in that movie a empty movi that loads movi : gelijkvloers.swf. now when you click on a button in movi gelijkvloers.swf there opens a popupwindow with a new flash movi.....what i'm trying to do is to tell from the button in gelijkvloers.swf that there must be loaded a jpg in a certain empty moviclip in that popupwindow and also variables from a txt file.
................Is this possible and how can it be done.............


thx

_alpha Moviclips Using The Tween Class
Hi All

I've got 10 duplicated MovieClips, that I fade up using the Tween class with random duration. Hereafter I want to fade all my Movieclips down to _alpha = 0 after they have finished fading using the yoyo() method, but how do I do that?! Can you help?


Code:
for (var i:Number = 0; i < 10; i++) {
car_mc.duplicateMovieClip("car_" + i + "_mc",this.getNextHighestDepth());
this["car_" + i + "_mc"]._x = Math.random() * Stage.width;
this["car_" + i + "_mc"]._y = Math.random() * Stage.height;
}


for (var i:Number = 0; i < 10; i++) {
randomTweenTime_int = (Math.round(Math.random() * 10)) + 10;
trace(randomTweenTime_int)
var AlphaUp = new mx.transitions.Tween(this["car_" + i + "_mc"], "_alpha", mx.transitions.easing.Strong.easeIn, 0, 100, 30);
}

Asfunction, Cursor States, And Moviclips...oh My
Hello all. I've ran into a bit of a snag and I'm thinking the obvious is sitting right in front of me...

I have a dynamic movieclip that is created to serve as a container for a dynamically created textfield. The textfield has html text. Within that html text is an asfunction to call a method. Code is posted below:

MovieClip(this.createEmptyMovieClip("textOneContainer_mc", this.getNextHighestDepth());
TextField(textOneContainer_mc.createTextField("textOneField", textOneContainer_mc.getNextHighestDepth(), 10, 10, 300, 30));

// Method triggered from asfunction call from html text
textOneContainer_mc.launchGlossary = function(arg){
trace("Launch Glossary Method Hit, Glossary Word: "+arg);
}

textOneContainer_mc. textOneField.html = true;
textOneContainer_mc. textOneField.htmlText = htmlString_str;

Now the issues are:
1. if applied, textOneContainer_mc onRollOver, onRollOut, onRelease, and etc seem to not allow the asfunction to be called
2. i'm using custom cursors, which work fine...however, the system hand cursor appears over the word I have linked via asfunction. I've tried using the useHandCursor = false MovieClip property, but it still appears.

I hope this makes sense, i'm a little dumbfounded on this one. The last thing I want to do is to do a split on the html text and put each word in it's own MovieClip just to achieve what the asfunction already does.

Can You Assign One Class To Two Moviclips In Library?
Hi all

I need to assign one class to more than one movie clips created in Flash CS3. Is this possible??

Thanks

Buttons In Moviclips. Can They Control The Main Timeline?
does anyone know of any actionscript that can be applied to a button that is
IN a movieclip so it can navigate the main timeline INSTEAD of just the mov
ieclip's timeline?

I've tried applying this script to a button in a movieclip:


on (press) {gotoAndPlay("scene1","1");

}


this doesn't seem to navigate the maintimeline at all though.

I would really appreciate any help

Attaching Dynamic Moviclips To A Movieclip (Label)
HI guys i m in real trouble

am calling more images in dynamic movieclips on the stage from XML file and show them on the stage after that evry movieclip is draggable and there is lots of labels (movieclips) on which i have to drag the images called from xml files and placed on that label , label is also draggable once when i placed object on the label moviecli then when i drag the label all images placed in side the label should also move with the label .

And there might be more labels and more images , i can place any images in a label or more images on different label but will work siimilarly described above .

So please suggest me and help me out ASAP.

CS3 Mcs And Btns
Can someone explain to me why Fla CS3 doesn't allow me to add actions to Mcs and Btns?

If this is really no longer an option with CS3, I don't see a point.

silo

Btns & Mcs
I just upgraded from CS2. I am creating drop nav menu for html site because spry is too generic looking, and no one in DW forum answered my question regarding customization.

My problem is that in CS3, flash is telling me that I cannot add an action to a movie clip or a button. What's with that? What good is a movie clip if you can't add an action to it? I opened some of my old .fla's and there's no problem with them. It's just when starting a fresh animation.

It's similar to js pop-ups created with DW 8. CS3 will support them, but not let you create them. Can anyone help please?

Help On Btns
help some one please. i am almost done with my new site and cant get my last btn to work. its the one titled "guyBtn" the script just isnt working.


help would be much appreciated!!!!!!!!!
x
if willing to help email me for file it wont post.


xtonyx@xtonyx.com

Help On Btns
help some one please. i am almost done with my new site and cant get my last btn to work. its the one titled "guyBtn" the script just isnt working.


help would be much appreciated!!!!!!!!!
x
if willing to help email me for file it wont post.


xtonyx@xtonyx.com

Making Btns
I am loading a image and i want to make it feel more like a btn when roll in and out i want to make the curssor to change

Code:

var loader:Loader = new Loader();
var urlReq:URLRequest = new URLRequest("images/category/"+ImageTxt);
loader.load(urlReq);
loader.x= Image_x;
loader.y= Image_y+20;
addChild(loader);
loader.addEventListener("click",onClick);
loader.buttonMode = true; // This line give me errors

Btns With Sound Different In As3?
In earlier versions of flash, I simply add the sound inside the button on a new layer setting the sync to event. When I use this same method in AS3, the overstate sound plays on the downstate as well. I guess one answer would be to just not put sound on the downstate. The fla files are too big to upload, even if I cut this down to one button. I posted the swf files. Listen closely and you can tell. The third button makes it very obvious. The only difference in these two files are the text that identifies the actionscript and the publish settings. Am I supposed to use actionscript to attach the sound when using AS3?

Btns With Sound Different In As3?
In earlier versions of flash, I simply add the sound inside the button on a new layer setting the sync to event. When I use this same method in AS3, the overstate sound plays on the downstate as well. I guess one answer would be to just not put sound on the downstate. Listen closely and you can tell. The third button makes it very obvious. The only difference in these two files are the text that identifies the actionscript and the publish settings. Am I supposed to use actionscript to attach the sound when using AS3?

Here are the files.

http://www.pixelprof.com/images/btn_sound_as2.swf
http://www.pixelprof.com/images/btn_sound_as3.swf

right-click and save target:
http://www.pixelprof.com/images/btn_sound_as2.fla
http://www.pixelprof.com/images/btn_sound_as3.fla

Hiding Btns
i am trying to hide my prev and next btns when they are not needed.
example at beginning no prev is needed and at end no next btn is needed.

any help my code is below.

Code:
stop();
var loc = 30;
//hide btn
prevBtn = function () {
if (loc<30) {
loc += 335;
_root.prevMC._visible = false;
}else{
_root.prevMC._visible = true;
}
};

prevMC.onRelease = function() {
if (loc<30) {
loc += 335;
prevBtn();
}
};

nextMC.onRelease = function() {
if (loc>30-(slider_mc._width-335)) {
loc -= 335;
}
};
//hide btn
nextBtn = function () {
if (loc>slider_mc._width-335) {
_root.nextMC._visible = false;
}else{
_root.nextMC._visible = true;
}
};

slider_mc.onEnterFrame = function() {
this._x = (loc+this._x)/2;
};

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