#includes In Classes
I'm pretty new to this class stuff. My main document class is getting pretty long and unmanageable. Is there a way to use #include to break out some of these public functions that I need to use in main? Thanks
Adobe > ActionScript 1 and 2
Posted on: 06/29/2007 01:22:38 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Includes
I have 6 swf files that use the same menu system and I was wonder two things:
[1] is it possible to include the menu system in each swf, instead of create the same menu in each swf?
AND
[2] by doing the above am i optimizing file size and shortening load times?
Help With Includes
how do you include .as files that are not class files in as2.0 ?
you can't do this
Code:
#include "includes/" . code_str . ".as"
but that's kind of what i need to do... any suggestions?
Includes
i am attempting to make my first flash site.. and i'm wondering
is there any way to do an include?
for example, in my php sites i can do an include header.php and itll include the header page ...
so in my flash, if i want to include news.php, or include photos.php, or something of that nature, is that possible?
also, if i do an include of photos.php will the pictures on photos.php appear in my document, or can you only include text?
Includes
i am attempting to make my first flash site.. and i'm wondering
is there any way to do an include?
for example, in my php sites i can do an include header.php and itll include the header page ...
so in my flash, if i want to include news.php, or include photos.php, or something of that nature, is that possible?
also, if i do an include of photos.php will the pictures on photos.php appear in my document, or can you only include text?
Please Help Includes In Actionscript, How?
Hi!
I have a .swf and I want it to call to a function like this:
search (parameters)
{
code
}
Can I put this function into an include file? Which format has this include to have? And the header?
Please help me if u got any idea!!
Yours
Rachelangelo
PHP Includes In A Movie?
Anyone know how to place a PHP include within a flash movie? or dynamic text box? does MX have that ability?
Trying to convert an old HTML page to Flash, which has a PHP include embeded in it. Wanted to know if its possible before I take on this task.
Why Don't My #includes Work
I wrote a class in MX 2004 checked it syntax, all is ok with the .as file.
When I open my new .fla file and in frame one put this...
#include "quiz_engine.as"
It won't work, I tryied hooking it into a "load" mc and use the onClipEvent(load) and then add the include and the same error message...
Error message:
**Error** C:Documents and SettingsCedricDesktopmcwhorter
appin_ramonaac tionscript_codequiz_engine.as: Line 1: Classes may only be defined in external ActionScript 2.0 class scripts.
class quiz_engine
What is going on, why won't this work. Im not using the semi colon or nothing like that. just trying to get it to include my class file.
Thanks,
Cedric
Using PHP Includes In Flash
This is probably something simple I'm overlooking, but I can't seem to use PHP includes in flash. What I'm doing is a flash website, and the way I have it set up, there is a dynamic text box that calls a php file called news-headlines.php. That works fine, but in that file I have the line
PHP Code:
include("news.php");
and it doesn't load the page. I've also tried using html files in it, but still nothing happens.
If somebody could help me, I'd appreciate it. I'm using Flash MX.
ActionScript Includes
Hi
I have an actionscript include file, which all works very well...
except, when i'm updating the include file outside flash it doesn't reflect in the flash movie.
I thought the whole point of having the include file was that you didn't have to keep opening the flash when updating elements or behaviours in your movie.
Cheers
B
Includes Not Working?
I have nowhere else to turn to..I have tried..and do NOT knowwhat I am overlooking.
using your basic server side include statement:
Code:
<!--#include file="header.htm"--> & <!--#include virtual="header.htm"-->
and it doesnt work when I test it locally or on my web host..is there something in cpanel that needs to be turned on?..
Includes - Where Are Thou?
ok i haven't worked with includes much, but the time i have they would be residing on the server along XML, or JSP and etc - in some folder...
is it possible to have attached include AS file and not have it on the server???
(this makes no sense, right?)
this is a call in the fla file
ActionScript Code:
#include "./includes/pages.as"
where i need to update some code, but i can't find it on the live server...
any thoughts much appreciated.
Dynamic #includes
You might know this, but I want to set up away so that it is possible to only include a #include once (bit like in php - include_once())
anyway, i've got the function all built up, just need to be able to use a variable in stead of a string. any ideas?
Code:
#include file
#include '"' + file + '"'
etc...
can it be done??
Flash Includes
I've done this in the past with .asp server side includes and i can't remember how i did it.
I have a flash header w/nav that resides in a .asp page. It needs to load some elements of a page so i don't have to do a complete page refresh.
PLEASE HELP!
Multiple #includes
My issue isn't with including several different .as files, but rather, having to include one .as file more than once. Here's the situation:
functions.as - has some functions that are used commonly
myClass.as - has class definition whose member functions require some procedures from functions.as
myFlash.fla - Flash application which has instances of myClass and also requires use of functions.as
However, myClass.as doesn't like to include functions.as..
ActionScript 2.0 class scripts may only define class or interface constructs. (no matter where I place #include)
although myFlash.fla can include it and will work without error.
Is there some convention I'm not aware of where I can use #include in a class definition file? And if so, will it create a problem with multiple declaration of the functions in functions.as? As far as I know, there is no equivalent to C++'s #define and #ifndef preprocessor directives in Actionscript 2.0... a possibility for future development?
Flash And PHP Includes
Can Flash MX pass PHP include syntax?
Scenario:
- Site is 95% html/php
- Main html page is index.php which has the typical include php code
- Only the Menu Items (Flash buttons) would have this actionscript assigned:
on (release) {
getURL ("index.php?page=audio", "_blank");
}
Is this correct/possible?
Daniel
Multiple #includes
My issue isn't with including several different .as files, but rather, having to include one .as file more than once. Here's the situation:
functions.as - has some functions that are used commonly
myClass.as - has class definition whose member functions require some procedures from functions.as
myFlash.fla - Flash application which has instances of myClass and also requires use of functions.as
However, myClass.as doesn't like to include functions.as..
ActionScript 2.0 class scripts may only define class or interface constructs. (no matter where I place #include)
although myFlash.fla can include it and will work without error.
Is there some convention I'm not aware of where I can use #include in a class definition file? And if so, will it create a problem with multiple declaration of the functions in functions.as? As far as I know, there is no equivalent to C++'s #define and #ifndef preprocessor directives in Actionscript 2.0... a possibility for future development?
Flash And PHP Includes
Can Flash MX pass PHP include syntax?
Scenario:
- Site is 95% html/php
- Main html page is index.php which has the typical include php code
- Only the Menu Items (Flash buttons) would have this actionscript assigned:
on (release) {
getURL ("index.php?page=audio", "_blank");
}
Is this correct/possible?
Daniel
Dreamweaver MX Includes
I am running Dreamweaver MX 2004 and for some reason I cannot see SSI or PHP includes for this one particualr site in design mode. I haven't worked on this site since I upgraded from the previous MX, but previously I could see the includes in design mode in DW. I know the client had someone else edit the site and I'm wondering if they screwed up the code somehow. Or maybe there is preference setting I'm missing. Any thoughts?
Play Includes Txt File?
Hi all.
I'll try to make it short and quick so you can understand my question - so lets go
My problem is: I'm working on a banner for at site, and in that bannere there have to be some text... More or less, is up to them, but they have absolutly No understanding on Flash what so ever, så there the text have to be from a txt file so they only need to edit that to ad some new text.
I have a text area on my banner (About middle) where the text have to be, but it can't be there everything at once, so it have to "slide" out and "slide" in...
I know how to ad a txt file with varibles like this:
LoadVariables("filename.txt", "_root");
But when i do that, it will include Everything in that text file, and as said; that's not what i want...
Some kind of delay, so:
text1 is sliding in
text1 (standing in about 2-3 secs)
> text1 is sliding out
text2 is sliding in
text2 (standing in about 2-3 secs)
> text2 is sliding out
I hope you understand me and my question.
I've tryed to downloade some movies from here, with that feature, but i can't crack that code and put it in my banner...
I really really hope that you can help me with this, because it's a bit importen that I put that feature in :-)
Thanks - Public2.
Play Includes Txt File?
Hi all.
I'll try to make it short and quick so you can understand my question - so lets go
My problem is: I'm working on a banner for at site, and in that bannere there have to be some text... More or less, is up to them, but they have absolutly No understanding on Flash what so ever, så there the text have to be from a txt file so they only need to edit that to ad some new text.
I have a text area on my banner (About middle) where the text have to be, but it can't be there everything at once, so it have to "slide" out and "slide" in...
I know how to ad a txt file with varibles like this:
LoadVariables("filename.txt", "_root");
But when i do that, it will include Everything in that text file, and as said; that's not what i want...
Some kind of delay, so:
text1 is sliding in
text1 (standing in about 2-3 secs)
> text1 is sliding out
text2 is sliding in
text2 (standing in about 2-3 secs)
> text2 is sliding out
I hope you understand me and my question.
I've tryed to downloade some movies from here, with that feature, but i can't crack that code and put it in my banner...
I really really hope that you can help me with this, because it's a bit importen that I put that feature in :-)
Thanks - Public2.
Play Includes Txt File?
Hi all.
I'll try to make it short and quick so you can understand my question - so lets go
My problem is: I'm working on a banner for at site, and in that bannere there have to be some text... More or less, is up to them, but they have absolutly No understanding on Flash what so ever, så there the text have to be from a txt file so they only need to edit that to ad some new text.
I have a text area on my banner (About middle) where the text have to be, but it can't be there everything at once, so it have to "slide" out and "slide" in...
I know how to ad a txt file with varibles like this:
LoadVariables("filename.txt", "_root");
But when i do that, it will include Everything in that text file, and as said; that's not what i want...
Some kind of delay, so:
text1 is sliding in
text1 (standing in about 2-3 secs)
> text1 is sliding out
text2 is sliding in
text2 (standing in about 2-3 secs)
> text2 is sliding out
I hope you understand me and my question.
I've tryed to downloade some movies from here, with that feature, but i can't crack that code and put it in my banner...
I really really hope that you can help me with this, because it's a bit importen that I put that feature in :-)
Thanks - Public2.
Play Includes Txt File?
Hi all.
I'll try to make it short and quick so you can understand my question - so lets go
My problem is: I'm working on a banner for at site, and in that bannere there have to be some text... More or less, is up to them, but they have absolutly No understanding on Flash what so ever, så there the text have to be from a txt file so they only need to edit that to ad some new text.
I have a text area on my banner (About middle) where the text have to be, but it can't be there everything at once, so it have to "slide" out and "slide" in...
I know how to ad a txt file with varibles like this:
LoadVariables("filename.txt", "_root");
But when i do that, it will include Everything in that text file, and as said; that's not what i want...
Some kind of delay, so:
text1 is sliding in
text1 (standing in about 2-3 secs)
> text1 is sliding out
text2 is sliding in
text2 (standing in about 2-3 secs)
> text2 is sliding out
I hope you understand me and my question.
I've tryed to downloade some movies from here, with that feature, but i can't crack that code and put it in my banner...
I really really hope that you can help me with this, because it's a bit importen that I put that feature in :-)
Thanks - Public2.
Play Includes Txt File?
Hi all.
I'll try to make it short and quick so you can understand my question - so lets go
My problem is: I'm working on a banner for at site, and in that bannere there have to be some text... More or less, is up to them, but they have absolutly No understanding on Flash what so ever, så there the text have to be from a txt file so they only need to edit that to ad some new text.
I have a text area on my banner (About middle) where the text have to be, but it can't be there everything at once, so it have to "slide" out and "slide" in...
I know how to ad a txt file with varibles like this:
LoadVariables("filename.txt", "_root");
But when i do that, it will include Everything in that text file, and as said; that's not what i want...
Some kind of delay, so:
text1 is sliding in
text1 (standing in about 2-3 secs)
> text1 is sliding out
text2 is sliding in
text2 (standing in about 2-3 secs)
> text2 is sliding out
I hope you understand me and my question.
I've tryed to downloade some movies from here, with that feature, but i can't crack that code and put it in my banner...
I really really hope that you can help me with this, because it's a bit importen that I put that feature in :-)
Thanks - Public2.
AND YET ANOTHER PRELOADER (INCLUDES COMPONENTS)
hi,
The preloader problem seems to be a real problem especially when components are involved. So I came up with a different solution.
Oldnewbie is correct that the preloader has to be separated from the main movie and that is what I am doing here too. The preloader is in a single frame (1), where the movie is loaded and then once loaded goes to frame 2.
http://www.stormpages.com/cancerinfo...preloader.html
However, I make a mother movie and load the main movie into a movieclip with this code:
onClipEvent(enterFrame){
if(this._url != _root._url && !this._url.loaded) {
var kilobytes = Math.ceil(this.getBytesTotal()/1024);
_root.frame = Math.ceil((this.getBytesLoaded()/this.getBytesTotal())*100);
_root.loaderBar.gotoAndPlay (_root.frame);
_root.frame = "loading " + _root.frame + "% of " + kilobytes + "kb";
_root.loaderBar._visible = true;
if(this.getBytesLoaded() == this.getBytesTotal()){
this._url.loaded = true;
_root.duplicateMovieClip(this,"backGround",0);
with ( "backGround" )
{
beginFill (0xE3F1B8, 100)
moveto(0,0);
lineto(0,300);
lineto(475,300);
lineto(475,0);
lineto(0,0);
endFill();
}
_root.gotoAndStop("start");
}
}
}
"frame" is a textbox and loaderBar is a mc with a bar consisting of 100 frames. If you have a big movie you can add a small animation (story or whatever) into the preloader to entertain people.
Included also is a function to draw the background for the new movie to cover the parent movie.
The main movie 'advanced_search.swf" is a very complex movie uploading and processing xml with radiobuttons, checkbox, listbox and scrollbar. I have intentionally chosen this example.
However you have to be careful with the child (main) movie. You have to fill out the chart for the radiobuttons completely including data. You have to also setLabel for the radiobuttons and all components should not be referred to the _root level. Otherwise they don't work, since _root refers to the main movie. So just omit _root.
A last word: this may not be a solution for everybody but for some applications it may be. It depends on the case. I need such a preloader, because I will use movies in differnt other movies.
[Edited by cancerinform on 08-23-2002 at 12:54 PM]
Netscape, Flash, And ASP Includes
Hello to all you geniuses out there,
thankyou for all your previous help, and for all I have learned from Flash Kit and these forums.
My current problem is that I am using a dynamic flash button in an ASP page as such:
<OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"WIDTH=120 HEIGHT=25><PARAM NAME=movie VALUE="bubblebutton.swf?value=Toilet Seats&url=SubCatagories.asp?CategoryID=29"></object><br>
<OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"WIDTH=120 HEIGHT=25><PARAM NAME=movie VALUE="bubblebutton.swf?value=Wall Grips&url=SubCatagories.asp?CategoryID=30"></object><br>
There are 30 of these in a long list,here I have jut listed the last 2. They are in a file called nav.asp which in Explorer works like a dream, however in Netscape nothing appears, just a white empty space. I have found other messages to this effect on here, but none could be applied to solve this particular problem.
The Main ASP pages on the site call up the nav.asp as an include in to a table. Can anyone spot what I need to do to make the nav appear under netscape too, without losing it in Explorer?
Thankyou for you kind assistance.
Joe
Smartest Way To Do This <--includes Picture
Hi everyone,
Got a little question and could use some feedback. See the jpeg for the layout.
Basically when the interface loads I will have 3 buttons showing. When the use clicks one of the buttons I want the sub navigation for that section to appear. From there the user can click one of the sub nav links and the content will load into the content container.
Ok sounds easy enough. Here is my logic (let me know if there is a better way of thinking this one through). When the user clicks 1 of the 3 buttons the subnavigation gets loaded into the "subnav" empty MovieClip. Once the user clicks a link within the subnav that link gets loaded into the content container.
Ok so here is a twist. This is easy enough to do with external swf's using the LoadMovie command:
Code:
on (release) {
loadMovie("subnav1.swf", _root.subnav);
Is there a way to do it with MovieClips within the same movie and not refrence external swf's. From what I have read you have to have a instance of the "subnav1" MC off on the outside of the stage and then call it to load inside the sabnav container.
Thoughts or suggestions?
A Little Help On Using #includes Needed... (ok.. Maybe A Lot Of Help) :confused:
i have never used #include files and I KNOW i can't write my own classes.. but i wanted to save to some time and energy (and wrist wear and tear) and stick the code i need to re-use in each section of this site into an external .as file.
So let's say the code i have in each movie currently... looks something like this:
Code:
function poop() {
}
poop.prototype = new MovieClip();
Object.registerClass("toilet", poop);
Object.registerClass("toiletPaper", poop);
Object.registerClass("washHands", poop);
//
// where "toilet", "toiletPaper" & "washHands" are linkage ID's of mc's
//========================
// Make Poop - prototype
//=========================
poop.prototype.dumpIt = function(flush) {
var smellMax = flush.length;
var incRand = 1;
var incRatio = 1;
var decRand = smellMax;
this.onEnterFrame = function() {
yada yada yada
};
}
I set up my files to use a shared library so all the MC's will be the same in each movie.. i just need them to act the same. Do i have to put the
Code:
Object.registerClass("toilet", poop); etc
in each movie? or can i just put in the #include "count_choc_u_la.as" and make calls to the function as i would normally (i.e toilet_instance.dumpIt(ewwww...smelly); )?????
or can i just put in the #include "count_choc_u_la.as" in the main movie? since all other movies will be loaded into the main, in a container clip.. can't i reference the functions in the external .as file from external swf's loaded into the main movie??? (ok.. i tink i just confused myself even more)
can sombody please shed some light?.. searches for #include turned up nothing (well, not nothing... but nothing relevant).
thanks in advance
M
PHP Includes And Flash Hyperlinking
My links are setup basically like this... I use div's on my site and within one div I have all the content loading with a php include. My links basically look like this:
Code:
<a href="?page=pagename">Link</a>
I want to do that in flash. I've tried using normal flash hyperlinking and it looks at it like it doesn't know what to do with it. Any suggestions? Thanks in advance!
Preloading Includes Loadmovie Swfs?
Just wondering...
If I preload an entire scene, and that scene contains buttons that load external swf files. Are those swf files also preloaded?
Advice Needed. (includes Attachment)
I have been working on a company logo in Photoshop, which I was going to import into flash. However the image I have created is too large and id really like to reproduce it in Flash to save the download time.
So far i have failed miserably. Can anyone give me some advice? The main problem encountered is the gradients and drop shadows. Any tutorials on the web would be also beneficial.
Do not worry about the two letters as I am going to import those. Its just the grey circle background which I want to make.
Thanks in advance.
Lee.
Problem With Server Side Includes
Hello again.
Here is the problem.
Basically getURL opens one Server Side Include cmd in one of two hidden frames, but the second getURL SSI opens as new window and not in it's hidden (blank) frame.
Here is the environment
Have a button that on(release) must send two server side includes to two different webservers.
I have two hidden frames that are loaded using the getURL method to send the SSI cmd.
A blank cmd.html page exisits on each device so it can carry out the commands.
Here's the code.
on (release, releaseOutside) {
getURL("http://10.1.9.9/cmd.html?cmd=<SSI COMMANDS>","cmd1");
getURL("http://10.1.1.1/cmd.html?cmd=<SSI COMMANDS>","cmd2");
///
_root.control1.gotoAndStop("inv");
_root.control2.gotoAndStop("inv");
There is a ton of button and movie states listed here that are similar to above.
}
Any help would be appreciated.
Clean PRELOADER That Includes Fading Out And %
I've been looking for a good preloader to work with,but none of them are as clean or as simple as I would like them to be. I'm running a multiple .swf flash site and I need a simple, but precise preloader that is just a bar moving vertically with the percentage above it when a .swf is called upon. Then when its done loading, the percentage and loadingbar fades away as the .swf appears. Would bytesLoaded or framesLoaded be more exact? I'm kind of a perfectionist. Please help...and I'm using Flash MX 2004 Professional. Thank you.
Oracle Server Not Finding .as Includes..please Help
im getting this error in flashMX2004...and the file does not work on oracale but does on MySql. I think it has somthing to do with the path...not sure. A bit green.
Out put error------------------------------------------------------
**Error** Scene=Scene 1, layer=Actions, frame=2:Line 11: Error opening include file [flashAPI].as: File not found.
#include "[flashAPI].as"
**Error** Scene=Scene 1, layer=Actions, frame=2:Line 12: Error opening include file easingEquations.as: File not found.
#include "easingEquations.as"
**Error** Scene=Scene 1, layer=Actions, frame=2:Line 13: Error opening include file effects.as: File not found.
#include "effects.as"
------------------------------------------------------------------------
Action script calling the includes is this---------------------------------
_global.gRoot = this;
_global.gSystemPath = "../system/";
_global.gBannerPath = "../banner/";
if(gRoot == _root){
#include "[flashAPI].as"
#include "easingEquations.as"
#include "effects.as"
}
--------------------------------------------------
See anything obvious??
I really need the help
An advanced thank you.
m
Pop Up Window Opens But Still Includes Toolbar,etc.
Could anybody tell me if there's anything wrong with this code.
I have the artswf.html file in the same local folder on my hard drive. It works when I do a simple getURL but I really want a chromeless window.
Any help is greatly appreciated.
on (release) {
getURL ("javascript:NewWindow=window.open('artswf.html',' newWin','width=400,height=300,left=0,top=0,toolbar =No,location=No,scrollbars=No,status=No,resizable= No,fullscreen=No'); NewWindow.focus(); void(0);");
Lost FLA File--need To Update Includes
My problems are continuing from a crash which left me .FLA-less. I need to make some changes to my actionscript includes, but it seems that I still have to republish the FLA every time I update these includes. Is the only way to do this to invest in Eltima (I'm on osx) and convert my swf back to fla? Or is there any other possible workaround?
Thanks in advance!
Printing A Website That Includes Flash?
Is there any way to set a website that includes Flash to print the Flash portions as well?
I know you can make a button within Flash, but is there any way one could click 'File'>'Print...' from the browser itself where it would include a snapshot of the Flash?
thanks...
Preloader That Includes Loaded Movies
Hi all,
I have created a file who's only use is to load other swf's... The reason is that I want this file to handle all the coding part, and create the other files by just inserting jpgs on them...
Basically, I call "loader.swf" and send it variables (eg. "loader.swf?proType=web&proID=1"). Then, the loader uses "loadMovie" to include the required file using this code :
Code:
target = "projects/" + _root.proType + "/" + _root.proID + ".swf";
loadMovie(target, this.anim);
As I said, there may be hundreds of child files, and I DON'T want to have to create preloaders for each of them. I want to know how can I include the child file in the main file's preloader...
I attached my current sample here. You will find the following files :
- loader.fla & .swf : The loader file, which contains the preloader
- loader.html : Sample call to the loader with the needed variables
Thanks for your help,
Simo
Saving To A .txt Includes Html Tags?
Hey all,
Hopefully someone has come across something like this before and may be able to forawrd me onto a solution. I'll try to explain what i've done best i can:
I'm trying to save the contents of an input text box to a an external .txt file so it can be dynamically loaded back in on another part of the site. I'm using PHP and I have it working however when it saves, the .txt file not only includes the text but a complete set of html formatting tags? How do i get rid of them??
The input box (var: editorText) is in a movieCilip (editor) called by the send button with the code:
Code:
on (release) {
editor.loadVariables("save.php","POST");
}
The save.php file is as follows:
Code:
<?php
$myFile = "testFile.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = $_POST["editorText"];
fwrite($fh, $stringData);
fclose($fh);
?>
Anyone had this happen before? Anyone overcome this or have any suggestions how to? Please any help gratefully received,
Thanks in advance, Mike
Flash Files Do Not Load From Includes
Hello,
I have a flash header and am also using the sIfR text replacement for my <h4> tags. If a file is not in the root folder the flash movies do not play. This is my file structure.
newSite(folder)
index.php
publicWorks (folder)publicWorks.phpparks (folder)parks.phpThe flash works great when you view index.php but the other files do not load the movie.
This is the PHP code, I know this is the flash forum, but the PHP code works on all includes except flash.
PHP Code:
<?php include $_SERVER['DOCUMENT_ROOT'] . '/newSite/flashHeader.html'; ?>
The sIfR is called via javascript and the paths are correct, but the flash movie doesn't load.
What is the secret to having flash work when it is not in the top level folder.
Thank you.
AttachMovie Where MC Includes Masked Object.
Hi, I've got a prblem which I find very strange.
My as looks as follows:
ActionScript Code:
var label001 = this.attachMovie("label001_id", "label001_mc", 120);
label001._width = 138.8;
label001._height = 184.9;
label001._x = 268.0;
label001._y = 50;
Now the AS isn't the problem, the problem becomes label001_mc which is a pretty standard MC that is a bookpage with text and a graphic.
Since the graphic overflows the pagesize I mask it to fit the page.
This has always worked fine and dandy but now when I use attachMovie and want the MC to have exact _width and _ height numbers that are smaller than the original MC (to later me tweened to it's normal size).
What happens is that the values for _width & _height is applied to the MC but it calculates the values to include the overflowing graphics that is being masked out.
So the page is much smaller than it should be.
Why does Flash resize the MC like this and what do I do about it?
It doesn't seem logic and I need to mask out the graphic.
PS. I tried to remove thre graphic and the mask and then the MC was attached with the correct values so I know that this is where the problem is.
Contribute, Templates, And Includes.. Editing That Is....
I'm deploying a corporate website, with about 8 Contribute users, and myself as the designer/admin.
I've hit one snag, that I'm hoping you can help with.
I have a left-hand navigation column setup, that is being pulled into the template/pages as a virtual include. (I am using virtual includes so there is just one menu file for each directory, so the editors do not forget to add the links to al pages in a group, and so all the links are relative to the site root).
The problem is that while Contribute sees the left-navigation, it cannot edit it.
the include file code looks like this.....
<div id="navhead">
<ul>
<li><a href="index.html">About Us</a></li>
</ul>
</div>
<div class="navlist">
<ul>
<!-- TemplateBeginEditable name="left navigation" -->
<li><a href="ffrdc.html">What is an FFRDC?</a></li>
<li><a href="groups.html">Technical Groups</a></li>
<li><a href="locations.html">Locations</a></li>
<li><a href="officers.html">Officers and Board</a></li>
<li><a href="3404-94.pdf">Org Chart (PDF)</a></li>
<li><a href="CorpBrochure.pdf">Corp Brochure (PDF)</a></li>
<li><a href="AerospaceAR.pdf">Annual Report (PDF)</a></li>
<!-- TemplateEndEditable -->
</ul>
</div>
The <li>s need to stay with the div tag, otherwise the CSS does not apply to them.
I also do not want users to be able to edit the div, but just the contents of the div.
Since I can't save the left-nav as a template, or the include won't work, and Contribute won't see the left-nav file by itself, since it's not linked like a normal file, how do I allow users to edit the laft-nav?...
thoughts?
thanks,
-- KJ
DWMX Inserts Additional Includes
I'm working with DWMX 6.1, and many times while working with recordsets (some I'ave had DWMX add, some I've added via hand-code myself), a lotta times it will not see the current INCLUDE that connects to the DSN or CS in the Connections folder, so in essence I'll have:
Code:
<!--#include file="Connections/dsn_include.asp"-->
<!--#include file="Connections/dsn_include.asp"-->
Does anyone know how to stop DWMX from doing this? Or has Macromedia given up on making patches for MX since MX2K4 is out now?
Server Side Includes And GetURL Problem
Hello again.
Here is the problem.
Basically getURL opens one Server Side Include cmd in one of two hidden frames, but the second getURL SSI opens as new window and not in it's hidden (blank) frame.
Here is the environment
Have a button that on(release) must send two server side includes to two different webservers.
I have two hidden frames that are loaded using the getURL method to send the SSI cmd.
A blank cmd.html page exisits on each device so it can carry out the commands.
Here's the code.
on (release, releaseOutside) {
getURL("http://10.1.9.9/cmd.html?=<SSI COMMANDS>","cmd1");
getURL("http://10.1.1.1/cmd.html?cmd=<SSI COMMANDS>","cmd2");
///
_root.control1.gotoAndStop("inv");
_root.control2.gotoAndStop("inv");
There is a ton of button and movie states listed here that are similar to above.
}
Any help would be appreciated.
Quick Question About Shared Libraries And #includes
If i am using a shared library and the items in that library require using #includes, do i only need to #include the necessary files into the FLA that will be the source file for the shared library? or do i need to include them into all files using mc's which require them?
Slideshow Of Folder Contents? Includes .swf And .gif Files
I need to create a quick presentation showing off our flash animated banners and gif banners.
If I have a folder (on mac or pc) with a bunch of swf and gif files in it, is there a program that I can drop in the folder, launch, and have it cycle through the folder contents?
I used to remember a KPT power show Mac app that would do that, not sure if it understood flash files though. Is there something else that doesn't cost?
Thanks,
DAN
How To Load A Text File That Includes Links?
I now know how to dynamically load text into a flash file from a .txt file (covered here), and I know how to create links in a dynamic text field (covered here).
How do I combine those concepts and load a .txt file that includes links?
Server Side Includes In Flash Objects
How do you call server side includes when the button has been "released"? I want to create a text file to exist on the server side so my clients can update that and not have to use Flash. When the button is released the flash obj will reference the html code in the server side include's text file and display it inside a specified area in the flash image.
Thanks,
SC
Custom Classes: One Class Tracks Multiple Other Classes?
I'm working on a coloring that allows kids to place objects on a scene and then color them so the image can be printed out. So assume you have sky background, the child can select a bird object, drag it into place and once they have it in place, color everything on the page (with a given palette of colors.)
So far it going great. However I want to track what objects have been added to the drawing on the fly. I have a potential solution using arrays but I'm thinking this is perfect opportunity to start using custom classes.
I'm thinking that I'd create a new instantiate a copy of the object class each time an object is added to the scene. However to track the objects added to the scene I'm thinking I'll also use an listing class to track them.
What I'm not sure about is the would the listing class simply contain an array of object identifiers? Any thoughts on the structure of the listing class?
I'm very new to oop as I've mainly been doing procedural programming up to this point but I'm eager to give this a shot.
Thanks!
|