ActionScript 2.0 :: TimelineManager Class - Know All Of The Current MovieClips Being Used In A Given Section Of The Website
May 1, 2006
I came to realize that in order to get some of the effects to happen I'd need a way to know all of the current MovieClips being used in a given section of the web site. I figure the best way to do this is to create a Class for it and let it handle registering the clips. The functionality is pretty basic with the Class able to register a MovieClip and return all the MovieClips being used up until a given point in time or access a single MovieClip.
Unfortunately I don't really know how to implement this idea. I've pulled it off using index numbers but that wasn't for MovieClips. For this I'd like to be able to access any MovieClip that has been registered already by a name, like a String maybe.
I am going to redesign a website and for that website I want there to be a news section on the homepage. The news section should be built in Flash with images representing news headlines animating on a loop however a user should be able to click one of these images and then within the homepage a Flash pop up will appear with the news article. This is similar to sites that have an image gallery with thumbnails of images but when an thumbnail is clicked then the full size image loads within the same webpage. I want a similar effect but in my case, when a full size image is clicked, a text based news article loads.
I'm having an issue with the UiLoader, I think. I am using a UiLoader to show the portfolio section of my website. When I click on portfolio there is nothing there. Brought UiLoader to stage from the component panel> in the component inspector I set the source to Portfolio.swf> Test movie> it works great. In dreamweaver I draged the swf from the folder panel and placed it in a table> uploaded it to the site> go to the site, and there is no portfolio section. See the site here -> [URL]. I noticed when I made changes and uploaded to the web then went to the site I have to delete internet history files to get the swf to reload. What do I do about that? Off the top of my head I thought about changing the swf name everytime I make any changes, but I'm sure there is another way.
I would like to create a secure login section for a website. I have managed to build up an AS3-PHP communication where PHP checks user credentials. I am already providing data enchryption between AS3 and PHP but I would like to add some further security. Is it possible to implement a HTTPS login section?
I have a minor problem implementing an interactive photomontage section to my site. By that I mean lots of images which can be dragged about by the user to create one larger whole image. Like this (but much simpler, only 12 or so images on the stage): [URL]. So I'm putting the images inside a movieclip as I can use the startDrag and stopDrag actionscript commands so the user can drag the images around.
Here's the code I'm using on each movieclip image: on (press) { startDrag(this); } on (release) { stopDrag(); }
The problem I have is that I have two photomontages (2 set of images). The user clicks on a thumbnail in the lower right corner to select which one. Each button fades in the appropriate images, and fades out the other set - this is fine. The problem is that obviously the set of images on the highest layer (the Abbey set) are still on the stage but are just faded out (by movieclip tween alpha), so they conflict with the Statue set. Ie. when you try and click and drag an image in the Statue set, you can't get hold of them as you are really dragging the invisible Abbey set around still. I've attached a FLA file which demonstrates this problem. Click on 'BTN1' or 'BTN2' to change the set of images. The Abbey one works fine, but when trying to drag the statue one, the Abbey one if hidden on top will cause problems.
Here's what the section looks like in my project (thumbnails to select which): Abbey images: Statue images:
I've tried wrapping the startDrag commands inside an if statement that held a true or false, then put true or false in the appropriate places inside each image movieclip to represent when it is visible or not. I thought this would work, but it doesn't. I also tried putting the set of images at slightly different points in the main timeline, so they were never on top of each other, and then jumping to that point in the timeline when selecting the thumbnails. This kind of worked, but weirdly I had to click twice on the Statue set for them to show (fade in).
I'm looking at making some PHP Flash shortly to replace my current website, http://www.mathsnotes.com. I was thinking about allowing users to download a standalone version, i.e. the SWF file or an EXE file. My question is: Will the PHP still work, or is it parsed by another entity, e.g. the users browser?
Also, I wanted to add a live news feed - So is it possible to have flash check every frame ( like a _root.onEnterFrame() = Fucntion{ ... ) the mysql database to look for anything with a timestamp less than say, 5mins, and then display it? Or does PHP require a user to do something like "Update News"?
I have a class, my document class, called SilkRoadTweeter. as I also have a class called User.as In my User class I need to call a method called nonce() I have tried this, trace(SilkRoadTweeter(root).nonce()); But I get the error, TypeError: Error #1009: Cannot access a property or method of a null object reference.
i've got a fair bit of text i'm trying to keep on an internal page by just making each section a scrolling content box. So there are 3 buttons at the top, each 'scrolls' onto a new section and I would like the ability for it to scroll back too, hence using the tween class to do this. I've managed to set it up and each button goes to each 'page' fine in reading order, so to speak (1, 2, 3), but if I got to 1, 2 then back to 1 it will start from 0 on the x axis.
Basically what i'm wanting to do is set the tween from the current _x value. So if I go 1, 2, then back to one, it will take the current _x value from 2, and scroll the opposite direction back to one. I am using the following code on the buttons:
I'm just starting to learn as 3.0, and was having problem understanding the scenes, timeline (stage, root) and movieclips.
Basically now I have two scenes: S1, S2 S1 has one mc: round_mc ; S2 has one mc: rect_mc And I have same set of control buttons: play, stop, prevFrame, nextFrame, prevScene, nextScene, gotoAndStop()
The control buttons worked with the round_mc in S1, but didn't control rect_mc when S2 is playing. Why same set of buttons doesn't work in all scenes. Should I have to assign a variable to detect movieclips on the current scene...
I have a movieclip, which attaches to another movieclip, which scrolls.On click I want to be able to drag that movieclip away from the one it was attached to. When I just removeChild it, it's position changes. I want it to stay in the same spot until it's dragged.Any suggestion, on how I can give it that same position, when not attached?
If I have 5 frames and each contanins a MovieClip on stage that includes it's class, listeners, functions etc.If I go from one frame to another,should I clean everything up? I mean remove listeners, remove childs etc etc.Or other MovieClips except those in the current frame are ignored from flash player.
I wondered if there is a simple way I have have a snippet which traces the name of a method when called. I found className which is half-way there, but not something for the method... a 1-line trace(...) is what I'm after so I avoid typing the method name and leaving myself open to mistakes.This is for testing the order things happen, when I don't want to step through in the debugger.
My application has a lot of dynamically loaded shapes... Now i am working on an interface to change the color properties of each Sprite. The first idea was a simple colorTransform. But afaik this only allows for transforming the existing colors. I also want to be able to define a NEW fill, i.e. GradientType.LINEAR / RADIAL.
SOLUTION 1: There may be an undocumented method to retrieve a graphics current points. With that i could loop through this Array with lineTo and redraw the current shape with the new solid / gradient fill.
SOLUTION 2: Create a newSprite with the chosen GradientType, size it by currentSprite.getBounds(); and then use newSprite.mask = currentSprite; to fake my desired fill... However, i am afraid of the impact this creates on the application as there may be more than 200 of these Shapes displayed on stage... overlapping each other.
I was wondering if there is a tutorial on how to create a one frame website using movieclips as my pages instead of the seperate movies. In other words, I read this tutorial on this site :[URL]..
but i want my pages to be movieclips instead of seperate flash movies. Is there a tutorial for that? or can someone help me with the code to do that? The code for the tutorial is well-commented but I'm still a little lost...
This is a great tutorial for all Flash web designers/developers and good to have under your belt, so guys, let's figure this out together to be great actionscripters..
Assume I know practically nothing about AS3! I'm using Flash Pro CS5. I'm trying to reassociate a flash file I've been given with its external assets and classes. In the library I have a movieclip with linkage to a class called 'StaticMap' using the base class 'flash.display.MovieClip'. am I missing a custom class file called 'StaticMap.as' that was originally located in the same folder as the fla, or is this a generic class accessible to all movieClips from within Flash?
i have to read the current class name inside a static method. For non-static method it's easy i just call getQualifiedClassName(this) but inside a static method this is off course invalid.
A Custom Class can be initiated from an FLA or from another Custom Class. Is there a way to find at run-time, where is the current class initiated from?We can't use parent class before it has been added with addChild(thisClass), neither we can use root class to identify its originator. I believe, there should be a way to find it.
I want to randomly load 3 animations in a topbanner on my website. The 3 animations are placed inside their own movieclip and loaded to the stage by using "attachMovie". This works fine. But when a movieclip is loaded to the stage and the animation inside of it is finished playing how do i attach or load another movieclip randomly to the stage?
My favorite error: ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.at flash.display:isplayObjectContainer/removeChild()
What I am trying to do is basically get my navigation working correctly. I had it working by altering the alphas of movieClips, but they just end up overlapping each other even if they are invisible so that's not working out. I have 5 navigation pages. And thus, 5 nav buttons, and 5 movieClips (content for each page -- Home, Location, Tenants, Design, Contact). I want to simply show the home movieclip when on the home page and remove the movieclips from the stage for the other 4 pages.
Then, logically, I want to click the Tenants page, which removes the home page, location, design, and contact movieclips. Very straightforward show only one and remove the rest from the stage, but every combination of add/removeChild and parent and stage etc. is giving me that error above. What's confusing me the most is that the add and removeChild works for the location page, but none of the others. The location movieClip is no different than the others, and I made the code the same but it's the only one that works.
I think I understand how to make a interface but the problem is im unsure as to how to add it to my existing code! To make a interface (as far as i know) You can create classes such as mainScreen, intructions and so on. Ok i get that, make the classes then add ther buttons from the library i these classes. But i followed a tutorial bu Emmanuel Feronto, and adapted that to the needs of my game.
So im unsure as how to add these 'Screens' to my current class, the I currently only have 1 class, Main which currently has 300 lines of code, and i dont know how to break it up into smaller classes. Thats the problem i think, The main is quite large, normally i have heard people keep this clear... But then say i made a bland main, and added the screens into that then how do i make the main that makes the game play on the play button?
How do you declare a variable type that is the same name as the current class in a different package? Is it possible?I'm importing the class and using getDefinitionByName for the instantiation. However, without declaring a variable of that time, the class is not being imported.
Is there a statement in AS3 that will return current class and/or scope? I'd like to use that in trace statements so that I know the exact location of a trace.
I have a simple class file for buttons. on Rollover the movieclip plays frame no 2 and on Rollout it plays frame no 11. This is working fine. Now I want to disable the current button on click/release and enable others. I don't know how to get the other buttons because the this keyword always refer to the current button that is rolled over of clicked.
ActionScript Code: class ButtonClass extends MovieClip { var buttonName:String; public function ButtonClass() { this.onRollOver = over; this.onRollOut = out; [Code] .....
I am still very young to the fullscreen flash phase.. thats why I have a quick question:How do I align my elements (movieclips) to follow the bottom or the right/left side of the website?
I have created a website with 3 pages One of the pages has a scrollbar that scrolls images inside a masked box.I created its functionality with 2 classes externally, the scrollbar and scrollbox movieClips are linked to these classes in properties.Now it scrolls when I test the fla,but it fails to scroll when I test the whole website.
>the classes are in the same directory as my project
Is it possible to host a class file separate from everything else on a website where it can be edited when needed? For example, I'm thinking that in the Linkage section of the movieclip you would put the path to the location of the as file on the website, so [URL] <--well I guess without the ".as".