[F8] How Would You Organize 500 MC's On The Stage?
I'm making a real simple scene creator and I have a lot of MC's, but I don't want to litter the screen. The problem is the AS I'm using is limiting me:
PHP Code:
thing.onPress = function() { funcName(circle,"circle","circle1",-8,11 .6); };
thing is the MC on the stage and circle is the one it calls for. I can organize them into about 8 categories, but I don't know what to do about it.
SWF:
http://tivaelydoc.110mb.com/attachmovie3.swf
FLA:
http://tivaelydoc.110mb.com/attachmovie3.fla
FlashKit > Flash Help > Flash ActionScript
Posted on: 12-22-2008, 01:38 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
- How To Organize?
- How To Organize My Classes?
- How To Organize This Project
- Organize An ARRAY
- Using Folders To Organize Files, Help?
- How To Organize Data In Flash CMS...
- How To Organize A Flash Website?
- How You Organize Your Flash Files?
- How To Organize Menu And Transitions
- Whats The Best Way To Organize Flash?
- How To Organize A Flash Website
- LeArn TO OrgAniZe FLaSh TImELimE
- How To Organize Classes For Optional Inclusion?
- Best Way To Organize Classes To Keep Size Small
- Organize Thumbs In Columns + Rows?
- How Should I Organize A Large Online Catalogue In Flash?
- How To Make Use Of Lables And Organize The Layers Pallette
- How To Organize Items In Monstrous Drag-and-drop?
- Problem With Flash Menu I Cant Organize My Pages
- Ext Loaded Mc - Path Problem - How To Organize Project
- How Do You Organize Your Classes/"engines"?
- Unhappy Adjusting Columns And Rows On Stage Resize, According To Stage.width.
- Stage.width && Stage.height Doesn't Work Anymore?
- Create Array On Stage, Mathematically Referring To Objects On The Stage
- Create Array On Stage, Mathematically Referring To Objects On The Stage
- Stage.width And Stage.height Not Matching Document Settings?
- Stage.height And Stage.width Erratic Values?
- F8 Movieclip Change On Stage Causes The Entire Stage To Dissapear
- External MC Loaded On Stage, I Can Press Buttons That Are On The Stage Through It...
- Stage.width, Stage.height, Add.Listeners Problem
- MX2004 -- Stage.height And Stage.width Different From Mac To Windows
- External MC Loaded On Stage, I Can Press Buttons That Are On The Stage Through It...
- Stage.width & Stage.height Problems
- MC Moves OFF Stage Left, Appears ON Stage Right?
- Flex Stage Overtakes Flash Stage
- Stage.height & Stage.width Return 0
- Scale Proportion Past Stage But Not Below Stage
- Stage.align And Stage.scale(X,Y) Algorithms
- Stage > Origin Issue When Resizing Stage
- Help With Stage.align/stage To Browser Re-sizing
- Moving An Object Thats Off The Stage Onto The Stage
- Stage.width, Stage.height
- Stage Width Vs. Stage Height
- Stage.width Stage.height Help
- Stage Resize To That Of External Swf Stage...
- Stage.scaleMode And Stage.stageWidth
- Drag From Outside Stage To Stage And Drop
- FullScreen One Element On Stage And Not The Whole Stage
- Stage Resize To That Of External Swf Stage...
How To Organize?
I have a flash movie with a number of pieces that are going to need to load in at various times. Each of these pieces are the same size,
shape, and place on the stage. They are all fairly weighty so I don't want them to all load at the beginning - I want them to load only when
they are needed to do so (each with own preloader). Any suggestions as to best way to organize this?
thanks!
ml
How To Organize My Classes?
I have Flash MX 2004. I want to write some actionscript classes that i can import into my Flash projects. I want someone using my classes to be able to choose which class will be used to encode data. Is there a way that my main class (let's call it Service) can choose which file to reference for another class for data encoding? For instance, if I want my Service class to be a communication channel and I want to have it encode data as XML i could choose a class called SerializeXML. If I wanted my data encoded as a PHP object, i would use SerializePHP.
Ideally using my main Service class in your Flash file would not bloat your project unnecessarily by compiling a Serialize class that doesn't get used. For instance if I'm developing my Flash project to speak with a PHP server, there would be no need for SerializeXML and so it would not get included.
Is there some easy way to do this? I'm also hoping to make my class very easy to use so the users don't have to write a ton of code to choose SerializeXML vs. SerializePHP.
I imagine something like this:
Code:
import myService.*
var Service = new myService('server.mydomain.com', blah, blah);
// this line would result in SerializeXML being used for all data objects
// sent across the myService connection
Service.encodingMethod = 'XML';
How To Organize This Project
I wanty to solicit your advice for an all-flash (or 90% flash) website that will feature a lot of small photo galleries, all text and image assets to be loaded dynamically. The basic hierarchy is at the end of this message.
At first, I thought this would be a natural for a screen based presentation but given several posts I've seen at livedocs (and my own limitations of time and technical expertise), that would prove difficult.
So I think my options are:
- build each sublevel as a separate swf and dynamically load them
- use scenes (or labeled keyframes on the main timeline)
....what would you do? (And if you have an example you can share publicly, great!). Thanks in advance. Here's the structure.
Main page with buttons for six subdivisions. (Already built. Works great.)
Subdivision 1
Gallery 1.1
Gallery 1.2
Gallery 1.3...up to 12
Subdivision 2
Gallery 2.1
Gallery 2.2
Gallery 2.3...up to 12
Subdivision 3
Gallery 3.1
Gallery 3.2
Gallery 3.3...up to 12
Subdivision 4
Gallery 4.1
Gallery 4.2
Gallery 4.3...up to 12
Subdivision 5
Gallery 5.1
Gallery 5.2
Gallery 5.3...up to 12
Subdivision 6
Gallery 6.1
Gallery 6.2
Gallery 6.3...up to 12
Organize An ARRAY
hello,
in the included filez I have an array that displays buttons around a certain area inside a movieclip, my problem is, i want to display alphabetical vertical, and i only can alphabetical horizontal, i tried various things, but i´m missing something, can someone solve this for me please.
thanks in advance fausto
Using Folders To Organize Files, Help?
Hello. My files are out of control. I need to organize them in folders. Right now I just have everything in one root folder. How do I access files that I have put in a folder, lets say picture_folder, that is located in my root directory. Also, will it work the same on my computer as if it were on my server?
thanks.
How To Organize Data In Flash CMS...
Hi again.
Currently I'm learning about making Flash CMS.
But I have a problem about how to organize the data(I use SQL and PHP) and sections in Flash...
See, all my script in either PHP and Flash are soo.. not organized. and this is confusing when I want to continue further... I didn't even create Folder in my Library to categorized things...
Can anyone give an outline how to organize them?
Or are there any tutorial about how to organize data along with organizing the scripts, so that it will be much much easier to handle, memorize and of course fun?
Many thanks.
How To Organize A Flash Website?
Can anyone link me to a tut explaining how to organize a site? Particularly, do you build a main 'site' movie and load child pages on button movie presses or mouse clicks?
Thanx.
How You Organize Your Flash Files?
How you organize your flash files?It is so hard when you have tons of fla and swf files to remember what contains every file.For now my method is to create an image of the flash file if the flash file have graphic elements,to add a text with keywords and notes(this way I can use a desktopsearch program for finding my fla).
How To Organize Menu And Transitions
Hi guys,
sorry, it's probably a stupid question.
I often have some doubts, when i build flash sites, about which approch is better to organize menus and transitions.
I often have this situation:
1) user click a button of the menu
2) I launch the transition-out of the current page
3) when the transition is complete I launch the transition-in of the new page
What happen then, if the user click another button before the transition out is finished?
I see some option:
option 1#
I call a function that instantly stop the tweens and remove the page before the transition-out ends.
This is good for the user because he doesn't need to wait time to access the content he want but it's very ugly to stop the transition in the middle.
option 2#
I can disable the menu until the transition is finished.
This allow the transition to complete there route but old Jakob Nielsen will not be happy
option 3#
I could register the click events of the user and, when the transition out finish, the application can launch the last required page. It doesn't help at all because the user didn't get his page immediatly and when the transition out finish he will be surprised to get the new page with a lot of delay from his request.
What do you think is the better way?
thanks a lot if you can share yours...
Whats The Best Way To Organize Flash?
I'm starting to work more and more in flash and most of it has been small stuff that doesn't hog up the timeline but now the projects are getting larger and was wondering what the best steps are to organizing motion tweens and I suppose organize in general. Is there any rules of thumb to follow when building flash apps?
Thanks.
How To Organize A Flash Website
Can anyone link me to a tut explaining how to organize a site? For example, do you build a main 'site' movie and load child pages on button movie presses or mouse clicks?
Thanx.
LeArn TO OrgAniZe FLaSh TImELimE
I need to create a full flash website for a client but the past few projects I did has been a mess. It has been buggy and hard to debug. Actionscripts were flying all over the place, some deep down inside movieclips.
How do I learn to organize my timelime? How do i learn to place my actionscript for my flash movie. Where can i get to learn all these? Books only teach the basic, I need some real pratical stuff. Thanks
How To Organize Classes For Optional Inclusion?
I have Flash MX 2004. I want to write some actionscript classes that i can import into my Flash projects. I want someone using my classes to be able to choose which class will be used to encode data. Is there a way that my main class (let's call it Service) can choose which file to reference for another class for data encoding? For instance, if I want my Service class to be a communication channel and I want to have it encode data as XML i could choose a class called SerializeXML. If I wanted my data encoded as a PHP object, i would use SerializePHP.
Ideally using my main Service class in your Flash file would not bloat your project unnecessarily by compiling a Serialize class that doesn't get used. For instance if I'm developing my Flash project to speak with a PHP server, there would be no need for SerializeXML and so it would not get included.
Is there some easy way to do this? I'm also hoping to make my class very easy to use so the users don't have to write a ton of code to choose SerializeXML vs. SerializePHP.
I imagine something like this:
Code:
import myService.*
var Service = new myService('server.mydomain.com', blah, blah);
// this line would result in SerializeXML being used for all data objects
// sent across the myService connection
Service.encodingMethod = 'XML';
Best Way To Organize Classes To Keep Size Small
I have Flash MX 2004. I want to write some actionscript classes that i can import into my actionscript. I also want a user using my classes to be able to choose which class might get used to encode data. Is there a way that my main class (let's call it Service) can choose which file to reference for another class? For instance, if I want my Service class to be a communication channel and I want to have it encode data as XML i could choose a class called SerializeXML. If I wanted my data encoded as a PHP object, i would use SerializePHP.
Ideally using my main Service class in your Flash file would not unnecessarily include classes that do not get used. For instance if I'm developing my Flash project to speak with a PHP server, there would be no need for SerializeXML.
Is there some easy way to do this? I'm also hoping to make my class very easy to use so the users don't have to write a ton of code to choose SerializeXML vs. SerializePHP.
Organize Thumbs In Columns + Rows?
how would you make these clips organize in columns and rows?
Code:
for (var b=0; b<gallery.childNodes.length; b++) {
item = _root.nav.attachMovie("itemClip", "itemClip" + b, b);
item._x = 10+24*b;
item._y = 20.0;
item.mytitle=gallery.childNodes[b].attributes.title;
item.imagepath=b;
orginal source file: not 100% but pretty sure this is some of Scotty's work
thanks in advance for any help
sky
How Should I Organize A Large Online Catalogue In Flash?
I've been charged with creating a large online catalogue of over 200 necklaces in Flash. The necklaces are organized in groups of 30. (6 groups). So far, I've done it where you click on a button for each necklace and it takes you to a certain point in the timeline but I'm not sure if I should do this for 240 necklaces.
Anyone have any recommendations how I should set up this site?
thnks!
How To Make Use Of Lables And Organize The Layers Pallette
well i'm wondering since i shouldnt use scenes from what i've read that when i do use lables how do i do so. If i wanna make a website do i make 1 scene, and convert my buttons and content to MC and then double click the MC's and put in the movement for that button and lables inside of that and THEN put the release functions and all that on the main scene to tell it what to do (ex. to do the animations i've made inside the MC iteself).
Also whats the best way to organize a whole site in the layers and timeline pallette so i dont get confused?
This is very confusing and nomatter how many tutorials i read i cannot grasp it. Thank you.
How To Organize Items In Monstrous Drag-and-drop?
I don't know where to put this. :s
Anyway, my problem is that I have a ton of items [loook] that I want to put in one drag-and-drop. The problem is, I can't just put them all out in the document like I have done in the past- there are just too many. But I have no idea what to do! Is there a way I could hide some items until a button is clicked, and then the items will b temporarily visible, but once they are dragged to a certain place, become permanently visible? If not, an alternative set-up suggestion would be brilliant.
please help! ; ^;
Problem With Flash Menu I Cant Organize My Pages
Well I decided to go with a flash menu on my website so if any main menu items need to be changed, all I have to do is update the .swf file and all the pages will be updated. unfortunately I have now run into a dilemma. I originally just had all my main pages (index, contact, products) Within the same folder and the menu works fine. The only problem is as I add more and more pages I would like to start placing pages in folders, But if i put one of the HTML files in a folder than when the .SWF menu trys to link it dosent work becasue all of the pages need to be in the same directory! It would be more harm than good if I had to make a whole lot of different menu files depending on where the HTML page is located. How in the world can you have a flash menu for a website AND have neatly organized pages? Hopefully i've made myself clear...Anyone have any idea of what I can do??Thanks guys!
Jon
Ext Loaded Mc - Path Problem - How To Organize Project
I load like every time ext. swf into main movie.
Exist any way how to find out the path of the loaded movie. :?:
I am used to have in external movies control of actions and buttons.
I fight with this problem every time.
Is somewhere discribed how to use working with code if you load external movies?
I have some code in external movie and access some functions is than not easy - path problem mostly.
Than look the code like this and I waste my time what path is wrong :cry: :
Code:
_parent._parent._parent._parent.indicator.windowWhirpools_mc.title_top.html = true;
_parent._parent._parent.indicator.windowWhirpools_mc.title_top.htmlText = _parent._parent._parent.myVars.var_section_name_04;
Thanks
How Do You Organize Your Classes/"engines"?
Hey all.
Ive started making a test 'game', its more of just a learning project though.
what has in it so far is:
20x20 grid
click on the tile and it puts a turret on it
function to create X amount of enemies, start at the bottom of the grid and go up
turrets point at the enemies
i will add things like range and that when the time comes, but as i said im still learning, and am hitting problems.
as it is now, i have different classes for enemy, turret and tile. each class has an onEnterFrame function, to make them move, point, or whatever.
Is this bad practice?
im getting problems switching between local and global coords, maybe because i dont understand it properly.
Is there a better way of doing games like this?
A way to avoid the coords problem?
if you know of any tutorials or idea's they would be appreciated!
thanks,
Gareth
Unhappy Adjusting Columns And Rows On Stage Resize, According To Stage.width.
Hey fello flashers,
what i'm trying to achieve can be seen here, at the FWA's website.
When you resize the browser window the thumbnails rows and columns adjust accordingly to fit.I've managed to attach the thumbnails correct when my enableButtons() function is called but i'm unsure how to approach resizing.
if anyone has encounted this problem before or can help, then pls do i'm a little confounded on this one.
thanks
cam
Stage.align = "TL";
var numberOfGalleries:Number = 20;
var thumbMarginX:Number = 163;
var thumbMarginY:Number = 109;
function init():Void {
enableButtons(numberOfGalleries);
resizeStage();
}
function enableButtons(numberOfGalleries:Number):Void {
currentRow = 0;
currentColumn = 0;
for (i=0; i<numberOfGalleries; i++) {
tracker = i;
thumbsDisplayer = this.createEmptyMovieClip("thumbsDisplayer_mc", this.getNextHighestDepth());
currentThumbnail = thumbsDisplayer.attachMovie("thumbnail holder", "thumbnail"+(tracker+1), thumbsDisplayer.getNextHighestDepth());
currentThumbnail._x = currentColumn*thumbMarginX;
currentThumbnail._y = currentRow*thumbMarginY;
currentColumn++;
if (currentThumbnail._x>(Stage.width-(currentThumbnail._width + thumbMarginX))) {
currentRow++;
currentColumn = 0;
}
}
}
function resizeStage() {
var myListener:Object = new Object();
myListener.onResize = function(e:Object):Void {
//
}
Stage.addListener(myListener);
}
init();
Create Array On Stage, Mathematically Referring To Objects On The Stage
Ok what I want to do is create a set of small images on the stage and name them sequentially like you would an array, then refer to them mathematically in actionscript. I tried naming them as an array but it says that the name is reserved for the system or something. Does anyone know how to get an array of objects onto the stage, or have an idea of something else I could do to get the same effect?
Create Array On Stage, Mathematically Referring To Objects On The Stage
Ok what I want to do is create a set of small images on the stage and name them sequentially like you would an array, then refer to them mathematically in actionscript. I tried naming them as an array but it says that the name is reserved for the system or something. Does anyone know how to get an array of objects onto the stage, or have an idea of something else I could do to get the same effect?
Stage.width And Stage.height Not Matching Document Settings?
Ok, so I have no idea why this would be happening and its driving me nuts. I have my Flash movie size set to 960x650. However, when I trace stage.width and stage.height, I get:
950.05x630
Why in the world would this be happening? It's screwing up all the work I'm trying to put into positioning elements relative to the stage size. Thanks for any help!
Stage.height And Stage.width Erratic Values?
Hey folks,
I was wondering if it happens in all Flash everywhere, or just in mine:
When I trace Stage.height and Stage.width, I always get erratic values:
Stage.height gets me always 4 pixels less than real
Stage.height gets me always 104 pixels less than real
This, way if my stage has 760 x 400, it will return values 756 x 296.
Anybody knows why?
Thanks!
F8 Movieclip Change On Stage Causes The Entire Stage To Dissapear
I have my stage with a background picture.
On stage left are buttons, and on stage right I have a movieclip (mc_Preview).
When the user puts his mouse over each button I would like the movieclip to move to a different frame.
the problem is when the mouse moves over a button, i see the movieclip move but then the entire stage dissappears and turns a few shades of gray.
Does this sound familiar to anyone?
Any help would be greatly appreciated!
External MC Loaded On Stage, I Can Press Buttons That Are On The Stage Through It...
I'm used to AS3, and I don't have much experience in AS2. I'm trying to modify an older flash file done in AS2.
An external swf is loaded using this code...
ActionScript Code:
on(release) {
loadMovieNum("supplimental/external.swf", 500);
}
The problem is that even though this external movie covers the whole stage, My mouse can still "see" buttons that are on the stage, and I can click them. I don't want to be able to click the buttons through my external movie. Thanks for any help.
Stage.width, Stage.height, Add.Listeners Problem
Hi
i found the way yesterday to ensure my mc stays full screen. now i want to animate the same mc if i can in reaction to a button click.
not sure how this next step goes. do i need another addlistener to the background mc that im tweening ?
kindly check the .fla. to see what i mean.
its very rough cut but hopefully you can get the gist of it.
when the text button is clicked, the bg reverts to the top left of the screen.
thanks
-dj
MX2004 -- Stage.height And Stage.width Different From Mac To Windows
I have a really strange problem that is ruining my movie. I have set the size of the stage to 450px by 400px in the properties dialog. In my actionscript, I've got all kinds of things that rely on Stage.width. So, I developed everything in MX2004 on Mac, and everything worked swimmingly. So, I opened up the exact same file in MX2004 and everything is placed wrong on the stage. So when I did a trace of Stage.width, I got 940px, and a trace of Stage.height gave me a figure of 763 pixels. If I do the same traces on the Mac, I get what I expect, 450px for width and 400px for height. Does anybody have any ideas as to what might cause this kind of discrepancy?
Thanks,
John
External MC Loaded On Stage, I Can Press Buttons That Are On The Stage Through It...
An external swf is loaded using this code...
Code:
on(release) {
loadMovieNum("supplimental/external.swf", 500);
}
The problem is that even though this external movie covers the whole stage, My mouse can still "see" buttons that are on the stage, and I can click them. I don't want to be able to click the buttons through my external movie. Thanks for any help.
Stage.width & Stage.height Problems
Why is it when I use this script attached to an empty movie clip the box seems to always be short on the height side? The width is fine. See attached FLV.
frame.fla.zip
Thanks in advance for any feedback.
Code:
onClipEvent (load) {
this._x = 0;
this._y = 0;
this.moveTo(0, 0);
this.lineStyle(1, 0x000000, 100);
this.beginFill(0x000000, 0);
this.lineTo(Stage.width-1, 0);
this.lineTo(Stage.width-1, Stage.height-1);
this.lineTo(0, Stage.height-1);
this.lineTo(0, 0);
this.endFill();
}
MC Moves OFF Stage Left, Appears ON Stage Right?
i have an MC that is being moved left and right by the arrow keys. (no up or down movment)
i want to make it so when the MC is moved and disapers off stage left or right, it appears on the opposite side of the stage...
MC moves off stage right, comes on stage left.
MC moves off stage left, comes on stage right.
Belwo is my code that moves my MC, what do I need to add for the above action?
ActionScript Code:
var oldladyspeed:Number = 5;
stage.addEventListener(KeyboardEvent.KEY_DOWN, downHandler);
function downHandler(event:KeyboardEvent):void {
if(event.keyCode == Keyboard.LEFT) {
oldlady.x -= oldladyspeed;
}
if(event.keyCode == Keyboard.RIGHT) {
oldlady.x += oldladyspeed;
}
}
THANKS
Flex Stage Overtakes Flash Stage
I'm loading a flex swf into a flash swf, and it seems that flex takes over the stage in quadrant 4, if you look at as a grid:
-------------|-------------
-------------|-------------
-------------|-------------
__________o__________
-------------| **********
-------------| *Quadrant*
-------------| ****4*****
And at the origin is the top left corner of the flex swf.
Now since the flex swf only takes up a small amount of Quadrant 4, when an Alert message from the flex swf comes up (from mx library) it looks up professional since it is not placed in the center of the application, but the center of quadrant 4.
Does anyone know, how to restrict stage access to only the predefined application width and height so the Alert message will be centered in the flex swf.
Thanks in advance,
Basil Al-Dajane
PS. worth mentioning, I'm using Flash CS3 and Flex 3.0, both running on ActionScript 3.0
Stage.height & Stage.width Return 0
First, hey there, cool forum. This is my first post...anyways...
I'm having what, I want to assume, is a common issue and there's something I'm missing here...I have a flash movie that works fine (that is Stage.height and Stage.width) return their proper values when the actual SWF is played in the flash player, however, when I put the movie into an HTML page and set it's height and width to 100%, Stage.width and Stage.height are 0 and my neato script breaks.
I realize I'm scaling the movie, but it seems to me that Stage.width and Stage.height should work regardless...and the fact it gives me 0 is even more odd, as though it's not working at all.
Scale Proportion Past Stage But Not Below Stage
This goes out to Scotty or any other guru floating around out here.
I need the image_mc movieclip in this .fla to scale to fit browser, however i need the image to scale in proportion. I would also need a listener of sorts that will NOT allow the image_mc movieclip to scale below the stage size of 1024 x 768.
Can anyone drop some science on me?
http://www.spent2000.com/scale_propo..._for_stage.fla
Thanks in advance.
- 400x5
Stage.align And Stage.scale(X,Y) Algorithms
Hello, I'm after a good way to take a image scale it to where:the image scale propotionately (image.scaleY == image.scaleX);
the image must scale to fit the browser, But.
the image must not leave empty areas of the stage exposed (upscale the image if needed to cover blank stage area exposed, which will clip off a end of the image and thats where Stage.align comes in)
the stage.align will help give scale orientation, meaning from what direction will the image scale. This is important since this can cause a few problems with centering of the image upon rescale and you also want to know what end is most likely to get clipped off in the event that the image needs to upscale to cover blank stage areas.
as I have it now
_imageHolder is a hypothetical image and stage is a reference to the stage.
I know this algorithm is not a best practice and it don't cover the stage completely. Any help would be great.
PHP Code:
if((_imageHolder.width >= stage.stageWidth) && (_imageHolder.height >= stage.stageHeight)){ if(_imageHolder.width >= stage.stageWidth){ _imageHolder.width = stage.stageWidth; _imageHolder.scaleY = _imageHolder.scaleX; }else if(_imageHolder.height >= stage.stageHeight){ _imageHolder.height = stage.stageHeight; _imageHolder.scaleX = _imageHolder.scaleY; } }else if((_imageHolder.width <= stage.stageWidth) && (_imageHolder.height <= stage.stageHeight)){ if(_imageHolder.width < stage.stageWidth){ _imageHolder.width = stage.stageWidth; _imageHolder.scaleY = _imageHolder.scaleX; }else if(_imageHolder.height < stage.stageHeight){ _imageHolder.height = stage.stageHeight; _imageHolder.scaleX = _imageHolder.scaleY; } } }
This event will be in a function that fires when the stage rescales or when the image loads.
Also what is a good idea to deal with the stage.align problems that can come up?
Stage > Origin Issue When Resizing Stage
Hey. Its 7:00am and Im dead tired looking for an answer to my noob question.
Basically I was wondering if someone could explain to me why the origin of the stage changes when performing a browser resize?? The thing is that when it is resized to a size larger than the original stage size the origin has negative values. On the other hand when I resize the stage to a size smaller than the original I get positive values for the origin. (Upper Left hand corner).
Ive tried setting the stage.align property to top left but i still get these crazy values and i was just hoping that someone could explain this behavior to me.
Too make matters even worse is that the results I get when previewing the movie in the IDE Flash Player is not even close to the results I get in the browser Flash Player. Could it have something to do with the fact that I recently installed Flash Player 10?
Id also like to take advantage of this thread to ask if it is possible to set the stage w/h to 100% via the swf metatag. Ive tried to do this but have been unsucesful.
Here is the link... which is not even close to what Im seeing when previewing in the Flash IDE. '
http://www.pixelbrigade.com
Help With Stage.align/stage To Browser Re-sizing
Hi Guys..
I wonder if you can help... I'm wanting to create a flash site that has a fluid layout.
I've attempted to follow various tutorials and looked through the books that I have, but at present I'm struggling.
I'm using CS3 on the Mac platform and I'm really quite new to actionscripting.
I want to create a page which has a "menu" hugging the top left hand corner of the browser, a "footer/heading" sitting at the bottom right (both with a slight margin from the edges of the browser window). Then once completed I will add a central area for the main content.
* Can I do this with the Stage.align coding and using "listeners?"
* Is there a particular stage size that works best for designing a site/layout like this?
* What I have attempted so far, is it actually resizing to the browser size at all?
Can anybody please help, I've asked around on a few other forums and as I said looked at tutorials but I can't seem to apply the coding to achieve the results that I want!
Thankyou in advance!
(I will post a link to what I have so far.. I just need to make a few amendments)
Moving An Object Thats Off The Stage Onto The Stage
For a Flash class thats coming up we need to do a little game. Now my idea is to make a GTA 1 style game. We have the car movements down but what i'm having trouble with is making the car stay centered and moving objects that arnt currently onto the screen onto the screen. EG Car is in the center (Always stays in the center) Car moves forward, the background (Road, buildings etc...)Move down the screen and new objects apear on top the screen and move downwards or right, left upwards depending on the direction the car is moving. Any help would be greatly appericated.
Stage.width, Stage.height
Does anyone know why the stage dimensions are coming out wrong. I have a movie set at 800 x 600. I do trace(Stage.width);
trace(Stage.height); and get 796 and 596. What's going on here? I have seen at least one other post with the same issue, but there were no responses.
Best regards...
Lance
Stage Width Vs. Stage Height
hello.
still looking how to maintain max. stage width and height. i have managed to achieve it on the width, but for some reason have been unable to do it for the height. that is, i have managed to make a line go from one side to the other (almost) but cant figure out how to do it on the vertical.
zbot is the horiz line at the botton
ztop for the one above
the problem, is for xleft (the vertical lineon the left)
i have included what i think to be the nearest code yet, and a fla.
any help, thanks a lot.
Code:
Stage.align = "LT";
Stage.scaleMode = "noScale";
bg._width = System.capabilities.screenResolutionX-20;
bg._height = System.capabilities.screenResolutionY-70;
bg.onResize = function() {
this._x = (Stage.width-this._width)/2;
this._y = (Stage.height-this._height)/2;
};
Stage.addListener(bg);
zbot._x = 62;
zbot.onResize = function() {
this._width = Stage.width;
};
Stage.addListener(zbot);
////
xleft._x = 270;
xleft.onResize = function() {
this._height = Stage.height;
};
Stage.addListener(zbot);
////
ztop._x = 62;
ztop.onResize = function() {
this._width = Stage.width;
};
Stage.addListener(ztop);
// get the content clip to stay fixed horizontally centred
content.onResize = function() {
this._x = (Stage.width-this._width)/2;
};
Stage.addListener(content);
// manually invoke the onResize events for the clips to start things off
bg.onResize();
zbot.onResize();
ztop.onResize();
xleft.onResize();
content.onResize();
Stage.width Stage.height Help
I have the main swf(main) which loads in another swf(loaded). The loaded swf looks at the main swf for the Stage.width and height.
Is there a way for the loaded swf to look at its own Stage.width and height and not main?
Stage Resize To That Of External Swf Stage...
Hi everyone, and thanks in advance for reading...
I am trying to make an online display application...with two views...standard view, and full screen view...
the standard view can be seen at www.expocadvr.com/temp/default.html
I have a main SWF file which contains a movieclip which the two external SWFs are being loaded into...
the difference between the two views is the size of the main vewing window...in the fullscreen version, the window takes up the whole browser window(with small margins) and I want this view to be scalable to the broswer so if the user changes the browser size, the window will resize as well...
In the standard view, the tools are visible on the left, and I do not want the movie to scale with the browser, I just want it to center on the browser...
how would I go about changing the stage size of the main movie to accomodate the two different stage sizes of the external swfs and at the same time have one scale and center, and the other only center...
please help.
Thanks,
Paul
Stage.scaleMode And Stage.stageWidth
What am I missing here? According to the docs:
Quote:
When the value of the scaleMode property is not set to StageScaleMode.NO_SCALE, the stageWidth property represents the width of the SWF file as set during authoring in the Document Properties dialog box. This means that the value of the stageWidth property stays constant as you resize the Flash Player window. This property cannot be set.
So stick this in a new FLA
ActionScript Code:
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, onResize);
function onResize(e:Event=null):void
{
trace( stage.stageWidth );
}
and the traces are of different values. According to the docs, this shouldn't be happening. What's going on? Did I miss something little?
Drag From Outside Stage To Stage And Drop
Hey folks,
I've been banging my head on this certain question for ages now. Is it possible to drag something, that is outside Flash, into Flash and drop it on the Stage and then read what it is? And then of course, I mean in the Player - not the authoring tool itself. The idea is to be able to pick, for instance, the URL from the browser and drop it onto the application and then the app can read the URL and do something with it. Same for other pieces of intel: bookmarks, pieces of text, notes, maybe images and so on. Issue like this is fixed in Java within a jiffy, but is it also possible in AS3? Anyone experience with this stuff? I'd be happy with any help, and thanks for reading!
- lwmxynedtodth
FullScreen One Element On Stage And Not The Whole Stage
Hello Smart People.
Imagine a stage. Imagine a series of images (smaller than the stage and spread out evenly) that have been loaded into a bunch of "swfContainer" movieClips via the Loader Class. Is it possible to make one of these "swfContainer" movieClips go FullScreen and nothing else (i.e. not the entire stage, just the _mc that one of these images sits in)?
Would be cool if there was a way. Any insights?
-ropeGun
Stage Resize To That Of External Swf Stage...
Hi everyone, and thanks in advance for reading...
I am trying to make an online display application...with two views...standard view, and full screen view...
the standard view can be seen at www.expocadvr.com/temp/default.html
I have a main SWF file which contains a movieclip which the two external SWFs are being loaded into...
the difference between the two views is the size of the main vewing window...in the fullscreen version, the window takes up the whole browser window(with small margins) and I want this view to be scalable to the broswer so if the user changes the browser size, the window will resize as well...
In the standard view, the tools are visible on the left, and I do not want the movie to scale with the browser, I just want it to center on the browser...
how would I go about changing the stage size of the main movie to accomodate the two different stage sizes of the external swfs and at the same time have one scale and center, and the other only center...
please help.
Thanks,
Paul
|