ActionScript 3.0 :: Getting .source To Work In The Document Main

Jan 12, 2010

I'm getting an error TypeError: Error #1010: A term is undefined and has no properties.[code]Which I have found the cause for the error. If you look at the code below you'll see thumb.tAddress.source = _picsList[i].thumb; and the .source is the problem. I can remove the .source and the code works just fine. The error is an undefined and Im thinking import problem and search adobe to fine .source and its import flash.(something). I did fine .source and to import it adobe said to do import fl.data.*;. I have tryed this and get another error saying 1127 can't fine import fl.data?[code]

View 0 Replies


Similar Posts:


ActionScript 3.0 :: Execute Functions In Main Document Class When Main Timeline Reaches Frame X

Oct 16, 2009

I have 3 functions in my main document class that I want to execute when the main timeline reaches a particular frame number. how do I do that?

see the code and comments

public function mainClass()
{
//stage declaraction
stage.align = StageAlign.TOP_LEFT;

[Code]....

View 5 Replies

ActionScript 3.0 :: Reference Main Document Class From Document Class Of Loaded Swf

May 7, 2011

I have a FLA (say Main.FLA) document class with a child MovieClip on the stage: into the child MovieClip I load other swf files: each of the files contains its own Document Class (every swf is a somewhat independent application, say quizzes and so on).For some reason I must use the Main document class to store data (scores or so) from the child swfs loaded into the Main swf. HOW do I reference the Main class? I can't find a way.[code]and dispatch an Event this way from the loaded swf document class to the Main class:[code]Now, first of all I don't know if this could even work. Secondly, I tried to make it work by adding an event listener to my Main class but id did not work.

View 9 Replies

Flash :: Why Does Flex Builder Insist On A Main Class In The Root Of The Source Folder

Mar 3, 2010

Why does FlexBuilder insist on a main class in the root of the source folder? By insist I mean that if I create an Actionscript project called MainTest. A file called MainTest.as will be placed in the root of the src folder. if I now create a package/folder called some/package and place the MainTest.as in it (and adjust the package statement accordingly), I cannot select the project to use this as the application class in Properties/Actionscript Applications as the package is empty as far as Flexbulider is concerned.

So there is a restriction that a main/application class cannot have a package other than the root package. The mxmlc compiler and FDT do not enforce this restriction so why does Flex Builder?

View 1 Replies

ActionScript 3.0 :: Flash Game U Source Code Doesn't Work?

Apr 16, 2009

I picked up the book ActionScript 3.0 Game Programming University.so far it looks good. I have downloaded a few of the samples of code and some don't work or give an error message.TooEarlyExample gives me an error message of;TypeError: Error #1009: Cannot access a property or method of a null object reference.at TooEarlyExample()The flash file has two text fields and the code is supposed to populate them with some text. The first text field doesn't get populated with text but the second one does.

View 7 Replies

ActionScript 3.0 :: Delete ScrollPane Source - RemoveChild Doesn't Work?

Aug 26, 2009

I'm creating one sprite named 'holder' and I'm adding childs to it. finally I use sp.source = "holder";  NOTE: scrollPane is in stage, having instance name = sp, holder is AS created.
 
this works very good, but I need to on button press refresh data on holder. So I want to complete remove holder, so my function can recreate it with new elements and then define scrollPane.source = "holder";
 
How can I do this? 
var holder:Sprite = new sprite();
holder.name = "holder";
addChild(holder);  //  this adds holder to stage
//
// add elements to holder

[Code]...

View 7 Replies

ActionScript 3.0 :: Is Document Class Same As Main Timeline

Dec 26, 2009

I've been working on flash CS3 for some time now and have learnt a lot in actionscript 3. However, I still have some very simple doubts which I want to clear:

1) Is the Document Class same as the Main Timeline?
2) If we type "trace(this)" in the actions panel on the main Timeline, it gives "object MainTimeline", is this what is the document class because there is nothing else as the mainTimeline Class.
3) If we type "stop()" in the main timeline, it stops the movie. Where does stop() belong, I mean, it is the method of which class?
4) Sometimes, when within a class or a movie clip, something like "root.gotoAndPlay" doesn't work while "MovieClip(root).gotoAndPlay()" works. Another example is when we try accessing a child of a movieClip by using getChildAt(i), "MC1.getchildAt(i).play()" does not work and we have to write "MovieClip(MC1.getchildAt(i)).play();

View 3 Replies

ActionScript 3.0 :: Notify Main Document From A Class?

Sep 10, 2009

I'm using document classes, and I've created a separate class to create many objects, with graphics and events, strings, etc. But I'd like to be able to add an event listener inside it that will call a function inside my Main document class..

Edit: or even have classes communicating with other classes.Having classes seems to cut off things from other things.

View 5 Replies

Pass Parameters To Flash Main (Document) Class?

May 2, 2010

In Flash CSn/AS3 you associate a Main class with a flash file which when loaded in the flash player "automatically creates an instance of the program's main class."I'd like to know how to pass arguments to the main class, since you don't write it yourself (you put its name in the Document textfield in the IDE).

