Wrapper Not Wrapping?
I have this "wrapper2" in my page wich does not seem to wrap correctly.http://www.agilitygraphics.com/clients/ceres/green.htmlIt should hold both the div called "content" and the div called "right" but it does not seem to do that, plus it seems like it goes to high also.I added this at the bottom:<br style="clear:left;" /> and now seems to look right in DW, but once I check it in the browser, I have issues.What am I doing wrong?Thank you!
Adobe > ActionScript 1 and 2
Posted on: 12/13/2006 10:48:33 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
[F8] Word Wrapper Again
Thanks so much for the guidance I received so far. I've spent the day learning about forms and I've found info on email forms, guest books, getting URLs from a form--but all of these seem like way more than what I need. If anyone has any suggestions (even in telling me what to study) I'm very grateful. All I need is an input box on the left where people can type in words (many words, if they'd like--but one word per line) and then a submit button. Then on the right, I'd like the return to be those words now with quotes or brackets around them.
Example:
hat
dog
cow
(submit button) returns:
"hat" (etc.)
or in the case of brackets: [hat]
I've seen this done in CGI, but I'd like to do it in flash. It seems like I just need the input action to put quotes or brackets around whatever word is entered and return it on the right in another box the user can copy and paste from.
I'm planning to keep studying about this, but as I go through all the flash manuals, I keep getting the feeling what I'm studying is way more complex than this simple action. =)
Thanks again. I'll post a .fla if I get that far. =)
Apryl
[CS3] Using Preloader Through Wrapper?
Hi All!
A very noobie question... I'm attempting this preloader from http://monkeyflash.com/tutorials/custom-preloader/ to 'preload' an animation file (.swf) file that im doing, as per the bottom section of that tutorial:
"What about loading the entire movie?
How can you use this same technique to load the entire SWF file and not an external asset? One way is to create a “wrapper” swf that only contains your preloader and the code above. You can then load your main SWF file into this wrapper container, and avoid the need to add a preloader to an already-completed Flash file. This is a very efficient and easy way to add a preloader to any site."
Being a noob, i've got no idea what this means. can someone maybe point me in the right direction? Any help apperciated!!
Thanks in advance!
Any Way To Block A SWF Wrapper?
Hello. Some users of our flash apps are defeating copyright protection and
security measures (such as custom context menus) by using a "loader.swf"
as a wrapper. The only contents of the wrapper are something like:
loadMovieNum(ourapplication.swf, 0);
Is there any way to prevent our flash apps from being loaded into such a
wrapper or to make it automatically "break out" of such a wrapper? Any help
or advice would be greatly appreciated. Thanks!
JOSH
Sprite Wrapper?
I am writing all my code using as3. I have buttons that consist of rectangles, text, and an invisible hit area. I have written out each element individually. Is there a way to put them all in one container so I can say button.visible = true and it knows to show or hide all of my elements of my button?
Flickr API Wrapper
I'm trying to get a photogallery to get information directly from flickr.com
I've found a flash API wrapper that looks like it should work but my understanding
of class constructs is too weak to get it going.
http://kelvinluck.com/projects/flash...pper-for-flash
Has anyone else had a go at this??
Wrapper Preloader
Currently I'm teaching myself how to best create 'All flash' websites,
I've been looking through the web trying to find out the best way to create preloaders in AS3, from which I've found a few different methods.
Due to not being confident enough with my AS3 skills, I opted for the wrapper .swf method. Where an independent swf is created to load in the main movie, with a preloader inside that. It works just fine, it's seamless, attractive and efficient ( sizes up at 9kb ).
But one thing I was wondering,
My movie now uses three tiers of URL loaders. One for the wrapper to load the main page. and several inside that to load independent page modules.
I was wondering if anyone could give good advice on lessening CPU load created by this. ( I presume that tiers of URLloaders would wreak havoc for efficiency. )
Is what I've done a bad idea for my site?
And should I get comfortable with doing it this way?
I hear people generally use either:
A Loader in the DocClass. ( A procedure I'm not too familiar with. )
A wrapper SWF
or a loader in the first frame.
Could anyone explain which is the best for what application?
Thanks in advance.
Loading An FLV Into A SWF Wrapper
Hi All!
I'm having trouble with something that I hope someone can help me with. Basically I'm trying to load an flv into a wrapper swf which contains the FLVPlayBack component.
I'm using the html code below (given to me by someone), but I'm not sure how I tell my FLVPlayBack component to pull the GET data and load it into the player.
If someone could tell me the actionscript to do this that would be fantastic!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>hello</title>
<script src="AC_RunActiveContent.js" language="javascript"></script>
</head>
<body>
<script src='AC_RunActiveContent.js' language='javascript'></script>
<!-- saved from url=(0013)about:internet -->
<script language='javascript'>
AC_FL_RunContent('codebase', 'http://download.macromedia.com/pub/s...ersion=9,0,0,0', 'width', 500, 'height', 500, 'src', ((!DetectFlashVer(9, 0, 0) && DetectFlashVer(8, 0, 0)) ? 'player8' : 'player'), 'pluginspage', 'http://www.macromedia.com/go/getflashplayer', 'id', 'flvPlayer', 'allowFullScreen', 'true', 'movie', ((!DetectFlashVer(9, 0, 0) && DetectFlashVer(8, 0, 0)) ? 'player8' : 'player'), 'FlashVars', 'movie=/test/get_video.flv&bgcolor=0x051615&fgcolor=0x13ABEC&vo lume=100&autoload=on&autorewind=on');
</script>
<noscript>
<object width='500' height='500' id='flvPlayer'>
<param name='allowFullScreen' value='true'>
<param name='movie' value='player.swf?movie=/test/get_video.flv&bgcolor=0x051615&fgcolor=0x13ABEC&vo lume=100&autoload=on&autorewind=on'>
<embed src='player.swf?movie=/test/get_video.flv&bgcolor=0x051615&fgcolor=0x13ABEC&vo lume=100&autoload=on&autorewind=on' width='500' height='500' allowFullScreen='true' type='application/x-shockwave-flash'>
</object>
</noscript>
</body>
</html>
Thank you in advance
Splash
Flash Wrapper
I'm just wondering how I would go about making a flash wrapper, that would go around an already existing flash program and do things with it such as modify it's volume.
Any help would be appreciated immensely.
Thanks
C
How To Use MovieClip As A Wrapper?
Hi there,
I hope someone here can explain on how does a movieClip become a wrapper on a navigational sys??
I read the course outline of Macromedia on Flash Basic and under building a Navigational sys there was a sub-category on "Using a MovieClip as a wrapper".
Just confused on that part.
Thanks and more power to this site!
Yet Another R. Penner Wrapper
Last edited by RAMPAGE201 : 2002-07-23 at 07:37.
This is a piece to a larger project that I am working on. You should have the robert penner easing functions in a library indicated.
you can get the library on his page or my home page points to it. (under open source.)
http://www.nebulouscore.com/
The general idea:
ABS -- tween from an absolute begin, end value;
REL -- gets the current property value to fill in the start/end(b,c) values needed for the penner function
the result.flag indicates whether the tween has reached the desired value.
Code:
#include "..librarypennerEasing.as"
function PennerABS (pfunc, beginVal , endVal, duration) {
this.pennerFunc = pfunc
this.t = 0
this.b = beginVal
this.c = endVal - beginVal
this.d = duration
this.result = {val:0,flag:false};
this.Execute = function () {
this.result.val = eval(this.pennerFunc)(this.t, this.b, this.c, this.d)
this.result.flag = (this.t >= this.d)
this.t++;
return this.result
}
}
// pennerFunc values are relative to an objects target property
function PennerREL (pfunc, obj, prop, relVal, duration) {
this.pennerFunc = pfunc
this.t = 0
this.b = obj[prop]
this.c = relVal
this.d = duration
this.result = {val:0,flag:false};
this.Execute = function () {
this.result.val = eval(this.pennerFunc)(this.t, this.b, this.c, this.d)
this.result.flag = (this.t >= this.d)
this.t++;
return this.result
}
}
fred = new Object(); fred._x = 100;
foo = new PennerABS ("Math.linearTween", 0, 10, 10);
boo = new PennerREL ("Math.easeInQuad", fred,"_x", -10,10)
do { res = boo.Execute()
trace(res.val + ":" + res.flag) }
while (!boo.result.flag);
do { res = foo.Execute()
trace(res.val + ":" + res.flag) }
while (!foo.result.flag);
Wrapper Swf That Pre-loads Sounds
Hi there, first post on flashkit hopefully many more to follow.
I am trying to make a wrapper swf file that preloads the main swf. I have managed to do this using the following code:
var myLoader:Loader = new Loader();
myLoader.contentLoaderInfo.addEventListener(Progre ssEvent.PROGRESS,showProgress);
myLoader.contentLoaderInfo.addEventListener(Event. COMPLETE,showLoadResult);
myLoader.load(new URLRequest("Mainpage.swf"));
addChild(myLoader)
function showProgress(evt:ProgressEvent):void {
percent.text = (100*evt.bytesLoaded/evt.bytesTotal)+"%";
}
function showLoadResult(evt:Event):void {
removeChild(percent);
removeChild(loading);
addChild(myLoader);
}
However I can't figure out how to also preload two mp3's that are used in the main SWF but still include this preloading in the wrapper as a part of the total % loaded. Is there a way of passing the loaded sounds from the wrapper to the main SWF or is there another way??
Thanks for your help, MonkEE
[F8] Trouble Loading SWF Into MC Wrapper
I am having trouble loading SWF into a MC wrapper. I am pretty new to flash so hopefully someone can pick this off quickly, I thought this was working until I put it together now I am having these strange problems.
it works fine when I pull it up directly, I can resize the windows and it reacts like I want:
http://www.rakbiz.com/pics/pb/photos/photos.swf?1=1
but when I load it into a wrapper, its comes up blank (click the top right button:
http://www.rakbiz.com/pics/
I am using moviecliploader and LoadClip to load the clip from the wrapper and its working fine for others .swf's that dont do any resizing.
Here is the code from the loaded clip that is choking:
Code:
import mx.controls.TextInput;
import mx.data.types.Int;
import mx.utils.XMLString;
var thumbWidth = 100;
var thumbHeight = 100;
var thumbBorderY = 25;
var thumbSegments = 0; //divided by the number if nodes ro children in xml
var MCL:MovieClipLoader = new MovieClipLoader();
MCL.addListener(this);
//
// FUNCTIONS
//
function thumbBlock() {
return (Stage.width / 4);
}
function thumbOffsetX() {
return (thumbBlock() - thumbWidth) / 2;
}
function loadPictureIntoMc(inClip:String, inX:Number, inY:Number, inFile:String) { //create our movieclip loader and load image
// Creates a movie clip to hold the container.
this.createEmptyMovieClip(inClip, this.getNextHighestDepth());
with (this[inClip]) {
_x = inX;
_y = inY;
}
// Loads an image into _mc.
var imgPath:String;
if (this == _level0) {
imgPath = "";
}
else {
imgPath = "pb/photos/";
}
MCL.loadClip(imgPath + inFile, this[inClip]);
}
function onLoadInit(inClip:MovieClip) { //event handler run after the MCL loader is complete
trace("onloadinint:")
if (inClip._name == "big_mc") {
trace("onloadinint:BIG")
with (inClip) {
_width = Stage.width - (thumbOffsetX() * 2);
_height = Stage.height - (thumbBorderY * 3) - thumbHeight;
}
} else {
with (inClip) {
_height = thumbHeight;
_width = thumbWidth;
}
buttonInit(inClip);
}
}
//
// BUTTONS
//
function buttonInit(inClip:MovieClip) {
inClip.onPress = function() {
MCL.loadClip(inFile,buf_mc);
}
inClip.onRollOver = function() {
with (inClip) {
_xscale += 10;
_yscale += 10;
}
}
inClip.onRollOut = function() {
with (inClip) {
_xscale -= 10;
_yscale -= 10;
}
}
}
//
//STAGE
//
function stageInit() {
Stage.align = "TL";
Stage.scaleMode = "noScale";
//setup stage resize listener
var stuff = new Object(); // create a custom object to register with the Stage object
stuff.onResize = function() { // add an 'onResize' method to our custom object.
stageResize();
}
Stage.addListener(stuff); // register our custom object with the Stage object.
}
function stageResize() {
// the function that actually does the stretching..
trace("Stage W:"+Stage.width+", H:" + Stage.height);
//trace("stageResize()");
//with (thumb1_mc) {
//_x = 25;
//_y = 25;
//_width = 200;
//_height = 200;
// }
//rearrange thumbs
for(var i:Number = 1; i<=4; i++) {
this["thumb"+i+"_mc"]._x = (thumbBlock()*i) - thumbBlock() + thumbOffsetX();
}
//rearrange big
with (big_mc) {
_x = thumbOffsetX();
_width = Stage.width - (thumbOffsetX() * 2);
_height = Stage.height - (thumbBorderY * 3) - thumbHeight;
}
}
//
// MAIN
//
stageInit(); //setup the stage and resize listener
loadPictureIntoMc("thumb1_mc", (thumbBlock() * 0) + thumbOffsetX(), thumbBorderY, "1.jpg");
loadPictureIntoMc("thumb2_mc", (thumbBlock() * 1) + thumbOffsetX(), thumbBorderY, "2.jpg");
loadPictureIntoMc("thumb3_mc", (thumbBlock() * 2) + thumbOffsetX(), thumbBorderY, "3.jpg");
loadPictureIntoMc("thumb4_mc", (thumbBlock() * 3) + thumbOffsetX(), thumbBorderY, "4.jpg");
loadPictureIntoMc("big_mc", thumbOffsetX(), (thumbBorderY*2) + thumbHeight, "1big.jpg");
trace("
Photos.this:"+this);
stop();
Thanks for your help!
GBY,
-R
Writing A Wrapper Class In AS
So I'm relatively new to AS and am running into some trouble. I'm trying to put together a wrapper class that will simplify use of an existing charting package I have access to.
As a first step, I am trying to write a class that will apply the supplied example to an empty movie. Here is what the original AS looks like:
ActionScript Code:
#include "../classes/com/fusioncharts/includes/LoadingFunctions.as"
#include "../classes/com/fusioncharts/includes/AppMessages.as"
import com.fusioncharts.core.charts.MSLine2DChart;
var strXML:String = "[[ some random XML here ]]";
var xmlData:XML = new XML(strXML);
var chartContainerMC:MovieClip = this.createEmptyMovieClip("ChartHolder",1);
var myFirstChart:MSLine2DChart = new MSLine2DChart(chartContainerMC, 1, 450, 360, 130, 20, false, "EN", "noScale");
myFirstChart.setXMLData(xmlData);
myFirstChart.render();
stop();
What do I need to watch out for when attempting to move this code into a self-contained class? I imagine "this.createEmptyMovieClip("...") will not work, what would I use to reference the movie rather than "this"?
Hopefully what I'm asking makes sense!
Very Odd Issue With As2 Swf In As3 Wrapper, Looking For Information
Sup er'body. So heres my issue, using loader and gskinners swf bridge, i have a as3 wrapper thats just used for functions and getting to the file system (thanks to air). The AS2 swf we bring it using loader, and just addChild(as2) to the stage of our as3 app. This app basically is a image viewer, that you can interact with using mouse or touchscreen. So there is just a review image and some rows of thumbnails.
Everything works cool and such except that sometimes movieclips disappear.
Only using the as2 version there seems to be no issue at all, i can't break it and make the images not appear.
But once I include it in the as3 wrapper and run it that way. Jumping around the thumbnail review panel after a few jumps no image appears where it should be. Just like the object isn't there. Also including it in the as3 wrapper makes the whole app run a bit more sluggish. If I increase the system priority for the app it performs better as well as the issue of images not appearing occurs a bit less. Looking at log files and traces nothing occurs out of the ordinary, so its working just like it should, but sometimes the objects just aren't there.
Now I have heard of issues between as2 and as3 of some componets not working right and stuff of that sort. I was mainly just wondering if people could let me know any issues people have seen occur when loading as2 swfs into as3. Thanks a lot guys.
Preloader Wrapper And Variables
I'm using a separate swf (preloader.swf) file to preload another swf (nav.swf) that has a tree component. Everything works fine except for a variable that nav.swf needs to access. The variable is coming in via SWFObject. If I replace the preloader.swf in the SWFObject with nav.swf then I can access the variable no problem. Question is how do I use preloader.swf and still access the navid variable?
Attach Code
<div id="flash_navigation">
<script type="text/javascript">
var so = new SWFObject("/preloader.swf", "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", "142", "500", "9", "#f3f3ec");
so.addVariable("navid", "21");
so.write("flash_navigation");
</script>
</div>
Question On MovieClip Wrapper
Hi there,
Just a quick newbie question ...I read the course outline of Macromedia on Flash Basic and under building a Navigational sys there was a sub-category on "Using a MovieClip as a wrapper".
What does it mean when you make a movieClip as a wrapper? does it mean movieclip buttons? Just confused on that part. I tried to check out some books but have failed to find the exact "term/wording" that refers to movieclip as a wrapper.
Thanks guys and have a nice day everyone!
Question On MovieClip Wrapper
Hi there,
Just a quick newbie question ...I read the course outline of Macromedia on Flash Basic and under building a Navigational sys there was a sub-category on "Using a MovieClip as a wrapper".
What does it mean when you make a movieClip as a wrapper? does it mean movieclip buttons? Just confused on that part. I tried to check out some books but have failed to find the exact "term/wording" that refers to movieclip as a wrapper.
Thanks guys and have a nice day everyone!
[F8] Trouble Loading SWF Into MC Wrapper
I am having trouble loading SWF into a MC wrapper. I am pretty new to flash so hopefully someone can pick this off quickly, I thought this was working until I put it together now I am having these strange problems.
it works fine when I pull it up directly, I can resize the windows and it reacts like I want:
http://www.rakbiz.com/pics/pb/photos/photos.swf?1=1
but when I load it into a wrapper, its comes up blank (click the top right button:
http://www.rakbiz.com/pics/
I am using moviecliploader and LoadClip to load the clip from the wrapper and its working fine for others .swf's that dont do any resizing.
Here is the code from the loaded clip that is choking:
ActionScript Code:
import mx.controls.TextInput;
import mx.data.types.Int;
import mx.utils.XMLString;
var thumbWidth = 100;
var thumbHeight = 100;
var thumbBorderY = 25;
var thumbSegments = 0; //divided by the number if nodes ro children in xml
var MCL:MovieClipLoader = new MovieClipLoader();
MCL.addListener(this);
//
// FUNCTIONS
//
function thumbBlock() {
return (Stage.width / 4);
}
function thumbOffsetX() {
return (thumbBlock() - thumbWidth) / 2;
}
function loadPictureIntoMc(inClip:String, inX:Number, inY:Number, inFile:String) { //create our movieclip loader and load image
// Creates a movie clip to hold the container.
this.createEmptyMovieClip(inClip, this.getNextHighestDepth());
with (this[inClip]) {
_x = inX;
_y = inY;
}
// Loads an image into _mc.
var imgPath:String;
if (this == _level0) {
imgPath = "";
}
else {
imgPath = "pb/photos/";
}
MCL.loadClip(imgPath + inFile, this[inClip]);
}
function onLoadInit(inClip:MovieClip) { //event handler run after the MCL loader is complete
trace("onloadinint:")
if (inClip._name == "big_mc") {
trace("onloadinint:BIG")
with (inClip) {
_width = Stage.width - (thumbOffsetX() * 2);
_height = Stage.height - (thumbBorderY * 3) - thumbHeight;
}
} else {
with (inClip) {
_height = thumbHeight;
_width = thumbWidth;
}
buttonInit(inClip);
}
}
//
// BUTTONS
//
function buttonInit(inClip:MovieClip) {
inClip.onPress = function() {
MCL.loadClip(inFile,buf_mc);
}
inClip.onRollOver = function() {
with (inClip) {
_xscale += 10;
_yscale += 10;
}
}
inClip.onRollOut = function() {
with (inClip) {
_xscale -= 10;
_yscale -= 10;
}
}
}
//
//STAGE
//
function stageInit() {
Stage.align = "TL";
Stage.scaleMode = "noScale";
//setup stage resize listener
var stuff = new Object(); // create a custom object to register with the Stage object
stuff.onResize = function() { // add an 'onResize' method to our custom object.
stageResize();
}
Stage.addListener(stuff); // register our custom object with the Stage object.
}
function stageResize() {
// the function that actually does the stretching..
trace("Stage W:"+Stage.width+", H:" + Stage.height);
//trace("stageResize()");
//with (thumb1_mc) {
//_x = 25;
//_y = 25;
//_width = 200;
//_height = 200;
// }
//rearrange thumbs
for(var i:Number = 1; i<=4; i++) {
this["thumb"+i+"_mc"]._x = (thumbBlock()*i) - thumbBlock() + thumbOffsetX();
}
//rearrange big
with (big_mc) {
_x = thumbOffsetX();
_width = Stage.width - (thumbOffsetX() * 2);
_height = Stage.height - (thumbBorderY * 3) - thumbHeight;
}
}
//
// MAIN
//
stageInit(); //setup the stage and resize listener
loadPictureIntoMc("thumb1_mc", (thumbBlock() * 0) + thumbOffsetX(), thumbBorderY, "1.jpg");
loadPictureIntoMc("thumb2_mc", (thumbBlock() * 1) + thumbOffsetX(), thumbBorderY, "2.jpg");
loadPictureIntoMc("thumb3_mc", (thumbBlock() * 2) + thumbOffsetX(), thumbBorderY, "3.jpg");
loadPictureIntoMc("thumb4_mc", (thumbBlock() * 3) + thumbOffsetX(), thumbBorderY, "4.jpg");
loadPictureIntoMc("big_mc", thumbOffsetX(), (thumbBorderY*2) + thumbHeight, "1big.jpg");
trace("
Photos.this:"+this);
stop();
Thanks for your help!
GBY,
-R
Will An .swf Stream Outside Of An HTML Wrapper File?
perhaps this is a stupid question, but is it possible to launch an SWF in a separate window WITHOUT using a HTML wrapper file and have the SWF stream?
i don't mean embedding the SWF in a HTML wrapper file and then launching a new window calling that wrapper file. that will obviously work.
but i've noticed that whenever i simply launch the SWF itself...
example:
onClick = "window.open('myMovie.swf','MyMovie','width=820,he ight=441,status,scrollbars=no,resizable=yes')"
...my SWF will only begin playing after it has been completely downloaded. the SWF even has a preloader built into it, so the first couple of frames are only 2k in size, but the preloader is rendered useless because the first frame won't even begin playing until all frames have been loaded. the user ends up staring at a blank screen.
thanks.
Wrapper Movie Clip Question
Hi I have a question........I'd like to wrap every movie clip onstage in a "wrapper movie clip" so I can resize everything in one swoop......so I'm wondering what the path would be to my componets.....is _root.myclip.msg.text? or what?
Looking For Tips On Creating A Word Wrapper
Hi there,
I'm just beginning my studies in flash and I'd like to create a form that people could enter words in on the web, and then have them generated with quotes or brackets around them. For instance, you can type in
hat
car
pig
and the form would change them into:
"hat"
"car"
"pig"
I'm sure Flash is capable of this, and I know this site has a wealth of tutorials--but I don't know what to call this form, in order to search for it.
What kind of form would this be, and if you know of any tutorials in creating one, please send them my way.
Thanks for the tips, and I look forward to spending a lot of time here at such a neat resource.
aprylian
Flash Wrapper For Windows Media
Can someone point me to a tutorial or examples of how to create a Flash wrapper to post Windows Media (or other type) movies online?
Thanks
Still Working On Simple Wrapper Form
This is what I've come up with so far:
http://www.creatingconsciously.com/wrapper.fla
But even with the code suggested here, it's not working right--I must be doing something
wrong. Thanks for the help!
apryl
Application Wrapper And Access To Stage
Hi,
I have my application swf with its document class Application. I made a wrapper swf in order to preload the application, so the entire project has the following structure:
wrapper.swf -> Document class: TopLevel.as
main.swf -> Document class: Application.as
The problem is that I cannot access the stage when I publish the main.swf file, so it gives compiling errors.
Note: Application and other classes used in the project try to access the stage through static methods (i.e. Application.showPreload() ).
What am I doing wrong?
Creating YouTube Like Video Wrapper
here's what I want to do:
Create a video player much like Lee's that has the following characteristics:
- "frontpage" still that when clicked triggers the play event
- link to above still and video in embed code so that the same swf can be used to display numerous different jpg and flv files.
- no xml or other external file control. it has to be in the embed code to work in a blogging context.
The whole idea is to be able to embed a customized player in blogging software without having to use YouTube or similar services.
I think this can be done with flashVars or something like that but I'm sketchy on the details. If anyone has any ideas it would be a great help 'cause YouTube just won't do - I need more control.
mor10
Create Flash Wrapper For Volume
Hello,
I am curious as to how I could create a flash wrapper to disable/turn the volume to zero of a flash object such as a YouTube video. Can this be done? Any code/documentation would be greatly appreciated, thank you all for your time!
C
Preloading Wrapper, Avoid Heavy 1st Frames
Here is a preloading tip, brought to you by JRMillion
As you probably know flash jams a lot of stuff into the first frame of your swf, library items linked for actionscript (unless you specify) and the first frame is also where AS classes are kept.
This can become a problem when you try to setup a preloader. If the first frame makes up the majority of the filesize your preloader wont work well.
Here is something I do to avoid this problem, and prevent me from having to include the preloader in the main site swf.
Create a second swf of the same size as your main one
and on frame one place this code
Code:
siteLoader = new MovieClipLoader();
//Called when swf data starts getting downloaded
siteLoader.onLoadStart = function(target_mc){
target_mc.stop();
}
//called over and over while data is downloading
siteLoader.onLoadProgress = function(target_mc, loadedBytes,totalBytes){
loader.text = Math.ceil((loadedBytes/totalBytes)*100) +'%';
}
//Called when first frame of loaded swf is run
siteLoader.onLoadInit = function(target_mc){
}
//Called when load is Complete, duh :)
siteLoader.onLoadComplete = function(target_mc){
loader._visible = false;
target_mc.play();
}
siteLoader.loadClip("main.swf",1);
stop();
What this does is act as a wrapper, whos only job is to preload your main swf, without having to deal with possible "heavy frames".
It loads your swf into a Level rather than a clip, so you wont run into possible scope and _root referencing issues as you would when loading into a clip.
This assumes you have a dynamic text box called "loader", which the script also hides once the loading is complete.
You could obviously modify this a little bit too work with "cooler" loaders, but I figured id keep the example simple.
How To Make A SWF Wrapper With A Clickable Transparent Button Overlay?
Hi all, I'm trying to figure out how to make a configurable wrapper or container file that I can simply pass variables such as
wrapper.swf?m=movie-to-load&u=url-that-button-goes-to
It seems simple enough, and I'm half way there ( I can get external movies to load ) however the transparent button is over my head ( read: I'm a complete noob ).
Currently I have a simple one frame movie with this actionscript in it:
_root.loadMovie(_root.m);
And a transparent button that fully envelops the stage with the following actionscript in it:
on( release ){
getURL(_root.u);
}
I've tried hardcoding a url into getURL as well but it doesnt' seem to be recognizing that there's even a button there.. is that because there's a new movie being loaded??
Any help would be greatly appreciated!
BTW I'm doing this with Flash 8 if that makes any difference.
Text Wrapping
I'm trying to get some text to wrap in a flashtyper .fla
Here is the code:
text = "Test effect for flashkit.com yes yes yes";
i = 1;
max = length(text);
kerning = "10";
size = "10";
setProperty ("char", _visible, "0");
Is there a SIMPLE way to force a line feed? i.e. between ".com" and "yes yes yes"
Thanks in Advance
Text Wrapping?
all of a sudden some of the text in my site has decided to wrap...Does anyone know why this might be?
Wrapping Image
Hi All!
Here is what I want to do:
I have an image of a scanner and one of a picture/piece of paper (they are PNGs), I want to make the picture image wrap around the scanner and circle it. And I want it to be a smooth animation. Is this possible?
I would REALLY appreciate any help that anyone could provide!
Thanx!
Text Wrapping
is there a way of text wrapping.
How do i wrap a text to a picture
Thanks
Wrapping Text
Hello Everyone, thanks in advance for any help.
I'm looking to wrap text around an image and I'm pretty certain this isn't possible so I was wondering if I could add 2 text boxes and automatically taking whatever text doesn't fit into the first text box and inserting the rest into the next text box. I wouldn't want to cut off any words either so I would have to test for a blank space as well.
The copy is dynamic which Is why I need this to work!
Wrapping Text
I have some popup boxes that display dynamic text read in via a text file. Due to the size of the box, the text at times breaks right on a space and the space is carried to the next line causing an indentation. I know that a hard <br> will fix the indentation however it requires going back each time a line is wrapped carrying the space forward to the next line and that can change depending if someone resizes the box or alters the text.
My question is, is there a way to wrap text without resulting in this described indentation?
Many thanks in advance!
Text Wrapping Up..possible
Hi, Is it possible to have a dynamic multiline box wrap up, so the line moves up and the wrapping text moves under it if 2 lines are needed instead of the normal 1?
Thanks
MovieClip Wrapping
Hey all! Im working on this panorama type thing of a room, just wondering if there is any simple way tow 'screen wrap' if you like, an MC when it goes of the edge of the screen. I want the movie clip to apear as though it is continuous, so I will need at least two MC's at the seam..
Cheers in advance.
XML Text Not Wrapping
I can't seem to get a few paragraphs loaded from an XML file to wrap in a dynamically created textField. Only one line shows, unless the text has carriage returns. Suggestions please! Thanks.
Code:
with( captionFormat = new TextFormat() )
{
color = 0xFFFFFF;
font = "arial";
size = 12;
multiline = true;
wordWrap = true; }
//... and then
txt.setTextFormat(captionFormat);
Wrapping Of Text
I'm not new to this but been having trouble with wrapping text around an image. It would be easy to say just use the space bar however when you are pulling in text from 30 XML pages that would be pretty tough.
Is there not a function that can be used to fix the wrapping of text? Like in quark or word you just click the block format and wraps for you.
Any suggestions?
Wrapping A PBJ Into An AS Class
After doing some research,
I've found a way (probably not optimal) to wrap a PBJ into an AS class.
That is, it's possible to create your own AS filter classes which work just like the built-in BlurFilter and DropShadowFilter.
You can create an AS filter class with adjustable parameters like BlurFilter.blurX and DropShadowFilter.quality.
I've started a GoogleCode project called PBJ2AS which does just that.
If you're interested, just check it out here: http://code.google.com/p/pbj2as/
The basic idea is converting a ByteArray into a String, then store it in an AS class as a static String property.
Later on, it can be parsed to regenerate the original ByteArray.
This ByteArray can then be passed to a Shader to create a ShaderFilter.
Edited: 11/11/2008 at 10:20:23 AM by CJ Cat
Wrapping Text
I'd like to be able to wrap text around an object, such as when you load an image into a wordprocessor. Can anyone think of any dynamic ways of accomplishing this? (I want to have the user drag a box around the screen and have the text wrap around it and not be obscured by it.
Wrapping Text Via AS 2.0
Hey everyone...
Working on a site for a client with an XML loaded page...
this page is for a model showcase on his website...
all is working fine but the last text field (hobbyText) isn't behaving in the multiline fasion as it should. Any ideas on why?
Code:
var listText = new TextFormat();
listText.font = "Verdana";
listText.color = 0xFFFFFF;
listText.size = 11;
listText.bold = true;
var diva = new XML();
diva.ignoreWhite = true;
loadImage = function(filepath){
imgHolder.createEmptyMovieClip("page", 1);
var clip = new MovieClipLoader();
var clipCtrl = new Object();
clipCtrl.onLoadStart = function(mc){
mc._visible = 0;
}
clipCtrl.onLoadError = function(mc){
trace("error");
}
clipCtrl.onLoadInit = function(mc){
var W = mc._width;
var H = mc._height;
mc._height = 290;
mc._width = 290*W/H;
textHolder._x = imgHolder._x + imgHolder._width + 15;
mc._alpha = 0;
mc._visible = 1;
mc.onEnterFrame = function(){
this._alpha += 5;
if(this._alpha >= 100){
this._alpha = 100;
delete this.onEnterFrame;
}
}
}
clip.addListener(clipCtrl);
clip.loadClip(filepath, imgHolder.page);
}
loadEvent = function(){
imgHolder.page.removeMovieClip();
textHolder.page.removeMovieClip();
var node = parent.childNodes[showing];
loadImage(node.childNodes[0].attributes.file, node.childNodes[0].attributes.link);
textHolder.createEmptyMovieClip("page", 1);
Y = 0;
yGap = 3;
nameText = textHolder.page.createTextField("nameText", 1, 0, Y, 100, 15);
nameText.autoSize = true;
nameText.multiline = false;
nameText.html = true;
nameText.selectable = false;
nameText.antiAliasType = "advanced";
nameText.gridFitType = "none";
nameText.sharpness = -400;
nameText.setNewTextFormat(listText);
nameText.htmlText = "Name: " + node.childNodes[1].firstChild.nodeValue;
Y += nameText._height + yGap;
fromText = textHolder.page.createTextField("fromText", 2, 0, Y, 100, 15);
fromText.autoSize = true;
fromText.multiline = false;
fromText.html = true;
fromText.selectable = false;
fromText.antiAliasType = "advanced";
fromText.gridFitType = "none";
fromText.sharpness = -400;
fromText.setNewTextFormat(listText);
fromText.htmlText = "From: " + node.childNodes[2].firstChild.nodeValue;
Y += fromText._height + yGap;
ageText = textHolder.page.createTextField("ageText", 3, 0, Y, 100, 15);
ageText.autoSize = true;
ageText.multiline = false;
ageText.html = true;
ageText.selectable = false;
ageText.antiAliasType = "advanced";
ageText.gridFitType = "none";
ageText.sharpness = -400;
ageText.setNewTextFormat(listText);
ageText.htmlText = "Age: " + node.childNodes[3].firstChild.nodeValue+"</a>";
Y += ageText._height + yGap;
HeightText = textHolder.page.createTextField("HeightText", 4, 0, Y, 100, 15);
HeightText.autoSize = true;
HeightText.multiline = false;
HeightText.html = true;
HeightText.selectable = false;
HeightText.antiAliasType = "advanced";
HeightText.gridFitType = "none";
HeightText.sharpness = -400;
HeightText.setNewTextFormat(listText);
HeightText.htmlText = "Height: " + node.childNodes[4].firstChild.nodeValue;
Y += HeightText._height + yGap;
weightText = textHolder.page.createTextField("weightText", 5, 0, Y, 100, 15);
weightText.autoSize = true;
weightText.multiline = false;
weightText.html = true;
weightText.selectable = false;
weightText.antiAliasType = "advanced";
weightText.gridFitType = "none";
weightText.sharpness = -400;
weightText.setNewTextFormat(listText);
weightText.htmlText = "Weight: " + node.childNodes[5].firstChild.nodeValue+"</a>";
Y += weightText._height + yGap;
measureText = textHolder.page.createTextField("measureText", 6, 0, Y, 100, 15);
measureText.autoSize = true;
measureText.multiline = false;
measureText.html = true;
measureText.selectable = false;
measureText.antiAliasType = "advanced";
measureText.gridFitType = "none";
measureText.sharpness = -400;
measureText.setNewTextFormat(listText);
measureText.htmlText = "Measurements: " + node.childNodes[6].firstChild.nodeValue;
Y += measureText._height + yGap;
hobbyText = textHolder.page.createTextField("hobbyText", 7, 0, Y, 100, 15);
hobbyText.autoSize = true;
hobbyText.multiline = true;
hobbyText.html = true;
hobbyText.selectable = false;
hobbyText.antiAliasType = "advanced";
hobbyText.gridFitType = "none";
hobbyText.sharpness = -400;
hobbyText.setNewTextFormat(listText);
hobbyText.htmlText = "Hobbies: " + node.childNodes[7].firstChild.nodeValue;
Y += hobbyText._height + yGap;
}
diva.onLoad = function(success){
if(success){
parent = diva.firstChild;
divaCount = parent.childNodes.length;
showing = 0;
loadEvent();
}
}
diva.load("XML/Divas.xml");
Bending Or Wrapping Text
Is there any way to wrap text around an object, such as a globe, or do I have to create an image in an outside program and import it in? Thanks!
Input Textfield Not Wrapping On
hi, need urgently help:
have dynamically created some "input" textfields.
everything works fine but the wrap option if "Enter" is pressed.
Pressing "Enter" has no effekt on my multiline input-textfield.
The cursor just remains in the same line.
here the facts of the textfield:
multiline = true;
type = "input";
embedFonts = true;
selectable = true;
wordWrap = true;
HELP!
Dynamic Text-wrapping Bug In IE
Preface: My apologies if this question has been answered before. I tried to search the forums but the search engine wasn't responding.
I have a very strange problem that only occurs on IE (I'm using version 5.00.3502.1000, and it's on Win2K SP3). Netscape, Opera, and the Flash player itself work properly. I've checked my player and it appears to be up to date.
The best way to describe the problem is to show it to you. Here's the swf:
http://www.blackflydesign.com/for_te...text_test.html
and here's the (very simple) FLA for those who are curious.
http://www.blackflydesign.com/for_testing/text_test.fla
The problem is that text that should only take up two lines (quite a bit less, in fact) is taking up three lines. A line break is being generated where there is no need. Clearly, this creates a problem for layout! If it were just this one instance, I could hardwire a regular text field or find some other workaround, but the app I'm building needs to be flexible. (BTW this example uses Arial, but I've also encountered it with other fonts.)
I've tried setting the Text.embedFont parameter to true for the offending textfield, but it has no effect. I've tried every tweak I can think of to the text field itself, but the problem won't go away.
Does anyone have any suggestions? Also, if you've tried this out on IE and NOT encountered the problem, please say so, as well as what version of IE and what operating system you were using.
Many thanks. I hope there's a solution to this bizarre problem.
Jamie
HTML Text Not Wrapping
Hello,
I'm loading some text with html formatting into a dynamic text box. It's set to multiline and html is selected. However, when it gets to the section of text where there is html formatting, it stops word-wrapping and runs out of the box.
Is it not possible to word-wrap html formatted text in flash?
*******************************
UPDATE: It turns out that it's not wrapping that is the problem. I am using FlashMX2004 and the textHeight property to set the size of the text field. It turns out that mx2004 returns an incorrect textHeight if the field contains html formatting.. Anyone know a workaround for this?
Wrapping In HtmlText Boxes.
So I am back with another question about managing content for Flash console sites.
Here we go: is there a way to get another behavior out of an <img/> tag in an HTML-enabled dynamic textfield besides align=left, which appears to be the default? Otherwise, how can I get the text to start after the image vertically, rather than wrapping in beside it. Hmm.
A little help? Thanks in advance, fellow nerds.
[F8] Dynamic Text Not Wrapping?
Hello there.
I'm working on a project that has dynamic text. I created my dynamic text box and the text is loading fine but the problem is that it is maintaining all the text in one line (so it's running off the screen).
I selected multi line, I tried multi line no wrap, I tried breaking the lines with html (<br />), but nothing seems to work.
Any ideas?
Thanks
Wrapping An Image Between 4 Points
I have made a cube which you can turn around by moving with the mouse(see it here), and now i want to make an image on each side of it. I don't want to have the sides coloured in, i can do that myself. But i want to do it with an imported Bitmap. So does anyone know how to crop each corner of an image to a specified point?
|