Actionscript 3 :: Make The Actual Stage Dynamic To The Content Loaded In The Flash File?

Nov 9, 2011

I was wondering if there is a way to make the actual stage dynamic to the content loaded in the flash file.

Firstly the method I am using is importing a external swf to the stage into a container called container. The main stage, lets call it index, is still on default size, and I want this to expand dynamically as content is loaded in. page1 may be 900px width, page2 may be 500px width, and as I load the content the index stage should expand the width to that of the page loaded. Some steps I have tried but did not work.

if page1 button is pressed stage.stageHeight = 900; - not working (how do I set stage size in as3)made a movieclip in page 1 spanning the page size and called it p1_stage so I can reference the data from there. trace(container.p1_stage.height); gives this error: TypeError: Error #1010: A term is undefined and has no properties. at index_fla::MainTimeline/frame1()

View 3 Replies


Similar Posts:


ActionScript 1/2 :: Make A Simple Flash 500x300 With A Dynamic Content From Certain URL?

May 9, 2009

how to make a simple flash 500x300 with a dynamic content from certain URL

View 3 Replies

IDE :: Scolling Content (A.S 2) - Cant See The Actual Content?

Jan 15, 2009

I have a problem with scrolling content.I m using the information and files from the following tutorial...http:[url].....The scroller is working but I cant see the actual content.I cant figure out what the problem is, I�ve uploaded the .fla file so that you can check it out...http:[url]......

View 2 Replies

ActionScript 3.0 :: Masking Out Off-stage Content Of Loaded .swf?

Aug 28, 2009

I'm just starting out with AS3 and this is what I'm trying to do:

1. I have an external .swf banner which is 900x250 pixels

2. I want to load this .swf into my main project, using this code:

var myLoader:Loader = new Loader();
addChild(myLoader);
var myRequest:URLRequest = new URLRequest("ptp.swf");
myLoader.load(myRequest);

3. The problem is that the .swf banner that is being loaded has content 'outside the stage' so instead of just showing the 900x250 area I see all the off-stage content as well.

How do I 'mask out' the off-stage content of the loaded .swf so that it will be only the 900x250 that I want?

View 2 Replies

Flash :: Make An Entire File's Content Into A Movie Clip?

Aug 27, 2009

So as to make things less confusing (I had a lot of different layers), I made each scene in my animation in its own file. Now I want to put them in the same file, so I thought I could make everything in one file into a movie clip and put it into another file that way.

However, it doesn't seem to work! I can highlight everything, convert it, and paste it into the other file... but when I paste it, it only pastes the first frame of my highlighted selection! How can I convert the whole thing into a movie clip instead of just one frame?

View 5 Replies

ActionScript 3.0 :: Flash Simple LocalToGlobal - Indicate Its Actual Location On The Stage?

Dec 4, 2010

Ive tried looking in a whole bunch of threads for a solution to this probably common issue but to no avail.I have a bunch of objects of same type on the stage which are generated through code.Inside these objects which are generally at x=300 on the stage.

Code:
this.x+=2.3;
trace(stage1.localToGlobal(new Point(this.x,this.y)), ", ", this.x , " ", this.y);

stage1 is the stage object I pass into my class.The trace output is as follows

(x=2.3, y=0) , 2.3 0

Now im expecting some values in there somewhere to indicate its actual location on the stage, ie, x=300.This isnt happening.Whats the correct syntax i should be using.

View 4 Replies

Detecting When Actual Content Of MC Collides With Other

Mar 31, 2009

I've been messing around with hittest and I can't figure out how to detect when the actual content of the MC collides with the other's, rather than just detecting when the bounding boxes collide.

View 3 Replies

Flash :: Make The Actual Application/widget?

Jul 5, 2011

I have made an analog clock in adobe flash CS5 and want to make it a proper application. When i create an exe file it will run in flash player or firefox etc., which i dont want. Visual Basic 8 could not help me either.

So my question is: How do i make a real, self running and self installing application for this flash clock?

There are hundreds of clocks to download on the net, which run on there own and do not open in flash player. How is this done?

View 1 Replies

ActionScript 3.0 :: Drag Dynamically Loaded Content Beyond Stage Borders

Jul 28, 2010