View 1 Replies

ActionScript 3.0 :: CurrentFrame Of Main Timeline From Document Class

Jul 8, 2009

Is it possible to access the currentFrame of the main timeline from a document class (which extends movie clip)?

View 3 Replies

ActionScript 3.0 :: Calling NavBar From Main Document Class

Jul 8, 2009

I am trying to rebuild an AS2 navigation in AS3. I built a button class (PortfolioNavItem.as) and a navigation bar class (PortfolioNav.as). This works if I use PortfolioNav as the Document class. However, I want to do things the proper way and call PortfolioNav from a Main document class (Main.as) but when I try it I keep getting that Error #1009.

Main.as
package com.tagehaun {
import flash.display.Sprite;
//import com.tagehaun.PortfolioNav;
public class Main extends Sprite {
//public var portfolioNavItem:Sprite = new Sprite();
public var portfolioNav:PortfolioNav = new PortfolioNav();
[Code] .....

View 0 Replies

ActionScript 3.0 :: Get Variable On Main Timeline Into Document Class?

Mar 24, 2009

I have a new FLA with a variable in frame 1:

Code:
var testVar:String = "hello";
//--- my document class:
package

[Code]....

I just get null. How can I see a variable like that?

View 1 Replies

ActionScript 3.0 :: Getting Loaded SWF To Use A Function From Main.fla Document Class?

Dec 16, 2009

I have a main movie with thumb movieclips that load new children and stops the main movie's animation. Within the child there is a close buttion that removes itself. I also wanted the close button to start the animation of the main movie again once it removed the child. Since I am using a document class to load everything for the main move, how can the close button from the loaded swf use a function from the main document class?

View 5 Replies

Actionscript 3 :: Dynamically Assigning An Image Source In An Item Renderer Does Not Work In Flex?

Oct 23, 2009

I have a custom item renderer that displays images:

<mx:DataGrid dataProvider="{friends.friend}" id="friendsGrid" width="240" rowCount="3" variableRowHeight="true" headerHeight="0"
horizontalCenter="true" backgroundAlpha="0" borderThickness="0"

[code].....

View 1 Replies

ActionScript 3.0 :: DispatchEvent - Create A Listener In My Main Document Class?

Jan 13, 2009

I'm trying to dispatch a custom event. So that my main document class can react when a nav button is clicked.I have a navbutton class which creates the dispatch's the event... and is handled by the onNavigate Method...

private function onClick(evt:MouseEvent):void {
//trace(_label.text + ": path = " + _projectNode.@path);
//trace(evt.target._label.text);[code]....

This onNavigate method works perfectly.... however when I try to create a listener in my main document class I don't "hear" the event.Here's part of the code from the main doc class...here's where I register the listener

this.addEventListener("NAVIGATE", doSomething);

here's where I should handle it...

private function doSomething(e:Event) {
trace(e.target.name);
trace(e.target._label.text);

View 12 Replies

ActionScript 3.0 :: Retrieving Loaded XML Data From Main Document Class

Feb 28, 2011

I need to access successfully loaded XML data from the main document class BUT from objects multiple levels deep. I could hack around this setting properties deep down from the top but it doesn't seem like good practice. Is there a better way?

View 4 Replies

ActionScript 3.0 :: Flash - Access Nested MCs From Main Document Class?

Mar 11, 2012

I have 3 dynamic textfields that are added to the stage through an external class, (I only add the main container from the Main.as) the textfields are nested under 5 MCs (that's what i see when i list objects in the debugger) how can i access those textfield from the Main document class?I've tried by path, by getchildbyname, i've exported the font for AS (the textfields have instance names)... and nothing works, i either get an error or it tells me it has no properties, or null..

View 14 Replies

ActionScript 3.0 :: Execute Functions In Document Class When Main Timeline Reaches A Frame

Oct 16, 2009

I have 3 functions in my main document class that I want to execute when the main timeline reaches a particular frame number. how do I do that? see the code and comments

[Code]...

View 2 Replies

ActionScript 3.0 :: Flash Variables Between Frames - Put All Code From The Main Timelime To A Document Class?

Feb 6, 2011

I have a little problem in my game. I have a var coins:int = 0; on frame one, and I want to access it from frame 2. I'm not using a document class. Is it possible to make some kind of a global variable like in as2 without having to put all my code from the main timelime to a document class?

View 1 Replies

IDE :: Resizing_Centering Kirupa Tutorial - Source File Won't Open - Get The Message "failed To Open Document"?

Nov 3, 2009

I'm having problems getting the tutorial to work so I decided to look at the source fla. But the Source file won't open on my computer, get the message "failed to open document".

View 3 Replies

Professional :: Increase The Work Area Of A Flash Document?

Jan 14, 2010

how to increase the work area of a flash document? Not the stage but the empty space around the stage. [URL] It seems to be limited to about 4,000 pixels wide regardless of the zoom level. This is a big problem for me as I'm working with a movie clip with a width of 8000 pixels and if I want to add text to part of the clip that's at 6,000 pixels in, I can't see it because its outside the work area. I can't shift the clip to the left to access the part on the right because if I do, the text area doesn't move with it. Is there any way to link objects together? When I select multiple items on the stage and Right Click, there's an option called "Break Apart" but I don't see one to join them or link them.

View 5 Replies

Actionscript 3.0 :: SimpleZSorter Doesn't Work In HTML Document?

Mar 6, 2010

I am having problems using the simpleZSorter by Ralph Hauwert. The "stanalone"-swf is working fine. If I put it in an HTML document, everything still works EXCEPT THE Z-SORTING.

I also attached a file which should show my problem. Just compare the order of the rectangles in the swf standalone and in the HTML document.

Somehow the FLA becomes too larger so I cannot upload it here. But this is the code:

stop();
import com.theflashblog.fp10.SimpleZSorter;
this.addEventListener(Event.ENTER_FRAME, sort);
function sort(e:Event):void

[Code].....

View 1 Replies

Actionscript 3 :: Dynamically Alter The Main Timeline Display Dimension To Match A Loaded 3D Swf's Dimension To Keep Source 3D Properties?

Dec 16, 2010

The issue I'm having is that I have a main "wrapper" 100x100 (but it could be any size) - it's just there to hold and display whatever content, swf, gif, etc we may want to throw into it. As long as the loaded content doesn't have 3D animation like rotationY going on, it displays fine. But when it does, the 3D "anchor" properties (like projectionCenter) of the loaded swf inherit those of the main timeline (i.e. 100x100 (main) vs 728x90 (loaded)). If I change the dimension of the main "wrapper" in Flash IDE to match what's coming in - the 3D behaves fine, but I won't know what the dimensions of the content will be until it comes, so I need a way (if there is one) to dynamically alter the main "wrapper" or root display object through AS. Stuff like "this.width = loader.width" or "stage.width = loader.width" or "root.width = loader.width" etc doesn't work. Flex has the hBox and vBox

View 1 Replies

ActionScript 3.0 :: Document Class Not Work When Shift MovieClip To 2nd Frame?

May 24, 2011

All my content is at 1st frame of my FLA file...and I'm using Document Class When I try to shift my content to 2nd frame, so I can use 1st frame for preloader.. but its not working.
 
This is my document class... Basically at 1st frame I'm loading external jpg image to a MovieClip.Is it possible, I can **** my MovieClip and other content to 2nd frame of the timeline.

[Code]...

View 2 Replies

ActionScript 3.0 :: Does [Embed(source="assetname")] Work In Flash Or Just Flex?

Aug 14, 2009

Does [Embed(source="assetname")] work in Flash or just Flex?

View 5 Replies

Actionscript 3 :: Source From External Folder (linked Source) Not Appearing In Flex?

Aug 26, 2010

i have a Air Project in which i have added three extenal source folders. but when i reopen project or strat flash builder again i get icon on those folder like this but when i open the configuration for that project and try to validate the path and adding it again i get message like this but the path is valid. proof is this pic what could be possible error,,, is there any way that i when ever re-open project i get no warning and able to navigate through the linked source code. now i am doing it

1- deleting on of the linked folder

2- again adding that folder.

View 2 Replies

ActionScript 3.0 :: Flex Script Source In Source Path Cannot Be Found

Jan 11, 2010

So inside my src folder I have my app.mxml file. I have a source directory pointed to my actionscript library.It appears that Flex does not look inside that source directory including an .as file within the master mxml file.

Code:
<mx:Script source="com/domain/something/somethingelse/app.as"/>

I could just have the main app.as file inside the src folder along with my app.mxml file but it would be nice if it could live in the actionscript library.

View 1 Replies

Media Server :: Use Http Source Instead Of Rtmp Source?

Aug 31, 2011

I have this standard embed code to play my video:
 
<object height="409" width="600"><param name="movie" value="http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf" /><param name="flashvars" value="src=rtmp://my-server/vod/flv:my-video" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><embed allowfullscreen="true" allowscriptaccess="always" flashvars="src=rtmp://my-server/vod/flv:my-video"

[Code]...

View 4 Replies

ActionScript 3.0 :: Flex Source In Source Path Cannot Be Found

Aug 21, 2009

So inside my src folder I have my app.mxml file. I have a source directory pointed to my actionscript library.It appears that Flex does not look inside that source directory including an .as file within the master mxml file.[code]I could just have the main app.as file inside the src folder along with my app.mxml file but it would be nice if it could live in the actionscript library.

View 2 Replies

ActionScript 3.0 :: How Do Main Menu's Work In OOP

Sep 19, 2011

Im making a OOP game. Using classes ect. But how does the main menu system work? Well Im not full OOP yet i guess. the player spawn point and level boundaries are all visually set up on frame one. But im unsure as how main menu sytems ever worked OOP or not.

View 3 Replies







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