Radom image into MovieClipLoader

This is a discussion on "Radom image into MovieClipLoader" within the Flash & Multimedia Forum section. This forum, and the thread "Radom image into MovieClipLoader are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Nov 28th, 2007, 13:59
Junior Member
Join Date: Mar 2007
Location: Dorset,England
Age: 29
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Radom image into MovieClipLoader

I have and image that moves across the stage in a diagonal using the script below



As you can see each time it enters the frame it stats at a random place on the X access.

Code: Select all
              target_mc._x = Stage.width =random(750)-5;
              target_mc._y = Stage.height =90;
              
              target_mc.onEnterFrame = function() 
              {
                          target_mc._x -= random(1)+2; // decrease current x position by 1(Random)  pixels
                          target_mc._y -= random(1)+2; // decrease current _y position by 1(Random) pixels
                                      if (target_mc._y <= -200)  
                          {
                                      target_mc._x = Stage.width =random(750)-5; 
                                      target_mc._y = 90;
                                      
                                                                          
                          }
then inside a MovieClip I have embeded another MovieClip and called it "embed_mc" and added this code
Code: Select all
  var picture_array:Array = new Array ();
   
  picture_array[0] = "pic1.png";
  picture_array[1] = "pic2.png";
  picture_array[2] = "pic3.png";
  picture_array[3] = "pic4.png";
  picture_array[4] = "pic5.png";
  picture_array[5] = "pic6.png";
   
  var iWhichPic:Number = Math.floor(Math.random()*6);
   
  var myMCL:MovieClipLoader = new MovieClipLoader();
  myMCL.loadClip(picture_array[iWhichPic], "embed_mc");
So it all works.

Each time you test the movie a random image gets dragged into the movie clip.

But what I want it to do is drag a random image in each time the picture enters the frame.

Can any one help?

cheers

Last edited by karinne; Dec 3rd, 2007 at 13:59. Reason: Please use vBcode when adding code in your post.
Reply With Quote

  #2 (permalink)  
Old Dec 1st, 2007, 15:22
marSoul's Avatar
Moderator
Join Date: Sep 2007
Location: Tehran - Iran
Age: 28
Posts: 411
Blog Entries: 2
Thanks: 3
Thanked 4 Times in 4 Posts
Send a message via MSN to marSoul Send a message via Yahoo to marSoul
Re: Radom image into MovieClipLoader

Please send your fla file...
__________________
Designing For Communicating
Website : http://www.datisdesign.com
Weblog : http://blog.datisdesign.com

Last Blog Entry: Throughout IRAN (Dec 10th, 2007)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Treating an image with <div> tags like a normal image mikeym Web Page Design 2 Mar 1st, 2008 15:28
Ever needed a vector-image of a pixel-image? delusion Graphics and 3D 2 Nov 12th, 2007 02:46
[SOLVED] multiple image rollover not restoring image snappy JavaScript Forum 4 Nov 5th, 2007 14:38
Background image overlaping footer image at bottom of div lw_d Web Page Design 4 Mar 21st, 2006 00:27
how can i create a wireframe image from a solid image of som benbacardi Graphics and 3D 5 May 22nd, 2004 11:05


All times are GMT. The time now is 22:50.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43