I have simple file 550 x 450, in it there is one container 400x300, x:75, y:78. In the container I am loading images and there is drag and drop function for them. I also have added mask with size that matches the size of the container because when i load larger images i could move them. Everything is working fine, but If I set scaleX and scaleY to the container image, the drag and drop functionality is not working fine - I can't reach the edges of the picture.

Code:
with ( m_mask.graphics )
{
beginFill( 0x000000 );

[Code].....

It behaves like there is not enough space to move the image right, left, top or down.

View 1 Replies

ActionScript 3.0 :: Created A Dynamic Text Box And Have Xml Content Loaded?

May 12, 2010

I have created a dynamic text box and have xml content loaded into via a for loop. I would like for each item in the list to be clickable and fire off a different function.

[Code]...

View 3 Replies

ActionScript 3.0 :: Link Dynamic Content From XML And MC's On Stage?

Jul 8, 2009

I'm pulling news information from an XML file. The root node is "article", the child nodes are (for example) "date", "title", "caption", "copy", "link", etc.

For each article, two new buttons are added to the stage.

1st button - on rollover, display the date & title for that article in a small movie clip w/ dynamic text fields.

2nd button - on click, display ALL nodes listed for that article in a large movie clip updating only the dyn text fields

What are some methods I can use to automate the process? That is, to avoid writing an if/else statement and some code to filter the XML properly for each and every article?

I need to somehow connect the XML content and the movie clips I add to the stage dynamically.

Is it common to write two ID attributes for each XML node? Unfortunately, each article isn't in sequence and older articles could be added even amongst the new ones... so a better "ID" would be the date of the article. Would that screw up automation?

View 1 Replies

ActionScript 1/2 :: XML Loaded Content Not Working With Html Dynamic Text Field?

Aug 18, 2009

I'm trying to load an XML file and place the content into a dynamic text field.  The XML nodes contain content within CDATA sections that have basic <b> and <i> tags.  Once I have the content loaded into a variable and trace it, I can see all my tags within.

I then place the content into a dynamic text field with html set to true but for some reason it doesn't show any formatting, the tags appear to have been rendered because they don't show up inline.  I thought maybe this was due to embedded fonts but i have all of my bold, bold italic, italic and regular font's within a text field embedded so I wouldn't think thats an issue.  Is there something I'm overlooking?

View 6 Replies

ActionScript 3.0 :: Can Buttons/assets Be Loaded Externally And Referencing Dynamic Content By Name

Jul 30, 2009

I have a widget containing a number of displayobjects, i.e. up arrows, down arrows, tab 'buttons', backgroundrectangularblocks, sliders, company logos etc.I am currently creating these displayobjects using the graphics class with parameters taken from an external file, things such as fontsize, font, colour, width, height e.t.c and adding them as children of "container" sprite objects for easy manipulation and referencing later can these assets be loaded in their entirety externally, rather than being created using graphics class draw methods (which I want to avoid) as some of the things I need to design cannot be created in pure actionscript very easily (if at all?), and then used or do they always have to be in the library and instantiated from there?

if the first question is yes they can be loaded externally, this question probably isn't needed; however, if I have to put the items in the library and recompile each time a client wants to use say a curved blue up arrow instead of a yellow one and then decides he wants a yellow circle instead then how do I write the code to do the following:-Say on my first ever compile I have 'upArrowBtnset1' in the library, I instantiate it and use the instance name to access it in the usual way using standard code,

upArrowBtnset1.addEventListener.... container.upArrowBtnset1.scaleY = .3 e.t.c

Now if they send me a second set of 'upArrow' graphics they want to use I could either update all the upArrowBtnset1 assets with the new graphics meaning the original set is no longer available to the client and I would either have to hold a "original set" FLA file with the first set of arrowbuttons or I could import these to the library as upArrowBtnset2 and a third set they send as upArrowBtnset3 and so on each time I am sent some new assets; I would then recompile them into the SWF and adjust the references to the new assets within the code. In the code, for each instance of "upArrowBtnset1" I would have to rename them to "upArrowBtnset2", recompile and send it back to the client.

Because I have already abstracted the font/colour/size choices out to an external file, they can change that as much as they like without a recompile which is what we want. The problem comes if they want to use set1 again and haven't kept the original "set 1" compiled SWF. It would be easier to abstract the 'setchoice' also to the external file. The SWF would over time build more and more available sets that they could use by just changing an external variable.

For example, if the designer wants to use set 1 on Monday, set 2 on Tuesday and set 3 on Wednesday I want to make it so they can just adjust an option in an external file to "setchoice = 3" for weds instead of either having to recompile the swf each time or they have to have 3 versions of the SWF for each asset set. The idea is that as more and more assets are added in, they have more and more choices. Ideally, in an external file there would be a list of assets and links to where they are loaded from. (i.e question 1 above).

If I have an external file (say XML) which holds the setchoice option that the designer wants to use (say they want set3 today) my 'generic' code has to be something like upArrowBtn(setchoice).scaleY and every instance in the code where that object is used I append the 'setchoice' as chosen by the designer from the external file where (setchoice) is retrieved from something like var setchoice:String = "set3"; from the external file (I am currently abstracting all the adjustable variables to a configuration.as file. I will work on using an XML later when the principle of external files works (I hope!);

Is it possible to import assets from external sources and then use them in the SWF as if they were in the library? The loader class? Is this just fraught with danger I wonder.

Essentially I am being asked to remove as much as I can from the SWF so that if the client wants to change the positioning of things on the stage or the text on buttons or change the style of the buttons or the company logo they don't have to come back to us to ask for a recompile of the SWF for each tiny adjustment. Inevitably SOMETIMES a recompile will be unavoidable (such as if they want the widget to suddenly be twice as wide (i.e. the stage). My code already handles some of this using stage.stageWidth and then positioning objects relative to other objects already on the stage using this value and centred so that just changing the document properties is all I would have to do and everything else adjusts proportionally. I am trying to make this as reusable as possible with as little effort from myself as possible to save our company wasted time.

After all that waffle, my question is this, if I can't load all my buttons and assets and things externally, how do I write the code for this:- I have a library asset called upArrowBtnset1 and another called upArrowBtnset2. Instantiated with say upArrowButtonset1 and upArrowButtonset2 The code would normally be upArrowButtonSet1.x = 100; upArrowButtonSet2.y = 300; but I need it to be upArrowButton(setchoice).x = 100; upArrowButtonSet2(setchoice).y = 300; where (setchoice) comes externally from var setchoice:String = "set1";How does the code change if the (setchoice) string was named not at the end i.e 'button(setchoice)UpArrow'?

ActionScript Code:
var numClips:Number = 5;
for (var i:Number = 0; i < numClips; i++)

[code]....

I need to do something like, getChildByName("mainTab"+i).addChild(myMovieClip) ? or maybe this["mainTab"+i].addChild(MovieClip)?Is it possible without using .name?

View 0 Replies

ActionScript 3.0 :: Accessing Stage Items, Through A SWF File Which Is Loaded Inside The Stage

May 14, 2011

- I have A.fla.

-  A.fla includes buttons, movie clips and also B.swf is loaded in A.fla using a LOADER

- i want to access elements in A.fla, from the actionscript codes inside B.fla to modify those movie clips and buttons based on actions going on in B.swf
 
for instance, lets say there is a button X in A.fla, and there is a button Y in B.fla,  B.swf is loaded into A.fla, and I want the button Y to erase button X when clicked.
 
general question:  accessing elements in a stage, through a SWF file loaded into that stage.

View 2 Replies

ActionScript 2.0 :: Edit Dynamic Content And Modify The Content And Save It All Within Flash?

Oct 1, 2007

how it is possible to edit dynamic content and modify the content and save it, all within flash.I have tried some experiments in the past and have got the text to change etc which is easy but i need a way to save the content so the next time anybody sees the flash it will have the latest content until i change it again.

View 2 Replies

ActionScript 2.0 :: Change The Xml Script Inside Flash, The Actual Xml File And Add An MC?

Mar 4, 2009

i am working on the xml carousel code from gotoandlearn.com, and i was wondering if there's a way to change the AS and xml to make one button load an external MC instead of the content txt.I am assuming i have to change the xml script inside flash, the actual xml file and add an MC.If anybody is familiar with that code please i need some help, this is the code:

import mx.utils.Delegate;
import mx.transitions.Tween;
import mx.transitions.easing.*;

[Code]...

View 6 Replies

ActionScript 2.0 :: Dynamic Content - Make A Sort Of Template For A Group Of Files

Nov 21, 2004

i need to make a sort of template for a group of files. it must contain both text and images (sort of help files where there is text and explanatory figures). i have to make this template 100% dynamic, meaning that i don't know the amount of text or number of images or where those images will be within the text. my client should be able to add text and images without having to edit the swf.

i know how to make textfields and movieclips during runtime, and how to load dynamic text and images, but the main problem is that the client wants the images inbetween paragraphs - not in a seperate place. -how do i set breakpoints in a dynamically loaded text -how do i position the images? -how do i position the rest of the text?

View 1 Replies

ActionScript 2.0 :: Dynamic Text Box That Is Getting Its Content From A .txt File?

Jul 22, 2004

I have a dynamic text box that is getting its content from a .txt file. I have a simple scrollbar that has a slider insde of a box that denotes the length of the path. What is the simplest way to program this scrollbar?

View 8 Replies

ActionScript 2.0 :: Dynamic Text Box Is Getting Its Content From A .txt File

Jul 22, 2004

I have a dynamic text box that is getting its content from a .txt file. I have a simple scrollbar that has a slider insde of a box that denotes the length of the path. What is the simplest way to program this scrollbar?

View 8 Replies

ActionScript 2.0 :: When Access The Custom Properties Of The Class In The Actual Flash File Everything Works Fine?

Dec 6, 2009

So I have a movie clip associated with an external class in the linkage dialog. I put that movie clip on the stage. I have another external class that contains some code (not for the movie clip but for the stage). When I access the custom properties of the class in the actual flash file (not the external code) everything works fine.For example.myMovieClip.explodeTheCode = true;works in the main movie. However, it doesn't work in the external flash file when I have a reference to that movie clip.myRefToCustomMovieclip.explodeTheCode = true fails!It throws an error. In java, I'd just import the custom class the movie clip is linked to and then I can call all the extra custom methods on the movie clip in the external class I want. However, this does nothing. I still can't access any properties.So my question is, how do I access the custom features of a movie clip (that is linked to a custom class) from an external code file. It works in the movie, but not in the external source code.

View 0 Replies

ActionScript 1/2 :: Publishing File - Content - Resizing The Stage Or Changing The Settings

May 7, 2011

I have edited the pageflip script and file to suit what I need to do and my issue is not related to the usual addition of pages or content etc... but is to do with publishing the file. I have increased the sizes of the page from what they are in the original file and this is where the issue lies because when I come to publish the file as an exe the content no longer seems to fit the window when published and you have to expand the viewer. The instructions for quite a lot of the pageflip is there and pretty easy to decipher however outputting/publishing the file seems to be unclear.

Can somone please point me in the right direction for resizing the stage or changing the settings so that the published file shows all the content without the need to resize the window?

View 1 Replies

ActionScript 3.0 :: XML Loaded Dynamic TextFields Length Of Stage?

Apr 29, 2009

Am trying to create a scrolling sidebar(top to bottom). Within this sidebar, dynamic textFields are being created and populated with XML. The XML is of "Sporting Events". Within each "Sporting Event" 3 variables exist, Name, Location & Date. What I've got, is AS loading the XML and populating ONE "Sporting Event" (3 textFields with name, location & date). I have to specify the position on stage of the textFields, not very dynamic if i'm to have numerous, but they work.

What has me contemplating jumping off the roof right now, is trying to understand how I'm to create an infinite number of textFields (only room for 10 "Sporting Events" (30 total textFields) on stage at a time), and have them continuously load the XML with different "Sporting Events". As they scroll off the stage, either they unload, remove, die or however's best.

I've tried creating an array and inserting the textFields into it, then running it through a for loop to load the XML. I can't get it to work properly, because I don't understand how to create infinite textFields, increment the XML and load it to the next available textField.

View 2 Replies

ActionScript 3.0 :: Make A Preloaded For Loading The Main Content Of The Swf File?

Feb 5, 2009

I want to make a preloaded for loading the main content of the swf file. I put my main program code on frame 2 and put this code on frame 1:

import flash.display.*;
import flash.text.*;
import flash.utils.*;
import flash.net.*;

[Code].....

My issue is it does not seem to track the progress. The trace statement in the onProgress function only displays after it is fully loaded. I thought this was suppose to loop.

View 9 Replies

IDE :: Make The Actual Bar To Be On Bottom On Default?

Oct 27, 2010

I've added a UIScrollBar on a text. What I need is to make the actual bar to be on bottom on default. (for chat text purposes.. new messages will be added on bot)

View 1 Replies

ActionScript 2.0 :: Trace The Width Of The Actual Text Of A Dynamic Textfield?

Mar 10, 2009

I'm trying to trace the width of the actual text of a dynamic textfield (called 'label'). i know this should be

code: trace(label.textWidth);

however, all I get is an 'undefined' message in the output box. Whereas, if I trace(label.length) instead, then it counts the number of digits in the text field. I thought label.textWidth would work? I want to find the length of the text in pixels basically...

View 11 Replies

ActionScript 3.0 :: Remove The Loader But Its Content Still Playing I Know That From The Sound Of The Content Was Loaded?

Apr 20, 2009

How to remove a loader and its content using removeChild or any other way, I had removed the loader but its content still playing in the background i know that from the sound of the content.this is the my code for removing:

removeChild(getChildByName("SampleLoader"));

View 9 Replies

ActionScript 2.0 :: Flash File Reading An External Text File For The Content?

May 16, 2005

I turn to you for help, dear sweet Kirupa Forumites. First, let me explain the problem: I have a flash file reading an external text file for the content. Everything works perfectly for nearly everyone - you click a menu button, and the content text comes up fine. However, a couple of people have found that the text shows up as "undefined". I have checked the player versions of the people where it doesn't work, and it is the same as for those where it does work, so that ain't the problem.

I don't understand why it works perfectly for nearly everyone, but a small number of people have this "undefined" text problem. It seems to be a problem with loading the external text file, but I don't know why. I have a main flash movie, and load the text in the first frame, using the following:

var my_content = new LoadVars();
my_content.load("content.txt");
my_content.onLoad = function(success){
if (success){

[Code]...

I then have a couple of dynamic text boxes in the main movie - one called ErrorText (for displaying an error message to the user) and one called ContentText (for displaying the content). I use an external menu swf which jumps to a specific frame in the main movie, depending on which button is clicked. Actionscript on the main movie frame for the first button does the following, with the other frames similarly configured:

ContentText.htmlText = my_content.content1;
stop();

My external text file is properly configured (content1=blah blah&content2=other blah blah) etc.

Does anyone have any advice on how I can solve this particular weird problem??

View 3 Replies

ActionScript 2.0 :: Preloading Flashvars - Ensure That All The Content Being Loaded Externally Is Loaded Before The Transition Plays?

Aug 30, 2005

I am in the process of building a site for an Architect... Jamie Fobert Architects (projects) I am useing transitions between the projects and am loading details/text and images externally through flashvars, php and a mySQL database. Within my transitions I have a a preloader on the forst 2 frames the code is as follows (taken from a Voetsjoeba tutorial):

[Code]....

This works pretty well if the content is within the .swf, but when it is loaded externally it doesnt preload it at all. Does anyone know how I can adapt/improve this preloader? or somehow ensure that all the content being loaded externally is loaded before the transition plays?

View 2 Replies

ActionScript 3.0 :: Create A Fade Effect For Dynamic TextField (content Of Textfield From XML File)?

Oct 5, 2011

I parse an xml file that his content is:

Code:
<?xml version="1.0" encoding="utf-8"?>
<operators>
<operator><name>OPerator1 </name></operator>

[Code].....

I display the name of operator in a TextField after parsing the xml file my problem is to loop through this different TextField with a fade effect.

View 0 Replies

Flash :: Global Content Loaded Event Listener?

Aug 30, 2011

I need an event listener which is global so when every content is loaded a function fires up and function places this content. I've tried

stage.contentLoaderInfo.addEventListener(Event.COMPLETE,function(evt:Event){placeem(evt, "stgW","stgH")});

but that's not right, gives me errors

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved